vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   evaluate code based on styleid (https://vborg.vbsupport.ru/showthread.php?t=101448)

Acers 11-24-2005 06:59 AM

evaluate code based on styleid
 
planning to have a right column sidebar on my forums on the main default style.

But on other styles it won't be there

What i wanna know is if its possible that some php code (specifically query) can be run only if that style is selected by user and not for other styles..(saving query otherwise when guys are on diff style. and being faster therefore)

eg i want to put a gallery preview on sidebar. But since sidebar is on one style only, so the query code for geting the pictures from sidebar is executed only when that style is selected. and not otherwise.

eg *pseudo code
if(styleid==%style number%)
EXECUTE QUERY CODE
end if

something like above? if yes how?
thanks

merk 11-24-2005 07:00 AM

you've almost got it.

STYLEID is defined with the styleid.

so

PHP Code:

if(STYLEID == XX)
{
//stuff


Of course, you'd have to find the right location to use it.

Acers 11-24-2005 07:22 AM

yep thankyou :D


All times are GMT. The time now is 08:26 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.00892 seconds
  • Memory Usage 1,709KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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