![]() |
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 ? |
Do you know how the banner data is getting added to foruminfo? Maybe it's not happening in showthread.php.
|
I have this only in the control panel :
forumdata_start Code:
$this->validfields['banner_forum_link'] = array(TYPE_STR, REQ_NO); |
Any advice ?
|
$foruminfo is not a valid variable to use in the SHOWTHREAD template. You need to use $threadinfo in there.
|
Thansk
So just replaced this code : Code:
<vb:if condition="$foruminfo['banner_forum_link'] AND $foruminfo['banner_forum_txt'] AND $foruminfo['banner_forum_goto']"> Code:
<vb:if condition="$threadinfo['banner_forum_link'] AND $threadinfo['banner_forum_txt'] AND $threadinfo['banner_forum_goto']"> |
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?
|
You need to add those custom fields to the $threadinfo array.
|
All times are GMT. The time now is 08:16 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|