Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: FCKeditor for sNews 1.6 for an old site  (Read 971 times)

stephane

  • Full Member
  • ***
  • Karma: 6
  • Posts: 205
FCKeditor for sNews 1.6 for an old site
« on: April 07, 2016, 05:29:59 PM »

Hello everybody,

I have a little problem with an old website in Snews 1.6 with FCKeditor.
When we use the upload manager function we need to secure it.

For sNews 1.7 it's possible to use this code in connectors/php/config.php (Thank's to Joost)

Code: [Select]
?php

     $SITE = 'http://localhost/snews17/' ; #EDIT !!
   
    session_start();
     $atoken = md5(substr(session_id(), 2, 7));
    $btoken = $_SERVER['HTTP_USER_AGENT'];
    $token = md5($atoken.$btoken.$SITE);
    if( isset($_SESSION[$SITE.'Logged_In']) && $_SESSION[$SITE.'Logged_In'] === $token )
        { $Config['Enabled'] = true ; }
    else { $Config['Enabled'] = false ; }

?>

BUT with sNews 1.6 there is no session_start ! Does anyone know how to do it for sNews 1.6 ?

Thank you for your help.


Logged

stephane

  • Full Member
  • ***
  • Karma: 6
  • Posts: 205
Re: FCKeditor for sNews 1.6 for an old site
« Reply #1 on: April 13, 2016, 10:36:49 AM »

A little UP.
Is there a great sNews Master around here ?  :P

Thank you in advance.
Logged

Rui Mendes

  • Development,Testing, Support
  • sNews Dude
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1063
  • sNews1.80 Reborn
    • Comunidade Portuguesa
Re: FCKeditor for sNews 1.6 for an old site
« Reply #2 on: April 13, 2016, 12:14:39 PM »

Hi Stephane.

It's not true, snews 1.6 has a "session_start" not inside snews.16 file but inside index.php

It's the same, because before include snews.php you start session
Logged
Need a Job on Europe. Linkdin - Facebook / Group

Keyrocks

  • Doug
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 451
  • Posts: 6288
  • Semantically Challenged
    • snews.ca
Re: FCKeditor for sNews 1.6 for an old site
« Reply #3 on: April 14, 2016, 06:40:54 PM »

Hi Stephane.
It's not true, snews 1.6 has a "session_start" not inside snews.16 file but inside index.php
It's the same, because before include snews.php you start session

Rui is correct Stephane. The "session_start();" function-tag is located right after the opening <?php tag on the first line of the index.php file in snews16. In snews17, session_start(); is located right after the opening <?php tag in snews.php. The function itself (the full code of it) is a default PHP function within the host server's PHP engine.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

stephane

  • Full Member
  • ***
  • Karma: 6
  • Posts: 205
Re: FCKeditor for sNews 1.6 for an old site
« Reply #4 on: April 18, 2016, 03:04:27 PM »

Ok thanks Rui and Keyrocks maybe I probably misspoke.
So for you this code in config.php to secure FCK must work ? 
Maybe I have another problem because this website also use the Multi-Language simple Mod by etatus
http://snewscms.com/forum/index.php/topic,6421.msg43288.html#msg43288

If you have an idea thank you if not I don't know...  :P Maybe I should upgrade this old website in sNews 17.
Logged

Keyrocks

  • Doug
  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 451
  • Posts: 6288
  • Semantically Challenged
    • snews.ca
Re: FCKeditor for sNews 1.6 for an old site
« Reply #5 on: April 19, 2016, 06:24:10 AM »

So for you this code in config.php to secure FCK must work ? 
Maybe I have another problem because this website also use the Multi-Language simple Mod by etatus
http://snewscms.com/forum/index.php/topic,6421.msg43288.html#msg43288

If you have an idea thank you if not I don't know...  :P Maybe I should upgrade this old website in sNews 17.

I've never used FCK. I used TinyMCE. If you upgrade to 1.7 ... you might want to give my TinyMCE Addon with a custom sNews Skin based on the WordPress Skin a try.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU