Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: CKEditor 3.0.1 released! for snews 1.7  (Read 2870 times)

Kaito

  • Newbie
  • *
  • Karma: 0
  • Posts: 46
CKEditor 3.0.1 released! for snews 1.7
« on: October 25, 2009, 12:21:05 PM »

Hi all

There is new version of CKeditor.

1st. change important to hole system is   
    *  Replace textareas by class name
or
    * Replace textareas by code

2nd. change important for me is
    * Replace DIV elements on the fly 
You can see demo after downloading hole ckeditor


Maybe some one whan't to explain How to add this ck for sNews. All changes... there is no php file. All is on .js.

I'm trying to run it but don't know what to change in snews.php file in article form function...

-----------------------
Just the thing :D

Jost finde the way to active text area in hire http://snewscms.com/forum/index.php?topic=8497.msg60186#msg60186 change in snews.php

Quote
//echo html_input('textarea', 'text', 'txt', $frm_text, l('text'), '', '', '', '', '', '2', '100', '', '', '');
      echo '<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
      <textarea class="ckeditor" cols="80" id="txt" name="text" rows="10"></textarea>';
      //buttons();

then i had to change  in snews.php line:

Code: [Select]
function file_include($text, $shorten) {
$fulltext = substr($text, 0, $shorten);
   if(substr_count ($fulltext, '&')>0){$fulltext = str_replace('&', '&amp;', str_replace('&amp;', '&', $fulltext));}
if ($shorten < 9999000 && preg_match('<p>',$fulltext)) {
if (substr_count ($fulltext, '<p>') > substr_count ($fulltext, '</p>')) {
$fulltext .='</p>';
}
}
to
Code: [Select]
function file_include($text, $shorten) {
$fulltext = substr($text, 0, $shorten);
if ($shorten < 9999000 && preg_match('<p>',$fulltext)) {
if (substr_count ($fulltext, '<p>') > substr_count ($fulltext, '</p>')) {
$fulltext .='</p>';
}
}

I use polish UTF-8 so this solve problem with coding :D

And now We have textarea in ADD ARTICLE and ADD PAGE working fine BUT the save buton don't work (the plugin need's to be configure?) and second BUT

When I try to edit the CKeditor is empty oO ?? it's not get date from DB...

What to do now?



then.... help... :D  any body?

hire is link to developers guide
« Last Edit: October 27, 2009, 10:30:53 PM by Kaito »
Logged

konga

  • Newbie
  • *
  • Karma: 0
  • Posts: 14
    • Naturschutz Seite
Re: CKEditor 3.0.1 released! for snews 1.7
« Reply #1 on: April 10, 2010, 05:21:12 PM »

Dear Kaito,

please try it with the description of Joost with the latest version 3.2. It's just working for me both for "Add Article" as well as for "Edit Article" :)

Regards
Harald
Logged