vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Problem with banner code (https://vborg.vbsupport.ru/showthread.php?t=265575)

BadGuy 06-21-2011 09:13 AM

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 ?

kh99 06-21-2011 01:04 PM

Do you know how the banner data is getting added to foruminfo? Maybe it's not happening in showthread.php.

BadGuy 06-21-2011 01:25 PM

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);


BadGuy 06-26-2011 02:08 PM

Any advice ?

Lynne 06-26-2011 03:04 PM

$foruminfo is not a valid variable to use in the SHOWTHREAD template. You need to use $threadinfo in there.

BadGuy 06-27-2011 03:48 PM

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>

With this one ?

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>

I did that and nothing happend !!

kh99 06-27-2011 04:02 PM

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?

Lynne 06-27-2011 05:22 PM

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
  • Page Generation 0.01180 seconds
  • Memory Usage 1,722KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete