Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3

Author Topic: [MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)  (Read 19601 times)

tryhard

  • Newbie
  • *
  • Karma: 0
  • Posts: 21
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #15 on: January 16, 2007, 04:03:38 AM »

Quote from: modis
hi sevir

Do you have FCKeditor working in sNews 1.5.30 Stable ?
I can't seem to get it working after mod'ing the above file according to your instructions.

Thanks so much in advanceó
peter
Yeah I'd love to know too :-)  The * ONLY * disappointing lack of feature in SNews is that it doesn't ship with an embedded editor like most CMS do. Otherwise it totally KILLS anything else I have seen (just a bit of a pain to insert images and align them etc :( )

Many thanks
Carl

PS and I don't want my first post to be negative - 'cos I was absolutely blown away by how simple the installation and templating of for sNews - awesome work !! :D
Logged

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #16 on: January 16, 2007, 04:37:44 AM »

I know it's not FCKeditor, but there is a working MOD for sNews 1.5 here for a different editor.
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

tryhard

  • Newbie
  • *
  • Karma: 0
  • Posts: 21
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #17 on: January 16, 2007, 05:09:06 AM »

Quote from: piXelatedEmpire
I know it's not FCKeditor, but there is a working MOD for sNews 1.5 here for a different editor.
Hi mate

Actually the last part of that thread you highlighted looks like FCKEditor is working ok in the latest version - I'm just trying the mod now to see if it'll work :)    I didn't like the sound of TinyMCE breaking the valid code considering all the hard work done by the dev team to make it all compliant :p  

Will post success or failure on here ;-)

Cheers
Carl
Logged

tryhard

  • Newbie
  • *
  • Karma: 0
  • Posts: 21
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #18 on: January 16, 2007, 06:45:10 AM »

The good news is, I'm a total noob, and I managed to get FCKEditor working in the current 1.5.3 Stable release.

Basically I followed the instructions from Cesboa on the http://www.solucija.com/forum/viewtopic.php?id=1924 page (which starts off talking about TinyMCE but moves onto FCKEditor):

Quote from: Cesboa
... basically just locate this (under Articles Form):
Quote
html_input('textarea', 'text', 'txt', $frm_text, l('text'), '', '', '', '', '', '2', '100', '', '', '');
and replace it with this:   
Quote
include("FCKeditor/fckeditor.php");
      echo "

";
      $oFCKeditor = new FCKeditor('text') ;
      $oFCKeditor->BasePath = '/FCKeditor/';
      $oFCKeditor->Value = stripslashes($r['text']);
      $oFCKeditor->Create() ;
      echo "

";
remember to upload FCKEditor in the root of your web ;)... There are still some features that doesn't work - like the little disk save icon... But the sNews save button works ;-)
Just for info I couldn't get the full version Cesboa made available for download to work, it had changed to allow for authors etc, which I didn't need, plus I couldn't get articles to save properly with that version ... but the above changes achieved what I needed - a working WYSIWYG editor in the article interface.

Now I am super happy with sNews !!! Thanks again gang

Kind regards
Carl
Logged

piXelatedEmpire

  • MIA
  • ULTIMATE member
  • ******
  • Karma: 37
  • Posts: 1401
  • currently MIA
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #19 on: January 16, 2007, 06:49:29 AM »

and it validates?
Logged
my apologies to the sNews crew, but I will be MIA for the forseeable future

tyee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 56
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #20 on: January 16, 2007, 06:59:18 AM »

I just tried the same thing and it works too! Can't seem to figure out how to upload a jpg image though.

tryhard - Can you give me any tips.
Logged

tryhard

  • Newbie
  • *
  • Karma: 0
  • Posts: 21
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #21 on: January 16, 2007, 07:24:36 AM »

Funny you should ask tyee, I was just wrestling with that !

The docs for FCKEditor are a bit hard to wade through, but you need to do this :


To change the default configuration open your fckconfig.js file and look for the FileBrowserLanguage and QuickUploadLanguage settings. Change the connector language to the appropriate setting.

For example, to use the PHP connector, the configuration would look like this:


var _FileBrowserLanguage = 'php' ;      // asp | aspx | cfm | lasso | perl | php | py
var _QuickUploadLanguage = 'php' ;      // asp | aspx | cfm | lasso | php




