phpBB portal getting rid of sid= [SOLVED]

Discussion forum for MOD Writers regarding MOD Development.
Locked
Salami1_1
Registered User
Posts: 31
Joined: Tue Nov 16, 2010 8:08 pm

phpBB portal getting rid of sid= [SOLVED]

Post by Salami1_1 »

Hi All,

I'm not sure if this is right section as what I want to ask does not really treat a mod.

On my website http://www.samsunguniverse.com I build a site around the phpBB forum and I'm using the user module on all parts of the website (blog comments etc etc).

Now as per documentation from phpBB I'm creating links like:

Code: Select all

<?PHP
echo append_sid($somelink);
?>
To keep the user logged in all over the website. However this adds something like:
sid=4e923564eed893b7a0efeeefccf90dc7 to the url.

Is there someway I can get rid of this? its ugly and not very SEO friendly either.

Thanks
Last edited by Salami1_1 on Thu Jun 14, 2012 9:59 pm, edited 1 time in total.
Samsung Universe Community
News, Fun and tweaking for everything Samsung
User avatar
Saldash
Registered User
Posts: 619
Joined: Mon Nov 10, 2008 8:08 am
Location: Flintshire, UK
Name: Stuart Jackson
Contact:

Re: phpBB portal getting rid of sid=

Post by Saldash »

Are your cookies set correctly?

My board doesn't append the SID to my customer pages and they work fine keeping people logged in.
World Recoded UK - DreamHost Site of the Month winner February 2011!
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52127
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: phpBB portal getting rid of sid=

Post by Brf »

append_sid() has to write a cookie, to avoid the sid being written to the URL.

Your "echo"ing it implies that you are in the middle of outputting the webpage. Cookies must be written before the webpage header is output, so in this case you cannot write the cookie and the sid must be appended to the URL.
Salami1_1
Registered User
Posts: 31
Joined: Tue Nov 16, 2010 8:08 pm

Re: phpBB portal getting rid of sid=

Post by Salami1_1 »

Checked my cookie settings on the board and nothing special there..
cookie domain should be '.samsunguniverse.com' right?

For the link in the site I understand the problem as the append_sid is indeed called after first header output, however while browsing the normal forum this should not be the case.. and while browsing the forum (when you are logged in) it also append the sid..

To solve the problem with the append_sid in my website part would this work?
<?PHP
$link1 = append_sid("www.link1.com");
$link2 = append_sid("www.link2.com");
//first output here
//site code
//where needed:
echo $link1;
?>

Thanks
Samsung Universe Community
News, Fun and tweaking for everything Samsung
Salami1_1
Registered User
Posts: 31
Joined: Tue Nov 16, 2010 8:08 pm

Re: phpBB portal getting rid of sid=

Post by Salami1_1 »

ok problem solved.. it was all fault of some plugin I had installed th23 domain making it possible to use the forum from multiple domains this is no longer needed to disabled the plugin and voila all problems gone..

thanks
Samsung Universe Community
News, Fun and tweaking for everything Samsung
Locked

Return to “[3.0.x] MOD Writers Discussion”