The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Problem with banner code
I have this problem with this code :
<vb:if condition="$foruminfo['banner_forum_link'] AND $foruminfo['banner_forum_txt'] AND $foruminfo['banner_forum_goto']"> <p align="center"> <a target="_blank" href="{vb:raw foruminfo.banner_forum_goto}"><img alt="{vb:raw foruminfo.banner_forum_txt}" src="{vb:raw foruminfo.banner_forum_link}" border="0"></a> </p> </vb:if> Its working with with forumdisplay template but its not with showthread template I added this code to both of them but its only show with forumdisplay . This code is old hack from vb3 its for banner and its working fine with vb4 but only not showing the banners inside the threads . and I added the banner from control panel but only show the banners in forumdisplay pages . Any Idea ? |
#2
|
|||
|
|||
Do you know how the banner data is getting added to foruminfo? Maybe it's not happening in showthread.php.
|
#3
|
||||
|
||||
I have this only in the control panel :
forumdata_start Code:
$this->validfields['banner_forum_link'] = array(TYPE_STR, REQ_NO); $this->validfields['banner_forum_txt'] = array(TYPE_STR, REQ_NO); $this->validfields['banner_forum_goto'] = array(TYPE_STR, REQ_NO); |
#4
|
||||
|
||||
Any advice ?
|
#5
|
||||
|
||||
$foruminfo is not a valid variable to use in the SHOWTHREAD template. You need to use $threadinfo in there.
|
#6
|
||||
|
||||
Thansk
So just replaced this code : Code:
<vb:if condition="$foruminfo['banner_forum_link'] AND $foruminfo['banner_forum_txt'] AND $foruminfo['banner_forum_goto']"> <p align="center"> <a target="_blank" href="{vb:raw foruminfo.banner_forum_goto}"><img alt="{vb:raw foruminfo.banner_forum_txt}" src="{vb:raw foruminfo.banner_forum_link}" border="0"></a> </p> </vb:if> Code:
<vb:if condition="$threadinfo['banner_forum_link'] AND $threadinfo['banner_forum_txt'] AND $threadinfo['banner_forum_goto']"> <p align="center"> <a target="_blank" href="{vb:raw threadinfo.banner_forum_goto}"><img alt="{vb:raw threadinfo.banner_forum_txt}" src="{vb:raw threadinfo.banner_forum_link}" border="0"></a> </p> </vb:if> |
#7
|
|||
|
|||
There's got to be code somewhere that adds 'banner_forum_link' to $foruminfo. If it's not adding it to threadinfo then just using threadinfo won't work. I looked at the code you posted above but I don't see how that does it. I think there must be more code somewhere else. Is this a mod you downloaded from here?
|
#8
|
||||
|
||||
You need to add those custom fields to the $threadinfo array.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|