PDA

View Full Version : Need help with sessions


h2ojunkie
11-26-2008, 11:07 PM
I've been going through everything on my site and making sure all mods/plugins are passing session information.

GARS for the most part has sessions covered, however the modules don't have session information in the display links and I found some templates with missing session information.

I'm posting the places I found missing session information here along to help with future updates to GARS and for anyone else that wants to ensure sessions work across the system.

No guarantees I won't miss something, but what I do find I'll post here.

Thanks.

h2ojunkie
11-26-2008, 11:18 PM
Some of the mod php files are missing session info.

Here are the files I found so far:
/geek/gars/mods/

author_top.php
categories.php
featured.php
marked.php
toc.php

Basically, i searched all .php files in geek/gars/display for any <a href= links and added {$vbulletin->session->vars[sessionurl]}

This one is a little different
geek/gars/includes/gars_class_list.php
Find:
$thread['synopsis'] .= "... <a href=\"showthread.php?t=$thread[threadid]\" title=\"" . $this->vbphrase['GARS_read_more'] . "\"><img src=\"$stylevar[imgdir_misc]/gmore.gif\" alt=\"" . $this->vbphrase['GARS_read_more'] . "\" border=\"0\" /></a>";
Replace:
$thread['synopsis'] .= "... <a href=\"showthread.php?{$this->vb->session->vars['sessionurl']}t=$thread[threadid]\" title=\"" . $this->vbphrase['GARS_read_more'] . "\"><img src=\"$stylevar[imgdir_misc]/gmore.gif\" alt=\"" . $this->vbphrase['GARS_read_more'] . "\" border=\"0\" /></a>";

h2ojunkie
11-27-2008, 02:13 AM
Also, in order to add session information to the drop down box for filters, you need to edit the GARS_mod_fiter template


Find:
document.location='$vboptions[bburl]/forumdisplay.php?f=$forumid&filter[' + id + ']=' + e;
Replace:
document.location=("forumdisplay.php?"+SESSIONURL+"f=$forumid&filter["+id+"]="+ e);
Find:
document.location='$vboptions[bburl]/forumdisplay.php?f=$forumid';
Replace:
document.location=("forumdisplay.php?"+SESSIONURL+"f=$forumid");

h2ojunkie
11-27-2008, 02:42 AM
Also found $session[sessionurl] missing from <a links in a the following templates:

GARS_navigation
GARS_pb
GARS_preview_pb
GARS_simple_pb

h2ojunkie
11-27-2008, 03:29 AM
And a phrase defined in a template

edit template GARS_threadbit
Find:
1="member.php?find=lastposter&amp;t=$thread[threadid]"
Replace:
1="member.php?$session[sessionurl]find=lastposter&amp;t=$thread[threadid]"

Morgan
11-28-2008, 05:15 PM
Thanks, added to the to-do list for the next version.