close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

cms 102 upgrade tutorial

Thread began 9/16/2011 6:02 pm by gruant2000381341 | Last modified 9/16/2011 6:04 pm by gruant2000381341 | 1177 views | 1 replies

gruant2000381341

cms 102 upgrade tutorial

This is part 1.. I had to break this into chunks to get it into the forum.
I also attached a txt doc to this thread with all the directions.

How to update cms 102 to use the newer ckeditor, step by step.
(There is also another seperate fix at the very bottom for non collapsing tabs on the admin index page)
You must have html editor 3.02 installed.
Security Assist is not needed if you follow this*.
(*I am 99% sure of this, I looked all over the code and only found one thing that needed to be edited...it seems to work just fine, but I haven't looked into the mysql tables to see if anything is different there or not...so hopefully this will help those of you without security assist)

Define your site root in Dreamweaver with the folder that contains your cms files as your root.
My folder that contains all my cms102 files is named myContent...so that's what I set the root to.
When defining your site, Dreamweaver requires you to declare an images folder...just create a junk folder for this, and delete that folder after we are done....or even use an existing folder, it doesn't really matter.

Step 1. Set Site Settings
-------------------------
Go ahead and open admin->contents_insert.php
(in design view)
click WebAssist->Forms->HTML Editor->Site Settings
in the popup File Manager tab set Upload Directory to "files"
in connection choose localhost(if you have that option)
if you don't have that option, click define
click new
Connection name: localhost
I used generic values next as you can edit these later in the Connections/localhost.php file
MySQL server: localhost
User name: root
Password: pasword
Database: database name
Click OK
Highlight the new localhost, click done
Now on the connection dropdown, choose localhost
Now click the security tab
(If you don't have security assist installed....Skip this step)
Allow access to - Administrator
set Failed Redirect to users_login.php (not -> admin/users_login.php...that builds the link wrong in the kfm/confg file)
Click OK at the bottom


Step 2. Replace the insert editor
-------------------------------------
Now go into code view for the contents_insert.php
Go down to this code in code view (line 363 - 366 in my copy)

<?php
// WebAssist iRite: Rich Text Editor for Dreamweaver
$WARichTextEditor_1 = CreateRichTextEditor ("ContentValue", "../HTMLEditor/", "713px", "400px", "Custom", "../custom/contents_insert_ContentValue1.js", "".((isset($_POST["ContentValue"]))?$_POST["ContentValue"]:"") ."");
?>

Delete those lines, leave your cursor where you deleted that and click "Design view" in toolbar.
Now click WebAssist->Forms->HTML Editor->Insert Editor to bring up the html editor wizard.
Here are the settings to enter in the wizard.

--Editor preset(click pencil)
---- In the general tab
---- Documemt type - XHTML 1.0 Strict
---- Language - your choice, and your choice on the 2 tickboxes
---- File Upload - Tick Allow file upload - your choice for the other tickbox, and I left the sub-directory field blank.
---- I didn't edit anything in the other tabs
click ok
save as preset if you like, not necessary though.

Now the wizard should have something like Blank(custom) in the Editor preset field.
---- Skin: I left at default.
---- Width: 713 px
---- Height: 400 px
---- Interface color: your personal preference
---- Editor name: ContentValue (make sure you use a capital C & V on ContentValue)
---- Initial value: leave blank
---- Styles list preset: I left that at it's default (if you want to import styles...that's for you to figure out on your own.)
click OK

Now go to the very top of the code and find this line.
(Mine was on line 4 after I added the new editor)
<?php require_once("../HTMLEditor/WARichEditorPHP.php"); ?>
Delete that line, it calls the old editor.
make sure not to leave any white spaces when deleting code so we don't get header errors later.
You can now save that page, but keep it open as we will need some details from it.


Step 3. Replace the update editor
-------------------------------------
Open admin->contents_update.php

In the contents_insert.php (that we edited a minute ago) go to the code we just placed in there.
(my copy it is lines 364-401..it will start with <?php and end with ?>)
Highlight all that new code...then hit ctrl+C to copy it.

Now go into contents_update.php down to this code.
(line 383-386 in my copy)

<?php
// WebAssist iRite: Rich Text Editor for Dreamweaver
$WARichTextEditor_1 = CreateRichTextEditor ("ContentValue", "../HTMLEditor/", "713px", "400px", "Custom", "../custom/contents_update_ContentValue1.js", "".($totalRows_HistoryUpdate > 0)?$row_HistoryUpdate['HistoryValue']:$row_WADAContents['ContentValue'] ."");
?>

Delete those lines, and in it's place...hit ctrl+V to paste in the code from the other page that we copied.
Now that you pasted in the new code in contents_update.php, we need to edit it a little.
Find this in the new code....

// The initial value to be displayed in the editor.
$CKEditor_initialValue = "";

And replace it with this code...
(all the code that starts with $CKEditor is all 1 line in case this forum breaks it up)

// The initial value to be displayed in the editor.
$CKEditor_initialValue = "".(($totalRows_HistoryUpdate > 0)?((isset($_POST['ContentValue']) && $row_HistoryUpdate['HistoryValue'] != $_POST['ContentValue'])?$row_WADAContents['ContentValue']:$row_HistoryUpdate['HistoryValue']):$row_WADAContents['ContentValue']) ."";

Now go to the very top of the code to this line.
(It was line 3 on mine)

<?php require_once("../HTMLEditor/WARichEditorPHP.php"); ?>

And replace that line with this.

<?php require_once("../webassist/ckeditor/ckeditor.php"); ?>

Now save that contents_update.php.
You can now close this file and and the contents_insert.php.

Attached Files
cms102upgrade.txt

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...