PDA

View Full Version : How to get the ID of the parent forum for co-branding? ++


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/showthread.php?s=&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!