The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Problem with setting a cookie variable with a hook!
I setup a sidebar for navigation on my forums. I want the sidebar to be removable if my users click a link at the bottom of the side bar. The sidebar works great, but if you click the "remove" link, nothing happens.
http://www.gunzfactor.com/forums Hook Name: "Sidebar Cookie" Hook Location: global_start Hook Code: Code:
$show['sidebar'] = true; if ($_REQUEST['do'] == 'hidesidebar') { vbsetcookie('hidesidebar', 1, true); } $vbulletin->input->clean_gpc('c', 'hidesidebar', 'TYPE_INT'); if ($vbulletin->GPC['hidesidebar'] == 1) { $show['sidebar'] = false; } The template conditional: HTML Code:
<if condition="$show['sidebar']"> </if> HTML Code:
{$vbulletin->options['bburl']}/index.php?$session[sessionurl]do=hidesidebar |
#2
|
|||
|
|||
The following should work:
PHP Code:
|
#3
|
|||
|
|||
Ok, I'm having problems, can anyone figure out how to get this to work with my "hide the sidebar" code....
I have this in my main template PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|