Topics

User Functions

Events

There are no upcoming events

What's New

Stories

1 new Stories in the last 2 weeks

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Friday, May 24 2013 @ 10:46 AM EDT


 Forum Index > Support > Plugin Support New Topic Post Reply
 FCKeditor and Geeklog
First | Previous | 1 2 3 | Next | Last
   
mfuggle
 10/06/04 11:09PM (Read 29317 times)  
+----
Newbie

Status: offline


Registered: 09/30/04
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


 
Profile Email
 Quote
mfuggle
 10/07/04 03:10AM  
+----
Newbie

Status: offline


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

Regards
Martin Fuggle

 
Profile Email
 Quote
NeoNecro
 10/08/04 12:57PM  
++++-
Regular Poster

Status: offline


Registered: 02/07/04
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
 
Profile Email Website
 Quote
Blaine
 10/09/04 01:19PM  
+++++
Full Member

Status: offline


Registered: 07/16/02
Posts: 1233
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
 
Profile Email Website
 Quote
Anonymous: trcjr
 10/22/04 04:53PM  



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.

 
 Quote
NeoNecro
 10/23/04 03:34AM  
++++-
Regular Poster

Status: offline


Registered: 02/07/04
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
 
Profile Email Website
 Quote
Blaine
 10/23/04 07:18PM  
+++++
Full Member

Status: offline


Registered: 07/16/02
Posts: 1233
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
 
Profile Email Website
 Quote
Norgs
 02/14/05 08:28AM  
++---
Junior

Status: offline


Registered: 12/16/03
Posts: 17
Anyone here had a crack at installing tinyMCE?

 
Profile Email
 Quote
surgeon
 02/22/05 11:36AM  
+----
Newbie

Status: offline


Registered: 01/31/05
Posts: 8
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/
 
Profile Email Website
 Quote
geKow
 02/22/05 02:18PM  
+++++
Full Member

Status: offline


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

geKow

 
Profile Email Website
 Quote
beewee
 02/22/05 02:34PM  
+++++
Full Member

Status: offline


Registered: 08/05/03
Posts: 969
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
 
Profile Email Website
 Quote
Robin
 02/22/05 03:09PM  
+++++
Full Member

Status: offline


Registered: 02/15/02
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
 
Profile Email Website
 Quote
surgeon
 02/23/05 12:49PM  
+----
Newbie

Status: offline


Registered: 01/31/05
Posts: 8
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/
 
Profile Email Website
 Quote
ldfoo
 02/27/05 07:39AM  
++---
Junior

Status: offline


Registered: 05/10/04
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

 
Profile Email
 Quote
Sonnyb
 05/21/05 12:12PM  
++---
Junior

Status: offline


Registered: 05/21/05
Posts: 22
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

 
Profile Email Website
 Quote
congleal
 06/11/05 12:49PM  
+++++
Full Member

Status: offline


Registered: 11/08/04
Posts: 172
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

 
Profile Email
 Quote
Blaine
 06/11/05 01:22PM  
+++++
Full Member

Status: offline


Registered: 07/16/02
Posts: 1233
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
 
Profile Email Website
 Quote
congleal
 06/11/05 02:12PM  
+++++
Full Member

Status: offline


Registered: 11/08/04
Posts: 172
Thanks!

 
Profile Email
 Quote
congleal
 06/14/05 01:15PM  
+++++
Full Member

Status: offline


Registered: 11/08/04
Posts: 172
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

 
Profile Email
 Quote
ajzz
 06/18/05 09:56PM  
++++-
Regular Poster

Status: offline


Registered: 01/19/05
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?


 
Profile Email
 Quote
First | Previous | 1 2 3 | Next | Last
Content generated in: 6.30 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content