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.

Pages: 1 [2] 3

Author Topic: FCKEditor for snews 1.7  (Read 7655 times)

stephane

  • Full Member
  • ***
  • Karma: 6
  • Posts: 194
Re: FCKEditor for snews 1.7
« Reply #15 on: November 19, 2010, 04:40:32 PM »

For those who want use FCKEditor or CKEditor I find a free file manager that work with both of them :KCFinder.

http://kcfinder.sunhater.com/
Is like CKFinder but free  ;)

Nobody knows about the strange problem with CKEditor and the empty textarea when editing article ?
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: FCKEditor for snews 1.7
« Reply #16 on: November 19, 2010, 07:57:48 PM »

For those who want use FCKEditor or CKEditor I find a free file manager that work with both of them :KCFinder.
http://kcfinder.sunhater.com/
Is like CKFinder but free  ;)
Nobody knows about the strange problem with CKEditor and the empty textarea when editing article ?

Good find ...that file manager.
I haven't used FCKEditor for a loonnng time and do not have it installed on any of my projects at the moment... so I can't help you on the empty textarea problem.
« Last Edit: December 09, 2010, 09:28:50 PM by Keyrocks »
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

stephane

  • Full Member
  • ***
  • Karma: 6
  • Posts: 194
Re: FCKEditor for snews 1.7
« Reply #17 on: November 20, 2010, 05:35:18 PM »

After some test I suspect there is something missing in the textarea.
Code: [Select]
<textarea class="ckeditor" cols="80" id="txt" name="text" rows="10"> HERE? </textarea>';
Something like $frm_text to display the content of the database. Don't you think ?
But I don't know how to put it  ??? :P

Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: FCKEditor for snews 1.7
« Reply #18 on: November 20, 2010, 11:06:49 PM »

After some test I suspect there is something missing in the textarea.
Code: [Select]
<textarea class="ckeditor" cols="80" id="txt" name="text" rows="10"> HERE? </textarea>';
Something like $frm_text to display the content of the database. Don't you think ? But I don't know how to put it  ??? :P

If you are replacing the default sNews text-area string that is just above the buttons(); function-tag in the // ARTICLES FORM function, then you try this and see if it works:
Code: [Select]
<?php // DO NOT COPY THIS TAG

