vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   How to get the ID of the parent forum for co-branding? ++ (https://vborg.vbsupport.ru/showthread.php?t=20807)

chilliboy 06-20-2001 04:00 PM

Hi,

I want to get hold of a variable for the parent forum of any sub forum or thread, so that I can use it in phpinclude so I can use it to define a few other variables. Does anyone know how to do this??

I want to use it to make the process of templating/styles easier.

eg if ($parentforum == 5){styleid = 5; $logograpic = 5.gif; advert = ad5.gif};
etc etc etc

Anyone done something similar to this or think it would be useful??

Wayne Luke 06-20-2001 06:59 PM

I told you how to do this before in your other thread about the same question...

$myforuminfo = getforuminfo($forumid)

$parentid=$myforuminfo[parentid];

chilliboy 06-20-2001 08:56 PM

Sorry Luke,

I was kind of looking for more input on how it could be used from the 'hackers'.

I think I found a more useful way anyway : $GLOBALS[forumcache][parentlist]

Here you've got a variable which holds all the parents to the first level. I put up a thread on how/if it could be used to modify cookie styles here: http://www.vbulletin.com/forum/showt...threadid=20823

if anyone is interested.

Cheers

dwh 06-27-2001 05:41 PM

wluke, I pasted your code and it didn't work stalling me a bit. You may want to edit it and add the ";" at the end of the first line so that others don't fall into the same trap. BTW, thanks VERY much for the code as it worked!


All times are GMT. The time now is 05:57 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.00940 seconds
  • Memory Usage 1,712KB
  • 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
  • (4)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