Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 01:35 pm EST
Geeklog Forums
FCKeditor and Geeklog
Page navigation
mfuggle
Has anyone tried to use FCKeditor with Geeklog. I am trying to use it and cannot figure our how to do the following...
. In storyeditor.thtml I want to use FCKeditor for the display and modification of the intro and body text panels
. I can successfully get the panels to display with appropriate toolbars at the top of each panel using the following code
<td valign="top" align="right">{lang_introtext}:</td>
<td>
<script language="javascript>
<!--
var oFCKeditor ;
oFCKeditor = new FCKeditor('EditorBasic', 300, 100, 'Basic') ;
oFCKeditor.Width = '100%' ;
oFCKeditor.Height = 100 ;
oFCKeditor.Value = {story_introtext} ;
oFCKeditor.Create() ;
//-->
</script>
</td>
</tr>
. the first problem is that on execution in Geeklog I get an error suggetsing there is a missing ; which I cannot locate but the more important issue is that I am not sure how to take the modified text and have it update {story_introtext} in the datebase.
Can anyone help me...
. should I be using a different wysiswyg editor
. getting advice from the FCKeditor forums
. or forget about using a wysiwyg editor in Geeklog
Help appreciated.
Regards
Martrin Fuggle
NeoNecro
I'm looking for a good wysiwyg editor for geeklog to. And FCKeditor seems beter to me than htmlarea.
Why? It took me almost half an hour to get htmlarea working and it doesn't work like it has to. FCKeditor only took me five minutes and it works perfectly! To get to your question:
I found out you have to place this code in your header:
<script type="text/javascript" src="/FCKeditor/fckeditor.js"></script>
And then I think the best you can do is replacing the text area's you wan't like so: (also in youre header)
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'introtext' ) ;
oFCKeditor.ReplaceTextarea() ;
var oFCKeditor = new FCKeditor( 'bodytext' ) ;
oFCKeditor.ReplaceTextarea() ;
}
</script>
If you now edit or create a story as an admin you wil see the 's are changed into editors!
The only bad side to this is that you will always have this code in youre header. I have to little knowledge of javascript to know who to solve this grtz
btw: if you do it this way, you only should edit your header.thtml
dimis-site.be
Blaine
I just finished doing some testing of FCKeditor and found the version 2.0beta 2 still a bit buggy. All the style/font/sizing dropdowns for example, don't work in IE 6 on SP2 for example that I have and it's a posted bug with no follow-up.
I also tried version 1.6 but only works on IE.
I got ver 2.0 to work in IE and Mozilla with some issues like not getting the image upload feature to work.
A few notes: I was installing on my local devel workstatation and needed to set the basepath for each time I used it in the form.
I copied the FCKedtor code into the public_html/fckeditor directory. Adjust as required for your site.
All thats needed in your theme's header.thtml is the include of the main js file - near where the other script tags are. Use the template variable {site_url} so that your full url is used.
Currently, Geeklog's code for the comment, submit new story and admin storyeditor have suport to use an advanced editor template file so you can toggle the advanced editor on and off.
You need to add the $_CONF parm to your config.php (it will be set false in 1.3.10 by default) as it's not currently defined. Set true for enabled and false to disable.
Using the admin storyeditor as an example, you need to copy the admin/story/storyeditor.thtml to storyeditor_advanced.thtml. Then edit this template to add the changes required to launch the FCKeditor component in the textareas.
Add the following just above the closing form tag
<script>
var oFCKeditor = new FCKeditor( 'introtext' ) ;
oFCKeditor.BasePath = "{site_url}/fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
var oFCKeditor = new FCKeditor( 'bodytext' ) ;
oFCKeditor.BasePath = "{site_url}/fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
</script>
This works as is in IE but Mozilla needs to have the textarea fields also defined with the ID attribute. For example the introtext field would be:
<textarea id="introtext" name="introtext" cols="70" rows="6" wrap="virtual">{story_introtext}
You would need to repeat the template editing for the comment and story submit forms or other forms as required. This method does allow you to toggle it off via the config.php and if the advanced version of the template does not exist - it defaults to the normal template.
Geeklog components by PortalParts -- www.portalparts.com
trcjr
...
Did you test this in Firefox? I have it working in IE but doesn't seem to render at all in firefox.
NeoNecro
Blaine
I will probally go back to using 1.6 as it worked well in IE (does not work in Firefox) but it also had more tools then the 2.0 version. I really liked the table autoformat option in 1.6
Geeklog components by PortalParts -- www.portalparts.com
surgeon
I trying to use 2.0 RC2 in Your method. And it still works only in IE6.0. In Firefox not.
--
Pozdrawiam (Regards)
surgeon
http://galeria.lubin.pl/
beewee
Now I'm using the CuneA form HTML editor which is a Firefox extension, and the simple upload script for uploading images etc.
I tried NeoNecro's trick in lib-common.php but that gave an error message.
Suggestions are welcome.....
Dutch Geeklog sites about camping/hiking:
www.kampeerzaken.nl | www.campersite.nl | www.caravans.nl | www.caravans.net
Robin
It works perfectly with Firefox (as I don't use anything else unless I have to) here . I followed Blaine's suggestions and it works like a charm. Try to submit a story.
PS
I will post the instructions in Polish soon
Geeklog Polish Support Team
surgeon
There are still many bugs:
1. Button "back" don`t work when we on geeklog site with FCKeditor (in firefox).
2. Bold and colors don`t works in table (IE and firefox).
3. Problems with
aragraphs
.4. When saving story after editing we stuck in blank page instead of "Story is saved" (firefox). Anyway story IS saved.
And propably many more.
--
Pozdrawiam (Regards)
surgeon
http://galeria.lubin.pl/
ldfoo
Yep - Thanks for the pointer - I have previously installed HTMLArea and FCKEditor successfully - that is until the latest HTMLArea where I continue to have probs with the "...init" whatever.
Tiny_MCE installs like a dream (tested on local test server) - by far the easiest to install and control which textareas are used. The plain version seemed to work OK with Firefox though after installing third party emoticons and image browser/uploader, Firefox became a disaster. All works perfectly in ie6, including image upload and limited manipulation.
The Geeklog alternate templates for rich text editor are excellent - thanks - Be great to have the same for the forum - hope you have a chance to include that in the new release Blaine
You may have a prob with the third party plugins - need to change the english language pack name to "en" from "uk" and also the language reference in the associated xxxxx.js file - found this solution in the tiny_MCE forums.
Just a question - I'm not up on security and the concerns with user access to HTML in contributions - If I limit access to rich text contributions to trusted contributors - Is this a problem?
thanks
Sonnyb
congleal
I just finished doing some testing of FCKeditor and found the version 2.0beta 2 still a bit buggy. All the style/font/sizing dropdowns for example, don't work in IE 6 on SP2 for example that I have and it's a posted bug with no follow-up.
I also tried version 1.6 but only works on IE.
I got ver 2.0 to work in IE and Mozilla with some issues like not getting the image upload feature to work.
A few notes: I was installing on my local devel workstatation and needed to set the basepath for each time I used it in the form.
I copied the FCKedtor code into the public_html/fckeditor directory. Adjust as required for your site.
All thats needed in your theme's header.thtml is the include of the main js file - near where the other script tags are. Use the template variable {site_url} so that your full url is used.
Currently, Geeklog's code for the comment, submit new story and admin storyeditor have suport to use an advanced editor template file so you can toggle the advanced editor on and off.
You need to add the $_CONF parm to your config.php (it will be set false in 1.3.10 by default) as it's not currently defined. Set true for enabled and false to disable.
Using the admin storyeditor as an example, you need to copy the admin/story/storyeditor.thtml to storyeditor_advanced.thtml. Then edit this template to add the changes required to launch the FCKeditor component in the textareas.
Add the following just above the closing form tag
<script>
var oFCKeditor = new FCKeditor( 'introtext' ) ;
oFCKeditor.BasePath = "{site_url}/fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
var oFCKeditor = new FCKeditor( 'bodytext' ) ;
oFCKeditor.BasePath = "{site_url}/fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
</script>
This works as is in IE but Mozilla needs to have the textarea fields also defined with the ID attribute. For example the introtext field would be:
<textarea id="introtext" name="introtext" cols="70" rows="6" wrap="virtual">{story_introtext}
You would need to repeat the template editing for the comment and story submit forms or other forms as required. This method does allow you to toggle it off via the config.php and if the advanced version of the template does not exist - it defaults to the normal template.
I've got it "sort of working" on my geeklog but it seems really "buggy"
I get 2 pop errors:
1. Error: The TEXTAREA id "introtext" was not found...
2. Error: The TEXTAREA id "bodytext" was not found
It appears I can edit an existing story but when I make changes and save, it goes to a blank screen.
When I go to login, I supply my credentials then it goes to a blank screen.
But when I do a refresh or change the http address to the website, it opens with my user credential?
Sorry if I sound ignorant but I guess I am... Windows 2K Server, Geeklog 1.3.11 rc1 using FoxFire browser but also tested with IE.
Help!
Thanks,
Lee
Blaine
I've made quite a few other edits to the advanced editor and am interested in more users testing as well.
Note: FCKeditor 2.0 version is currently final candiate (FC) with an expected final release in July.
Geeklog components by PortalParts -- www.portalparts.com
congleal
I just finished doing some testing of FCKeditor and found the version 2.0beta 2 still a bit buggy. All the style/font/sizing dropdowns for example, don't work in IE 6 on SP2 for example that I have and it's a posted bug with no follow-up.
I also tried version 1.6 but only works on IE.
I got ver 2.0 to work in IE and Mozilla with some issues like not getting the image upload feature to work.
A few notes: I was installing on my local devel workstatation and needed to set the basepath for each time I used it in the form.
I copied the FCKedtor code into the public_html/fckeditor directory. Adjust as required for your site.
All thats needed in your theme's header.thtml is the include of the main js file - near where the other script tags are. Use the template variable {site_url} so that your full url is used.
Currently, Geeklog's code for the comment, submit new story and admin storyeditor have suport to use an advanced editor template file so you can toggle the advanced editor on and off.
You need to add the $_CONF parm to your config.php (it will be set false in 1.3.10 by default) as it's not currently defined. Set true for enabled and false to disable.
Using the admin storyeditor as an example, you need to copy the admin/story/storyeditor.thtml to storyeditor_advanced.thtml. Then edit this template to add the changes required to launch the FCKeditor component in the textareas.
Add the following just above the closing form tag
<script>
var oFCKeditor = new FCKeditor( 'introtext' ) ;
oFCKeditor.BasePath = "{site_url}/fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
var oFCKeditor = new FCKeditor( 'bodytext' ) ;
oFCKeditor.BasePath = "{site_url}/fckeditor/" ;
oFCKeditor.ReplaceTextarea() ;
</script>
This works as is in IE but Mozilla needs to have the textarea fields also defined with the ID attribute. For example the introtext field would be:
<textarea id="introtext" name="introtext" cols="70" rows="6" wrap="virtual">{story_introtext}
You would need to repeat the template editing for the comment and story submit forms or other forms as required. This method does allow you to toggle it off via the config.php and if the advanced version of the template does not exist - it defaults to the normal template.
Blaine,
Could you please restate these instructions...I guess I'm "impaired" because I've tried FCKEditor 2.0 and HTMLArea 3.0 and have been unsuccessful in trying to get it configured properly. I think my biggest problem is trying to figure out where exactly the code is suppose to go in the files.
I just need some replacement for the current story editor.
I appreciate your patience...
Lee
ajzz
I get 2 pop errors:
1. Error: The TEXTAREA id "introtext" was not found...
2. Error: The TEXTAREA id "bodytext" was not found
Congleal, the below is paraphrasing of Blaine's post and should solve your issue.
In storyeditor_advanced.thtml, the textarea tag is already present if you copied this from storyeditor.thtml. If you look at the original code, only the name="introtext" is present within the textarea tag and not the id="introtext". So add id="introtext" to that tag and similarly for bodytext. The final tag should look like what Blaine has posted.
For any other template you change, similarly find the relevant textarea tag and include the id="nameoffield" part. Of course the ids have to be consistent between the script tag you add in the form and the id in the textarea tag.
Cheers!
Ajay
EDIT: On a different note, the reports on blank submit page results are related to a general failure of meta-refreshes....
After running fckeditor on Firefox, all metarefreshes fail. For example, i can try sumbitting on my site and then logout from this geeklog.net site and the logout screen redirect fails. So is this a Firefox bug? or FCKeditor one?
Page navigation
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content