PDA

View Full Version : error with {vb:raw foruminfo.forumid}


Reks
10-23-2010, 01:24 AM
I was looking for a way to get the current forum id to use in the header template now i found somewhere saying that could use this {vb:raw foruminfo.forumid} the problem is that's empty
the code i am trying to make work is this
<script type="text/javascript">
var output;
var url = encodeURIComponent(location.pathname)
output= "<img src='headers/img.php?url="+url+"&id={vb:raw foruminfo.forumid}'>";
document.write(output)
</script> the problem is that instead of
headers/img.php?url=%2Fforumdisplay.php&id=9
i get
headers/img.php?url=%2Fforumdisplay.php&id=

can anyone help?

Lynne
10-23-2010, 02:47 AM
$foruminfo is not a variable that is registered for use in that template, so you'd have to preregister it first using a plugin.

Reks
10-23-2010, 12:30 PM
ok then what php page handles the header template?

Lynne
10-23-2010, 02:49 PM
You mean where is it rendered? Just do a search in your files for "('header'" and you'll find it in class_bootstrap.php

Reks
10-24-2010, 12:30 AM
thanks for your time its working great