Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Edit this page"
#9
Hi there
=-00-0=
GS version : 2.01 (stable downloaded)

I made a edit page plugin.. but it required me to change 2 files of the GS system.

I added a new config option to make cookies site wide. this needs to be added and enabled in gsconfig.php

Code:
#make Cookies site wide available
#define('GSCOOKIEISSITEWIDE', TRUE);

I also needed to change the cookie_functions.php file.
I change the create_cookie and kill_cookie functions.

kill_cookie was changed to

Code:
function kill_cookie($identifier) {
        global $SALT;
        $saltCOOKIE = $identifier.$SALT;
        if (defined('GSCOOKIEISSITEWIDE')) {
             $_COOKIE[$saltCOOKIE] = FALSE;
           setcookie($saltCOOKIE, FALSE, time() - 3600,'/');    
        } else {
            $_COOKIE[$saltCOOKIE] = FALSE;
            setcookie($saltCOOKIE, FALSE, time() - 3600);
            
        }
    }

and create_cookie was changed to

Code:
function create_cookie() {  
      
        global $USR;
        global $SALT;
        global $cookie_time;
        global $cookie_name;
        $saltUSR = $USR.$SALT;
        $saltCOOKIE = $cookie_name.$SALT;
        if (defined('GSCOOKIEISSITEWIDE')) {
          setcookie($saltCOOKIE, sha1($saltUSR), time() + $cookie_time,'/');    
        } else {
            setcookie($saltCOOKIE, sha1($saltUSR), time() + $cookie_time);        
        }
    }

and then ALL that needs to be done is the plugin needs to be installed under the plugins dirs.

Hope this can help somebody..

Note by default the plugin will not work as they cookie is only available under /admin
until the gsconfig.php is changed to enable GSCOOKIEISSITEWIDE

I have attached a file with the plugin and the files that was changed.
Stopped developing on GS Plugins. Anybody welcome to take the projects over. Thanks for all the support all.
Reply


Messages In This Thread
"Edit this page" - by Carlos - 2010-03-15, 02:01:31
"Edit this page" - by Zegnåt - 2010-03-15, 02:13:24
"Edit this page" - by JWH_Matthew - 2010-03-15, 06:08:22
"Edit this page" - by Carlos - 2010-08-13, 01:33:21
"Edit this page" - by Oleg06 - 2010-08-13, 06:03:35
"Edit this page" - by daguy - 2010-08-14, 04:02:31
"Edit this page" - by ccagle8 - 2010-08-14, 12:13:15
"Edit this page" - by Carlos - 2010-08-15, 00:38:50
"Edit this page" - by dominionit - 2010-09-13, 02:43:33
"Edit this page" - by Zegnåt - 2010-09-13, 22:53:27
"Edit this page" - by dominionit - 2010-09-13, 22:57:55
"Edit this page" - by dominionit - 2010-09-14, 14:24:30
"Edit this page" - by El-Cherubin - 2010-10-17, 23:22:36
"Edit this page" - by dominionit - 2010-10-18, 01:59:54
"Edit this page" - by El-Cherubin - 2010-10-18, 02:04:18
"Edit this page" - by Zegnåt - 2010-10-18, 03:07:22
"Edit this page" - by dominionit - 2010-10-18, 04:45:33
"Edit this page" - by dominionit - 2010-10-18, 05:13:45
"Edit this page" - by Carlos - 2010-10-18, 05:48:18
"Edit this page" - by dominionit - 2010-10-18, 05:59:30



Users browsing this thread: 1 Guest(s)