-------------------------------------

Uploading Files
To upload files to the server you will also need to:

1) chmod 0777 the directory you want to upload to (insecure).

Note: It is advisable to change the group ownership of the directory to the same user as apache and add group write permisions instead
2a) in .../connectors/php/config.php You have to set $Config['Enabled'] to TRUE

2b) as well as comment the line starting with $Config['UserFilesPath'] = '...';

3) If you want to use absolute paths in the javascript snippet above you have to change .../connectors/php/connector.php

and replace: $GLOBALS['UserFilesDirectory'] = GetRootPath() . $GLOBALS['UserFilesPath'] ;

with:

$GLOBALS['UserFilesDirectory'] = $GLOBALS['UserFilesPath'] ;

4) You may also need to comment the lines in the fckconfig.js file that relate to 'ImageBrowserURL' and 'LinkBrowserURL'

------------------------------------------------

I found the config file referred to above in /editor/filemanager/upload/php and /editor/filemanager/browser/default/connectors/php - in each of those you'll need to follow the above instructions and create a directory of the same name you choose, in your site root, with CHMOD 777 setting, and update the  fckconfig.js  file


------------------------------------------------


That has it half working for me but I think I am missing something in the FCKEditor config 'cos my images still aren't shown in the nominated site folder... more news on that when (um, if!) I work it out



And sorry yeah PixelatedEmpire - far as I can tell it all validates. There is a source view to clean up any dodgy tags - I must admit I haven't added much useful content yet to check, but its looking hopeful.
Logged

tryhard

  • Newbie
  • *
  • Karma: 0
  • Posts: 21
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #22 on: January 16, 2007, 08:44:12 AM »

Hi guys

I might have been a bit premature getting excited.

I actually got it all working ok (I found it was best to create a uploads directory and in there create 2 directories - one called File and one called Image - set them all to 777. The default settings in the FckEditor config seem to sort of expect those 2 to be there. Then you should find "Upload" works ok and when you "Browse Server" in the next session you'll see the relevant uploaded files (if you browse from the Insert Image command you are shown the contents of the /upload_dir/Image/ folder and if you browse from "Insert Link" command you'll see the contents on the /upload_dir/File/ folder

BUT ...
It has something buggy happening when you try to Edit an existing page. Sometimes its fine, but other times the FckEditor window flashes blank and shows the background colour only - you can see the content in "Source" view but intermittently you're unable to see the normal view (that you toggle with the Source button)

So I'm not sure my suggested  changes above are quite ready for prime time :(... sorry I did warn I was a noob :p

Cheers
Carl
Logged

tryhard

  • Newbie
  • *
  • Karma: 0
  • Posts: 21
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #23 on: January 16, 2007, 08:48:31 AM »

Sorry - should have thought - the problem i described above only occurs in FireFox.  If I use IE7.0 its all fine. So if you're happy to stick with Microsuck browser for admin functions, I think the FCKEditor option is ok after all.

Cheers !
Carl
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #24 on: January 16, 2007, 03:37:02 PM »

Tryhard... This sounds more like a css-related issue... in that FCKE displays OK in one browser but not in another. If it's fine in FF, then you may need to apply some IE-only styles in the stylesheet. Try to find which styles are affecting the FCKE by altering & testing, then duplicate the one(s) affecting FCKE and alter them to work as IE-only. I often (but not always) find the "underscore" approach to work - simply adding an underscore to the beginning of the ID or class name - with IE6 and down. I have not yet considered IE7 but I do know that any oddities in IE7 appear to need a different approach.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

tryhard

  • Newbie
  • *
  • Karma: 0
  • Posts: 21
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #25 on: January 16, 2007, 11:26:15 PM »

Thanks Keyrocks :)

Wow - testing cross-browser css is really pushing my noob-ness to all new levels :/    For the short term I'm happy to get by using IE7 (begrudgingly) considering it only affects Admin - not the end users of the site / content.

