Hi there,
I have been putting up a Dolphin 6.1.6 powered website and its up and running without the ads (though I have no members but me to test it).
First thing I noticed is that it is using TinyMCE for the WYSIWYG editor. Well I have been working with Joomla since before it was called Joomla and it has always used Tiny so I hate TinyMCE with a passion because its never worked right. However FCKEditor has always worked fairly well. The developers of FCKEditor have recently released a new version of their editor which seems to now be called CKEditor. It is very quick!
I have managed to get CKEditor working inside Dolphin 6.1.6 and so far its working well in my testings, though I haven't tested it very far.
It also doesn't have a file manager, however they have also developed a separate plugin for this I believe but I haven't played with it yet.
You may wish to take your site offline while you do this depending on how much traffic it gets, they might see error pages while you are replacing the files.
Here is how I get CKEditor to work.
Note: you must edit the core Dolphin files to do this.
Unfortunately Dolphin doesn't appear to have their editor separated from the core yet so we can't just plug in another editor, we have to manually edit the core Dolphin files. This means if you ever upgrade you will have to redo all these edits.
First of all you should back up all your files.
Next you download CKEditor from http://ckeditor.com/
Now extract that into dolphin/plugins so it is in its own directory there called ckeditor.
You should now be able to test CKEditor by visiting yoursite.com/plugins/ckeditor/_samples
However we still have to add it into our pages so that it can be used to edit the data in the forms.
To do this we must make several edits to core Dolphin files.
There are some simple things we have to copy into the existing files first. But which files do we edit? We have to edit any file that contains the TinyMCE editor. I used a tool called Agent Ransack to search the contents of my Dolphin folder on my local computer for all files containing TinyMCE, I commented out this code and in some cases replaced it with CKEditors code. It is pretty straightforward for the most part until you get to Orca.
Lets do it with an admin file first so you can see how it works without wrecking your front end.
Open up the file dolphin/admin/basic_settings.php
Around line 33 you will see something like this:
$_page['extraCodeInHead'] = <<<EOJ
<!-- tinyMCE gz -->
This is the start of the initialization of TinyMCE. We want to stop it from loading so we are going to replace this entire block of code.
Replace this:
$_page['extraCodeInHead'] = <<<EOJ
<!-- tinyMCE gz -->
...
...
</script>
EOJ;
With this:
$_page['extraCodeInHead'] = <<<EOJ
<script type="text/javascript" src="{$site['plugins']}ckeditor/ckeditor.js"></script>
EOJ;
So all the code between the EOJ markers is replaced with a single line to load ckeditor.
There is one more thing we have to change in this file in order to make ckeditor show up. We must add a new class value to a textarea box in order for ckeditor to recognize where it should go.
Around line 320 after the above edit there is a line which looks like this:
<textarea style="width:100%;height:300px;" name="custom_promo_code" class="custom_promo_code"><?= htmlspecialchars_adv( getParam( 'custom_promo_code' ) ) ?></textarea>
Replace that line with this:
<textarea style="width:100%;height:300px;" name="custom_promo_code" class="ckeditor custom_promo_code"><?= htmlspecialchars_adv( getParam( 'custom_promo_code' ) ) ?></textarea>
Now upload the file to your server and when you go to yoursite.com/admin/bacic_settings.php to edit your Basic Settings CKEditor should show up in the Custom HTML box and hopefully it should work, providing I did not miss anything.
Now let's take care of something else. First lets open up the file located at dolphin/templates/base/scripts/BxBaseConfig.php.
Around line 212 you will see some code like this:
$this -> sTinyMceEditorJS = '
<!-- tinyMCE gz -->
What we want to do here is remove everything between the single quotes. This goes down to around line 361. Once you have it cleaned up it should look like this:
$this -> sTinyMceEditorJS = '';
As you can see the single quotes are empty now, we will replace it with CKEditor code in a bit. There are 2 more of these variables to clean up below this one. You must do the same thing to them and remove all code between the single quotes. When you are all done the 3 lines should look like this:
$this -> sTinyMceEditorJS = '';
$this -> sTinyMceEditorCompactJS = '';
$this -> sTinyMceEditorMiniJS = '';
Now lets add in the CKEditor code so they look like this:
$this -> sTinyMceEditorJS = "<script type='text/javascript' src='{$site['plugins']}ckeditor/ckeditor.js'></script>";
$this -> sTinyMceEditorCompactJS = "<script type='text/javascript' src='{$site['plugins']}ckeditor/ckeditor.js'></script>";
$this -> sTinyMceEditorMiniJS = "<script type='text/javascript' src='{$site['plugins']}ckeditor/ckeditor.js'></script>";
Now we have replaced a few of the main functions to call the editor with CKEditor but in order for it to know where to load we have to add a class value for it in some various textarea form elements scattered throughout Dolphin.
One such file is located at dolphin/compose.php. Open this file up and edit it. Lets go to line 223 or you can search for textarea and it should bring you to the line.
Add in a new class value so it looks like this:
<textarea class="ckeditor blogText" id="blogText" name="text"></textarea>
Now lets do some more files. dolphin/inc/classes has a few files we have to edit. Lets take a look at them.
BxDolArticles.php
Line 491. Replace:
<textarea name="article" id="articleBody" class="classfiedsTextArea articl">{$aArticle['Text']}</textarea>
With:
<textarea name="article" id="articleBody" class="ckeditor classfiedsTextArea articl">{$aArticle['Text']}</textarea>
BxDolBlogs.php
Line 1495. Replace:
<textarea name="blogText" rows="20" cols="60" class="classfiedsTextArea" style="width:800px;height:500px;" id="desc">{$sPostText}</textarea>
With:
<textarea name="blogText" rows="20" cols="60" class="ckeditor classfiedsTextArea" style="width:800px;height:500px;" id="desc">{$sPostText}</textarea>
BxDolClassifieds.php
Line 457. Replace:
<textarea name="message" rows="20" cols="60" class="classfiedsTextArea" style="width:700px;height:400px;">{$sMessage}</textarea>
With:
<textarea name="message" rows="20" cols="60" class="ckeditor classfiedsTextArea" style="width:700px;height:400px;">{$sMessage}</textarea>
BxDolEvents.php
Line 1990. Replace:
<textarea class="classfiedsTextArea" name="event_desc" id="event_desc_id" style="width:700px;height:400px;">{$sEventDesc}</textarea>
With:
<textarea class="ckeditor classfiedsTextArea" name="event_desc" id="event_desc_id" style="width:700px;height:400px;">{$sEventDesc}</textarea>
BxDolGroups.php
Line 1393. Replace:
<textarea name="{$aField['Name']}" class="group_edit_html">{$sValue}</textarea>
With:
<textarea name="{$aField['Name']}" class="ckeditor group_edit_html">{$sValue}</textarea>
BxDolPageViewAdmin.php
Line 258-288. Replace:
<!-- tinyMCE gz -->
<script type="text/javascript" src="{$site['plugins']}tiny_mce/tiny_mce_gzip.js"></script>
...
...
});
</script>
With:
<script type="text/javascript" src="{$site['plugins']}ckeditor/ckeditor.js"></script>
Line 498 (after the above edit). Replace:
<textarea class="form_input_html" id="form_input_html" name="Content"><?= htmlspecialchars_adv( $aItem['Content'] ) ?></textarea>
With:
<textarea class="ckeditor form_input_html" id="form_input_html" name="Content"><?= htmlspecialchars_adv( $aItem['Content'] ) ?></textarea>
I think there are still a few admin files that have to be edited but I think you get the idea. Eventually I will compile all the edited files into a zip which can just be used to upload and replace all core files with the edited versions. I will try to post the rest of them when I have some more time. If you find any boxes that aren't replaced please let me know which ones so I can figure out how to replace them. I am still trying to figure out how to do the Orca editor. If anyone has it figured out please let me know!
Now lets see how much of a mess TinyMCE makes of this post...
To be continued...
Ryan