Log in

View Full Version : get forum id in showthread?


Exo
11-17-2002, 12:08 AM
Hi,

how can i check the forum id in showthread?

if ($forumid!=298){
eval("dooutput(\"".gettemplate("showthread_new")."\");");
}
else {
eval("dooutput(\"".gettemplate("showthread")."\");");
}


the $forumid!=298 does not work so, because all forums use than the showthread_new template! :(


thanks for help! :)

Freddie Bingham
11-17-2002, 02:25 AM
Try $foruminfo[forumid]

Exo
11-17-2002, 03:19 AM
thanks for help! :)


but does not work :(

N!ck
11-17-2002, 03:49 AM
$threadinfo[forumid]

Exo
11-17-2002, 03:55 AM
still the same in all forums than :confused: :confused:

Freddie Bingham
11-17-2002, 02:25 PM
Well, it would be $foruminfo[forumid] OR $threadinfo[forumid] in vB3, but I haven't looked at vB2 in such a long time. Sounds like to me, you have other issues as a forumid will never be the same in all forums. Doesn't make much sense does it?

Xenon
11-17-2002, 02:38 PM
in vb2 i think it's $thread[forumid] ;)

TECK
11-17-2002, 04:13 PM
Originally posted by Exo
Hi,

how can i check the forum id in showthread?
if ($thread['forumid'] == value) {
eval("dooutput(\"".gettemplate('showthread_new')."\");");
} else {
eval("dooutput(\"".gettemplate('showthread')."\");");
}

Exo
11-17-2002, 11:41 PM
ahhh thanks $thread[forumid] does now work! :))

Xenon
11-18-2002, 03:54 PM
you're welcome ;)

Floren, it seems we know the code of vb2 better than some devs ;)

TECK
11-19-2002, 10:20 AM
another way to write it is:
if ($thread['forumid'] == value)
{
eval('dooutput("' . gettemplate('showthread_new') . '");');
}
else
{
eval('dooutput("' . gettemplate('showthread') . '");');
}
That is more elegant because it doesn't use the ole slashes.
That's how I have coded my vbHome (lite) script.