vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Navbar if condition on gallery (https://vborg.vbsupport.ru/showthread.php?t=128722)

theChronic 10-10-2006 08:13 AM

Navbar if condition on gallery
 
hey folks
i am wondering if anyone might know the code i could use in my if condition to see if the user is looking at the gallery of the forum (vbGallery). If they are on the gallery, i obviously don't need a link to the gallery page.

Thanks
john

RS_Jelle 10-10-2006 08:46 AM

This should do the trick:
HTML Code:

<if condition="THIS_SCRIPT == 'scriptname'">your link code here</if>
You have to replace scriptname with the defined script name. It's at the top of vBGallery PHP file in the vBulletin root.

For example:
PHP Code:

define('THIS_SCRIPT''myscript'); 

Then you need to replace scriptname with myscript. Probably it will be something like vbgallery, gallery, or something like that ;)

theChronic 10-10-2006 09:06 AM

Awesome, thanks a lot :)

Fenriz 09-28-2007 11:17 PM

And what is condition for the whole vbgallery? I've tried "gallery", "vbgallery", "vBGallery", "vbagallery". It's not working..

KW802 09-29-2007 02:03 AM

Quote:

Originally Posted by Fenriz (Post 1349268)
And what is condition for the whole vbgallery? I've tried "gallery", "vbgallery", "vBGallery", "vbagallery". It's not working..

The trick is to use PP_SCRIPT as the identifier instead of THIS_SCRIPT.

Below is the exact code I'm using over at Cool Sci-Fi; when in the gallery the navbar menu is not shown, when you're anywhere else it shows.
Code:

<if condition="PP_SCRIPT != 'vBGallery'">
  <td class="vbmenu_control"><a href="$vboptions[homeurl]/gallery/$session[sessionurl_q]">Gallery</a></td>
</if>


Fenriz 09-29-2007 04:44 AM

KW802, great, thanks, it works!


All times are GMT. The time now is 09:39 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00988 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete