PDA

View Full Version : retrieve parent forum id?


amnesia623
10-29-2007, 08:13 PM
How would I be able to get the ID of a forums parent? I would like to include this code into a plugin to control a side menu.

Thanks!

Paul M
10-29-2007, 08:49 PM
$foruminfo['parentid'] I think.

amnesia623
10-29-2007, 08:52 PM
Yup - that works!

Thank you!

Paul M
10-29-2007, 08:54 PM
parentid is correct.

You have not provided enough information to determine the array name, where are you trying to use it.

amnesia623
10-29-2007, 09:26 PM
I am trying to use it to display a menu on the forumdisplay template via plugin on the global_start hook.

I am using the forum ID to determine the contents of the sidebar(sidemenu). Not every forum will have a unique side menu so I have to 'default' the menu back to the ID of it's parent.

Paul M
10-29-2007, 10:26 PM
Then I see no reason for the above not to work, so you'll have to post the code you are using.

amnesia623
10-29-2007, 10:28 PM
Oh - it does work fine. I just screwed up when I posted before (but edited it after).