But it is a 2007 New Year Resolution to end the year knowing more about css than I do now (which wouldn't be hard!) so I will definitely give it a go when I can get time to tinker.  Presumably its a native problem in FCKEditor (or maybe a clash with sNews css only?) but fFor now I just find it really cool to be able to browse and upload / insert files and images within the 'new article' area of sNews.

I managed to implement sNews into an existing design template, the * first * time I have ever come across a CMS application that could be tailored into something that looks good for the end user after only 1 day of using it !  

Thanks for the help - I'll be sure to post any noob learning experiences in case it helps anyone else as, ahem. challenged, as myself

Cheers
Carl
Logged

tyee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 56
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #26 on: January 17, 2007, 03:43:03 AM »

Hi tryhard
    I tried your procedure today on my laptop running XAMP but had no success. Everything went well until this step --

2b) as well as comment the line starting with $Config['UserFilesPath'] = '...';


Here I put "/uploads/" , but I'm confused as to whether to leave that first slash in or out. The script help line said make this relative to the root. What root, the FCKeditor root, or my "htdocs" root, or my C:\??

Anyway I made this "uploads" folder in my "htdocs" folder of XAMP and then tried to upload an image to the server and then check to see if the image ended up in this folder. It didn't. I then removed the first slash and tried again. Nothing. I then moved the "uploads"  folder to the sNews root directory and still nothing after trying with and without the first slash.

I don't think I need step 3 because I don't want to use absolute paths. Do I have to???

Is step 4 really necessary? and what would I do there. That line looked pretty long and involved.

tyee
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #27 on: January 17, 2007, 03:56:44 AM »

Quote from: tryhard
Thanks Keyrocks :)
But it is a 2007 New Year Resolution to end the year knowing more about css than I do now (which wouldn't be hard!) so I will definitely give it a go when I can get time to tinker.  Presumably its a native problem in FCKEditor (or maybe a clash with sNews css only?) .
I managed to implement sNews into an existing design template, the *first * time I have ever come across a CMS application that could be tailored into something that looks good for the end user after only 1 day of using it !
Resolve to use sNews as your 'learning environment' for 2007 and you won't regret it. The simplicity of sNews makes it easier to experiment and learn with than any other CMS out there today. I knew nothing of CSS when I started working with snews 7 months ago and I am now comfortable enough with it that I can type up the 'bread & butter' styles from scratch without references.

On CSS... if FCKE has its own stylesheet and some of the division IDs or classes have the same names as those already being used in the sNews stylesheet, then... yes... one will over-ride the other and cause problems. The solution in that case would be to re-name one of them and change all references to it (within the file that creates the template) accordingly. As an example, if .footer was used in both stylesheets and both footers were required in the template(s), then you would re-name one of them to .footer2 and change all instances of it (where used) to the new name.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #28 on: January 17, 2007, 04:16:41 AM »

tyee...
When you are using the XAMPP server environment for offline (localhost) development... the htdocs directory serves the same purpose as the server's root directory on a host server. When we use localhost in a URL... such as in http://localhost/snews1/ ...localhost replaces the www and the forward slash after it replaces the dot after the www. In this case, the snews1 folder would be in your htdocs directory... and you would put everything related to your snews installation in that folder. This snews1 folder then becomes your site's root directory. Your FCKEditor folder (containing all the FCKE stuff) would go into the snews1 folder.

If you want to upload images (for articles) and files to your snews1 site, you would create the img and files folders within the snews1 folder (the site's root folder). You would use img as the name for the folder you'd upload images to in case you are already using an images folder in the same snews1 folder... to put your site's template images into. Ideally, you want to keep images for articles in a separate location from those for the template.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

tyee

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 56
[MOD] Toggle button - Simple Editor / FCKeditor (sNews 1.5RC3)
« Reply #29 on: January 17, 2007, 06:01:30 AM »

keyrocks

    Thanks for the reply. Yes, I have sNews in it's own folder in my htdocs folder. FCKEditor is also in this sNews folder. My problem is how to tell FCKEditor the path to a new "uploads" folder I have created. I don't know where to put this new "uploads" folder. FCKEditor can use relative or absolute paths. I want to use relative paths, and FCKEditor takes this as relative from the so called "root". According to your tips, the "root" is the "htdocs" folder so I put the new "uploads" folder there. I couldn't get the editor to work for image uploads doing that. I'm sure it's a path problem though.

Have you tried to do what tryhard suggested to install it?

tyee
Logged
Pages: 1 [2] 3