#CKEditor textarea string
echo '<textarea class="ckeditor" cols="80" id="txt" name="text" rows="10">'.$frm_text.'</textarea>';
// default sNews textarea string
echo html_input('textarea''text''txt'$frm_textl('text'), '''''''''''2''100''''''');
buttons();

// DO NOT COPY THIS TAG ?>

Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

stephane

  • Full Member
  • ***
  • Karma: 6
  • Posts: 194
Re: FCKEditor for snews 1.7
« Reply #19 on: November 20, 2010, 11:42:26 PM »

Yessss, it's working. Yesterday I had try with the same thing but without the '.    . ' and of course it did not work.

Thanks a lot Keyrocks  :D :D
Logged

3bola

  • Newbie
  • *
  • Karma: 0
  • Posts: 4
Re: FCKEditor for snews 1.7
« Reply #20 on: November 24, 2010, 04:13:23 PM »

Damn it did it, thanks a million, Sven, K for you. And thanks to you to Fred, although I did try Svens first and it did the trick,.

Or, you could just add "config.entities = false;" without the quotes in ckeditor/config.js.
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Re: FCKEditor for snews 1.7
« Reply #21 on: November 24, 2010, 04:24:41 PM »

What IS ze differaaaaance between FCK and CK editorzz ?
Logged
"It's only dead fish that goes with the flow... "
Updated

skian

  • Full Member
  • ***
  • Karma: 14
  • Posts: 120
Re: FCKEditor for snews 1.7
« Reply #22 on: November 24, 2010, 06:24:54 PM »

What IS ze differaaaaance between FCK and CK editorzz ?

casus belli !
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Re: FCKEditor for snews 1.7
« Reply #23 on: December 09, 2010, 03:01:48 PM »

For this accents problem I just put this in function articles()
Code: [Select]
$infoline = $r['displayinfo'] == 'YES' ? true : false;
$text = stripslashes($r['text']);
//// correction pour CKEditor et accents //////
$text = str_replace('&nbsp;', ' ' , $text);
$text = html_entity_decode( $text, ENT_QUOTES, "utf-8" );
/// FIN correction////
if (!empty($currentPage)) {

it's working fine with French accents.
The File inclusion function is the same as above ( Fred K )


Ok, I spoke prematurely... It did work, up until when I have to edit the article again... then the same article (in editor mode) looks like this:
Code: [Select]
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tortor enim, dapibus ut facilisis non, accumsan ac eros. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed non ipsum ipsum. Nunc vitae purus at nibh viverra sagittis sit amet eget orci. Etiam dolor est, bibendum a venenatis id, dignissim vitae lacus. Praesent bibendum, nulla et semper hendrerit, lectus justo hendrerit tellus, non dignissim eros tellus vel nisl. Suspendisse arcu odio, dapibus ut accumsan sit amet, ultrices vitae turpis. Sed porttitor scelerisque mi in commodo. Mauris elit quam, dictum et auctor non, dapibus blandit eros. Sed mollis cursus aliquet.<br /><br />molestie mauris eu neque dapibus tincidunt. Aliquam malesuada risus at magna ultrices eget commodo nisl convallis. Phasellus aliquet, felis quis vestibulum consectetur, lorem metus viverra turpis, vel blandit metus dolor et leo. Fusce in libero ante. Fusce gravida magna metus, sit amet laoreet dui. Mauris sodales lacinia turpis ac rutrum. Phasellus mauris risus, euismod nec posuere eu, varius id nisl. Fusce ultrices ultrices aliquam. Nam luctus felis sed ante malesuada at commodo quam ultricies. Vestibulum orci nibh, laoreet quis interdum ac, ullamcorper at ipsum. In sed lobortis lorem. Fusce eget neque sit amet risus vestibulum luctus eu nec mi. In ultrices ipsum in ipsum ullamcorper venenatis ut a nisl. Vestibulum auctor mollis nibh, sit amet hendrerit tellus mollis et. Donec quis luctus felis. Aliquam consectetur venenatis mi a venenatis. Sed non erat tellus, ut sodales ante. Quisque felis tellus, placerat ornare aliquam eu, porta at felis. Nam rhoncus porttitor tellus, nec tristique turpis molestie sed. Mauris tempus risus commodo ligula porta varius.</p>

That is with the paragraph brackets in the editor mode (yes... it's NOT in source mode)... And upon save it saves that crap aswell... It's all in the F*CKING FCK editor (CKeditor does the same), and I have no idea why as I haven't had any problems before on other websites, AND that the swedish spec characters åÅ äÄ öÖ works in sNews itself... WTF... I beginning to get really pissed off right about now...

'Elp moi, s'il vous plait.

PS. I have tried Fred's version aswell, an no luck. I've tried both, and no luck, it simply doesn't work, and I have the exact same configuration in HTML, sNews as I have had before DS.
« Last Edit: December 09, 2010, 03:03:21 PM by Patric Ahlqvist »
Logged
"It's only dead fish that goes with the flow... "
Updated

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Re: FCKEditor for snews 1.7
« Reply #24 on: December 09, 2010, 04:02:29 PM »

And there is no fecking config.php in the CK Editor pack...
Logged
"It's only dead fish that goes with the flow... "
Updated

stephane

  • Full Member
  • ***
  • Karma: 6
  • Posts: 194
Re: FCKEditor for snews 1.7
« Reply #25 on: December 10, 2010, 05:37:18 PM »

Hello Patric,

In my snews17 MU test and snews17 it's working for articles and extra content. I just test with

But I have this
Code: [Select]
$infoline = $r['displayinfo'] == 'YES' ? true : false;
$text = stripslashes($r['text']);
//// correction pour CKEditor et accents //////
$text = str_replace('&nbsp;', '&#160;' , $text);
$text = html_entity_decode( $text, ENT_QUOTES, "utf-8" );
/// FIN correction////
if (!empty($currentPage)) {

In your example you remove the &#160;

Some lines below I have also
Code: [Select]
} else { echo '<h2>'.$title.'</h2>'; }}
file_include(str_replace('[break]', '',str_replace('&', '&amp;', $text)), $shorten);
$commentable = $r['commentable'];
$visiblity = $r['visible'] == 'YES' ?

In File Inclusion
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>';
}
}

In fckconfig.js
Code: [Select]
FCKConfig.ProcessHTMLEntities = true ;
FCKConfig.IncludeLatinEntities = true ;
FCKConfig.IncludeGreekEntities = true ;

FCKConfig.ProcessNumericEntities = false ;

Nothing to change for CKEditor.

Hope this helps you
Stphane

« Last Edit: December 10, 2010, 05:54:02 PM by stephane »
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
Re: FCKEditor for snews 1.7
« Reply #26 on: December 11, 2010, 11:12:39 AM »

thank you, mon frere... swapped to ckeditor, and all good apart from the changes supposed to be done in config.php... there us no such file.
Logged
"It's only dead fish that goes with the flow... "
Updated

Tropy

  • Newbie
  • *
  • Karma: 1
  • Posts: 25
Re: FCKEditor for snews 1.7
« Reply #27 on: January 01, 2013, 05:10:14 PM »

 have some probs with the extra block! the special chars are not parsed right or twice!

has anybody an idea? how to solve this?!

mfg tropy
Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: FCKEditor for snews 1.7
« Reply #28 on: January 02, 2013, 04:11:34 PM »

have some probs with the extra block! the special chars are not parsed right or twice!
has anybody an idea? how to solve this?!
mfg tropy

You might try looking for possible solutions by running a Google search for FCK Editor special character problem. I use Tiny MCE and do not have problems with it provided I always enter plain text in the Editor text-area and do the formatting with Tiny MCE.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Tropy

  • Newbie
  • *
  • Karma: 1
  • Posts: 25
Re: FCKEditor for snews 1.7
« Reply #29 on: January 02, 2013, 09:17:10 PM »

no in the normal articles pages and edit all went okay but not in the extra block!

mfg tropy

P.s.: watch on this post pls.

http://snewscms.com/forum/index.php/topic,8498.msg69626.html#msg69626
« Last Edit: January 02, 2013, 09:19:28 PM by Tropy »
Logged
Pages: 1 [2] 3