Welcome to Geeklog Thursday, November 23 2017 @ 09:16 pm EST


Status: offline

mfuggle

Forum User
Newbie
Registered: 30/09/2004
Posts: 11

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


PHP Formatted Code
<tr>
<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


Status: offline

mfuggle

Forum User
Newbie
Registered: 30/09/2004
Posts: 11
HTMLarea 3.0 seems to be the way to go and works very nicely...

Regards
Martin Fuggle

Status: offline

NeoNecro

Forum User
Regular Poster
Registered: 07/02/2004
Posts: 90
Hey,
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:
PHP Formatted Code

<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)
PHP Formatted Code

     <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

Status: offline

Blaine

Forum User
Full Member
Registered: 16/07/2002
Posts: 1233
Location:Canada
As a follow-up to NeoNecro's notes.

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.
PHP Formatted Code
<script type="text/javascript" src="{site_url}/fckeditor/fckeditor.js"></script>


 


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.
PHP Formatted Code
$_CONF['advanced_editor'] = true;

 


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
PHP Formatted Code

<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:
PHP Formatted Code

<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

Anonymous
Quote by Blaine: As a follow-up to NeoNecro's notes.

...


Did you test this in Firefox? I have it working in IE but doesn't seem to render at all in firefox.

Status: offline

NeoNecro

Forum User
Regular Poster
Registered: 07/02/2004
Posts: 90
Hey,
I use the latset version of FCKeditor and it works fine both on ie and firefox. If doesn't work on one of the two, there's a big chance you did something wrong.

Here's an example of FCKeditor in comments.
dimis-site.be

Status: offline

Blaine

Forum User
Full Member
Registered: 16/07/2002
Posts: 1233
Location:Canada
Yeh the version 2.0b does work in FireFox but is sort of broken in IE. The font style and text size drop downs do not work in IE. I also noticed the TABLE tool works different in Firefox. In Firefox, you have more controls to edit the table once you have created one and I liked that.

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

Status: offline

Norgs

Forum User
Junior
Registered: 16/12/2003
Posts: 17
Anyone here had a crack at installing tinyMCE?

Status: offline

surgeon

Forum User
Newbie
Registered: 31/01/2005
Posts: 8
Location:Poland
Quote by Blaine: Yeh the version 2.0b does work in FireFox but is sort of broken in IE.

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/

Status: offline

geKow

Forum User
Full Member
Registered: 12/01/2003
Posts: 445
same here... the editor appears, but when I submit the story, I get a blank page and nothing happens.

geKow

Status: offline

beewee

Forum User
Full Member
Registered: 05/08/2003
Posts: 969
Location:The Netherlands, where else?
Yep, me tto, I succeeded in implementing HTMLarea 3, but after submitting i got a blank page. But the story was submitted indeed, so after hitting Back twice I got the storylist. And got another problem: in the titlebar I got a message about loading HTMLarea 5/5 and didn't get rid of it, so I got rid of HTMLarea at all.

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

Status: offline

Robin

Forum User
Full Member
Registered: 15/02/2002
Posts: 725
Quote by surgeon:I trying to use 2.0 RC2 in Your method. And it still works only in IE6.0. In Firefox not.

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

Status: offline

surgeon

Forum User
Newbie
Registered: 31/01/2005
Posts: 8
Location:Poland
Ok, it really works in firefox, but cols="70" must be.
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/

Status: offline

ldfoo

Forum User
Junior
Registered: 10/05/2004
Posts: 34
Anyone here had a crack at installing tinyMCE?


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

Status: offline

Sonnyb

Forum User
Junior
Registered: 21/05/2005
Posts: 22
Location:Tampa, FL
I believe that geeklog filters html output from any editor the same way. It strips out whatever isn't explicitly allowed. I believe the settings are in config.php, look for admin_html and user_html. That's just from memory, don't quote me on that

Status: offline

congleal

Forum User
Full Member
Registered: 08/11/2004
Posts: 179
Quote by Blaine: As a follow-up to NeoNecro's notes.

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.
PHP Formatted Code
<script type="text/javascript" src="{site_url}/fckeditor/fckeditor.js"></script>




 


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.
PHP Formatted Code
$_CONF['advanced_editor'] = true;



 


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
PHP Formatted Code

<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:
PHP Formatted Code

<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

Status: offline

Blaine

Forum User
Full Member
Registered: 16/07/2002
Posts: 1233
Location:Canada
You may want to try the latest CVS version of geeklog if this is a non-production site. I have the latest version of FCKeditor integrated as an out-of-the-box option if you enable the advanced Editor option in config.php.

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

Status: offline

congleal

Forum User
Full Member
Registered: 08/11/2004
Posts: 179
Thanks!

Status: offline

congleal

Forum User
Full Member
Registered: 08/11/2004
Posts: 179
Quote by Blaine: As a follow-up to NeoNecro's notes.

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.
PHP Formatted Code
<script type="text/javascript" src="{site_url}/fckeditor/fckeditor.js"></script>




 


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.
PHP Formatted Code
$_CONF['advanced_editor'] = true;



 


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
PHP Formatted Code

<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:
PHP Formatted Code

<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

Status: offline

ajzz

Forum User
Regular Poster
Registered: 19/01/2005
Posts: 113
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


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?


All times are EST. The time is now 09:16 pm.

  • 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