glFusion utilizes the robust FCKeditor and can be easily customized to meet your specific needs.
glFusion comes with 4 pre-configured menus for the advanced editor:
Basic Toolbar - used for comment entry.
User Toolbar - used for user submitted stories.
Advanced Toolbar - used for story / static page edits.
Full Featured Toolbar - not used by default, but available to site admins in the toolbar dropdown menu.
The toolbars listed above have internal names that are used in the configuration files to control which one is used and how they look. They map out like this:
| Common Name | Configuration Name |
|---|---|
| Basic Toolbar | editor-toolbar1 |
| Common Toolbar | editor-toolbar2 |
| Advanced Toolbar | editor-toolbar3 |
| User Toolbar | editor-toolbar4 |
| Full Featured Toolbar | Default |
| Forum Toolbar | forum-toolbar |
You can configure which toolbar is used for Story Edits (Admins), Story Edits (User), and Comments.
To change the toolbar used for User Submitted Stories, you will need to edit the submitstory_fckeditor.js file located in the public_html/js/ directory. You will see the following line in the submitstory_fckeditor.js file:
oFCKeditor1.ToolbarSet = 'editor-toolbar4' ;
You can change editor-toolbar4 to one of the toolbars listed above. A little further down the submitstory_fckeditor.js file you will see another toolbar definition, this one is used for the body text entry. You should change it as well:
oFCKeditor2.ToolbarSet = 'editor-toolbar4' ;
The toolbars are defined in the public_html/fckeditor/myconfig.js file.
FCKConfig.ToolbarSets["Default"] = [
['Source','DocProps','-','Save','NewPage','Preview','-','Templates'],
['Cut','Copy','Paste','PasteText','PasteWord','-','Print','SpellCheck'],
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['Form','Checkbox','Radio','TextField','Textarea','Select','Button','ImageButton','HiddenField'],
'/',
['Bold','Italic','Underline','StrikeThrough','-','Subscript','Superscript'],
['OrderedList','UnorderedList','-','Outdent','Indent','Blockquote'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyFull'],
['Link','Unlink','Anchor'],
['Image','mediagallery','video','Flash','Table','Rule','Smiley','SpecialChar','PageBreak'],
'/',
['Style','FontFormat','FontName','FontSize'],
['TextColor','BGColor'],
['FitWindow','ShowBlocks','-','About'] // No comma for the last row.
] ;
Every ToolBarSet is composed of a series of “toolbar bands” that are grouped in the final toolbar layout. The bands items move together on new rows when resizing the editor.
As you can see in the above toolbarsets definitions, every toolbar band is defined as a separated JavaScript array of strings. Every string corresponds to an available toolbar item defined in the editor code or in a plugin. If the toolbar item doesn't exist, a message is displayed when loading the editor.
You can also include a separator in the toolbar band by including the ”-” string on it.
Looking at the “Default” ToolBarSet you will note that in one of the rows you have a ”/” string instead of an array. This slash can be used to tell the editor that you want to force the next bands to be rendered in a new row and not following the previous one.