vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Conditional for 'Is In Template Group'? (https://vborg.vbsupport.ru/showthread.php?t=254991)

alegend 12-10-2010 06:20 AM

Conditional for 'Is In Template Group'?
 
Hi,

I am trying to display a widget only when the visitor is within a standard forum page (eg. showthread, forumdisplay, etc.), but not on my custom pages (eg. xx.com/custom-page.php).

All our custom templates are in the 'Custom Templates' group. Is there a way to detect within a template if THIS_SCRIPT is in a template group? Alternatively is there a conditional to check if the template is a custom template?

Thanks in advance,
R.

kh99 12-10-2010 12:55 PM

Could you define() a value in your custom page then check for that?

alegend 12-10-2010 03:49 PM

Hey kh99, I thought of doing that, but it would mean I'd have to define that value on every page custom template, which is a bit cumbersome.

I was hoping to wrote a conditional against a standard VBulletin value. Thanks for the suggestion though!

kh99 12-10-2010 03:57 PM

I guess probably I don't entirely understand the way you have things set up, but it seems like you would only have to define it at the top of every .php file you have generating a custom page.

ETA: nvm, you probably know what you're doing. Maybe someone else knows...

alegend 12-10-2010 06:29 PM

No worries, thanks for the help anyways.

We're trying to avoid editing into the .php files directly so we can make the templates as portable between our development and live environment.


All times are GMT. The time now is 03:34 AM.

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.00955 seconds
  • Memory Usage 1,708KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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