Fiji Web Design
Welcome, Guest
Please Login or Register.    Lost Password?
How to Use GeshiBot in FCK without code stripping (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: How to Use GeshiBot in FCK without code stripping
#947
shoulders (User)
Fresh Boarder
Posts: 15
graphgraph
User Offline Click here to see the profile of this user
How to Use GeshiBot in FCK without code stripping 2 Years, 8 Months ago Karma: 0  
This prevents code stripping or manipulation of code between the geshibot tags (using curly braces) in FCK Editor WYSIWYG.

Firstly make sure you have set Joomla's whitelist/blacklist thing properly as descibed in this article.

http://docs.joomla.org/Why_does_some_HTML_get_removed_from_articles_in_version_1.5.8%3F

The easiest way of checking this is to turn off your editor, paste some code in, save the article and see if joomla has stripped the code out.

Next choose FCK Editor as your WYSIWYG, install if needed.

To prevent any code inbetween the geshibot tags being stripped out we need to add a line of code to

/plugins/editors/fckeditor/fckconfig.js

search for (about line 66):

// FCKConfig.ProtectedSource.Add( /(<asp:[^\>]+>[\s|\S]*?<\/asp:[^\>]+>)|(<asp:[^\>]+\/>)/gi ) ;	// ASP.Net style tags <asp:control>
right below it add:
FCKConfig.ProtectedSource.Add( /{geshibot[\s\S]*?}[\s\S]*?{\/geshibot}/g ) ; // Protects all code between GESHI tags
Save file, empty you browser cache to make sure nothing is left. FCK Editor will now leave all code between the geshibot tags alone. This code will allow you to specify the parameters of Geshibot aswell. Please note, when you uninstall or upgrade this change will dissapear and will have to mod the file again. Also, the geshibot tags and the code between it will only be visible on the source page. shoulders
 
Report to moderator   Logged Logged  
 
Last Edit: 2009/07/14 15:00 By shoulders.
 
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Joomla Downloads

DownloadsDownload our free Joomla! Components, Modules and Plugins.