vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Simple request for GLOBAL variable. (https://vborg.vbsupport.ru/showthread.php?t=21244)

chilliboy 06-25-2001 05:03 PM

Hi,

I've been messing with the $GLOBALS variables for several hours, but I can't find one which holds the name for the $styleid.

I want to use it for a hack in phpinclude - is there a variable that holds it? or is there a function in functions php I can use to get hold of it?

Cheers in advance.

Wayne Luke 06-28-2001 03:04 AM

Well the styleid is attached to the user's info and stored in a cookie on their machine...

Since it is part of the user information you can find it in the $bbuserinfo array as $bbuserinfo[styleid]

chilliboy 06-29-2001 08:58 AM

Thanks for the reply. I have found that quite a few variables hold the 'value' for styleid - simply $styleid seems to be globally available. However what I need is the 'name' of the style and not just the numerical value.

eg $styleid will hold numeric value eg 10
but how can I get its corresponding name eg FastCar

Wondering why the hell I want it?

Well the name is more flexible for use with scripts used in phpinclude, and you could use the 'name' for various stuff.

eg If I want to a certain image to appear for that style you could use:

$MyImage = $StyleName . ".gif";

Also

$MyTitle = $StyleName . " forum";

etc - then drop them in a template

Of course you could do it by adding different replacement sets and changing them in there, but my way would be much faster and less cumbersome.

If I can't get hold of the style 'name' as a variable I would have to Input these values by hand and run $styleid through a switch statement to get the 'name' as a variable. However it would be much better if I could get hold of the style 'name' as a variable without having to do this.


All times are GMT. The time now is 03:06 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.01526 seconds
  • Memory Usage 1,707KB
  • 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
  • (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