vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Mini Mods - vb.sponsors edit for vb4 (https://vborg.vbsupport.ru/showthread.php?t=248997)

gibgib 08-28-2012 07:07 AM

Same problem here. Doesn't matter where the code is put either.

I will get my web guy to look at it & let you know the fix.

Jonathan81 08-29-2012 08:58 AM

Brilliant, thank you!

Jonathan

gibgib 09-08-2012 10:28 AM

In short this mod doesn't work in showthread, ie. on this page you are reading this from!

You can get it to work though using IF commands.
This was created by my great style guy at http://that1design.com . I recommend him big time.

You just need to edit this to suit your forum & manually update it if you gain or lose a sponsor. Forum numbers are particular to our site so you need to change them.

Forumid == put the forum number here
f=put the same forum number here

I run google ads in every other forum that does not have a local sponsor & is dependent on the usergroup.
Where it says userinfo, 1, 2, 3, 6, 4, 8, 16 : your own user group numbers that you want to have see the advert.

In showthread template
Find:
Code:

{vb:raw header}
{vb:raw navbar}
{vb:raw template_hook.showthread_above_posts}
{vb:raw poll}


Below add:
Code:

<div align="center">
<vb:if condition="$threadinfo[forumid] == 14">
<a target="_blank" title="Link's Title" href="vB.Sponsors/link.php?f=14">
<img border="0" src="http:// link to large banner.jpg">
</a>
<vb:else />
<vb:if condition="$threadinfo[forumid] == 12">
<a target="_blank" title="Link's Title" href="vB.Sponsors/link.php?f=12">
<img border="0" src="http:// link to large banner.jpg">
</a>
<vb:else />
<vb:if condition="$threadinfo[forumid] == 33">
<a target="_blank" title="Link's Title" href="vB.Sponsors/link.php?f=33">
<img border="0" src="http:// link to large banner.jpg">
</a>
<vb:else />
<vb:if condition="$threadinfo[forumid] == 17">
<a target="_blank" title="Link's Title" href="vB.Sponsors/link.php?f=17">
<img border="0" src="http:// link to large banner.jpg">
</a>
<vb:else />
<vb:if condition="$threadinfo[forumid] == 15">
<a target="_blank" title="Link's Title" href="vB.Sponsors/link.php?f=15">
<img border="0" src="http:// link to large banner.jpg">
</a>
<vb:else />
<vb:if condition="$threadinfo[forumid] == 18">
<a target="_blank" title="Link's Title" href="vB.Sponsors/link.php?f=18">
<img border="0" src="http:// link to large banner.jpg">
</a>
<vb:else />
<vb:if condition="$threadinfo[forumid] == 26">
<a target="_blank" title="Link's Title" href="vB.Sponsors/link.php?f=26">
<img border="0" src="http:// link to large banner.jpg">
</a>
<vb:else />
<vb:if condition="is_member_of($vbulletin->userinfo, 1, 2, 3, 6, 4, 8, 16)">
<!-- GOOGLE ADS 728x90 -->
<div align="center">
<script type='text/javascript'>
GA_googleFillSlot("XX_XX_XX_728x90");
</script>
</script>
</div>
</vb:if>
</vb:if></vb:if></vb:if></vb:if></vb:if></vb:if></vb:if>
</div>


brihan 10-30-2012 10:16 PM

gibgib and Ral.ly, thank you for keeping up on this issue of placing the ads on the showthread page! :up:

When I get a chance I will give it a try.

My current site also has that ads at the bottom of the showthread page and under the "Submit Post/Reply" button on the post or reply page. You can see an example here

Can I put that same code in those other locations?

Thank you!

Brihan

moustafa 12-08-2012 02:21 PM

Sponsors get a white background in forumhome, so any hint how to get the sponsors banner of same background as forumhome categories?

brihan 03-13-2013 05:23 AM

After upgrading to 4.2.0 the links to the sponsors no longer work (I also run VbSEO if this makes a difference).

When a sponsors banner is clicked is goes to a page that says...
"Invalid Redirect URL (http://www.eiipro.com/quotes/home-in...s-application/)

However the URL is correct.

Gibgib, I see you have it working on your site with 4.2.0. Will you share how you got that to work?

Thank you!

Brian

gibgib 03-13-2013 08:10 AM

Hi Brian,

You need to add the full URL of the address (advertising link you are pointing to) into the "Redirect Domain Whitelist" in the "Site Name / URL / Contact Details" in the General Settings of your board.

brihan 03-13-2013 09:03 AM

Quote:

Originally Posted by gibgib (Post 2409670)
Hi Brian,

You need to add the full URL of the address (advertising link you are pointing to) into the "Redirect Domain Whitelist" in the "Site Name / URL / Contact Details" in the General Settings of your board.

Thanks gibgib!

With your help I have been able to add all my sponsors in all the sections I want on my site. You're awesome!

Thank you,

Brian

woodchip 03-25-2013 04:01 AM

ok, Ive installed but keep getting a error:

Database error in vBulletin 4.0.2:

Invalid SQL:
INSERT INTO `vbsponsors` ( `id` , `sponsor_name` , `forum_id`, `forum`, `date` ) VALUES ( '', '', '34', 'EMS', '1364183973');

MySQL Error : Table 'ducati85_vbtest.vbsponsors' doesn't exist
Error Number : 1146
Request Date : Sunday, March 24th 2013 @ 10:59:33 PM
Error Date : Sunday, March 24th 2013 @ 10:59:33 PM
Script : http://www.ducati851and888.com/vB.Sp.../link.php?f=34
Referrer : http://www.ducati851and888.com/index.php
IP Address : 70.145.142.230
Username : Jimmy
Classname : vB_Database
MySQL Version : 5.5.28-29.3-log

Thanks for the help, Jimmy

loveyou-jesus 06-06-2022 09:03 PM

atabase error in vBulletin 4.2.5:

;

MySQL Error : Table 'ducati85_vbtest.vbsponsors' doesn't exist


All times are GMT. The time now is 05:56 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.01210 seconds
  • Memory Usage 1,750KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete