PDA

View Full Version : Mini Mods - vb.sponsors edit for vb4


barne77
08-19-2010, 10:00 PM
Hi all i have editied the vb.sponsors so that i can use it with VB4 this is the vb.sponsors Mod and i can not take the credit for the actual mod only the edit

hope it helps

for demo of this please goto my site (http://www.middlads.com/Portal/forum.php)

Dont forget to mark as installed

Product Installation

1.Extract the contents of vB.Sponsors.vb4.zip to your computer

2.Open upload/vB.Sponsors/link.php in notepad, wordpad or similar editor.

3.On line 32, enter the path to your forum. This is the physical path not the URL. If your forum is located in /usr/com/userid/forums/, the path would be /usr/com/userid/forums/. You can find the physical path to your forum directory by uploading the settings-check.php file that is located in the do not upload/vB.Sponsors directory. Upload this to the vB.Sponsors directory on your web site. To run it, simply browse to http://www.EXAMPLE.com/vB.Sponsors/settings-check.php in your browser. Please delete this file when you are done.

4.Upload the files in the upload directory to the corresponding directory on the web server under the forum directory.

5.Open the Admin CP of your board. On the left hand side scroll down to Plugins & Products.

6.Click on Manage Products.

7.Click on Add/Import Product.

8.Click on Browse... and choose the product-vB.Sponsors.xml file.

9.Click Import.

10.template mod

GOTO
__________________________________________________ _______________

forumhome_forumbit_level2_post

FIND:


class="viewing">({vb:raw forum.browsers} {vb:rawphrase viewing})</span></vb:if>
</div>


ADD, AFTER:

<!-- barne77 -->
<!-- vBSponsors -->
<vb:if condition="$forum['sponsor_enabled'] == 1 AND $vboptions ['sponsor_global_enable_sponsorship'] == 1">
<div style="float:$stylevar[right]">
{vb:raw vboptions.sponsor_global_default_text}
<a href="vB.Sponsors/link.php?f={vb:raw forum.forumid}" title="{vb:raw forum.sponsor_name}" target="_blank">
<vb:if condition="$forum['sponsor_banner_enabled'] == 1 AND $vboptions['sponsor_global_enable_banners'] == 1">
<img src="{vb:raw forum.sponsor_banner}" border="0" />
<vb:else />
{vb:raw forum.sponsor_name}
</vb:if>
</div>
</a>
</vb:if>
<!-- / vBSponsors -->
<!-- barne77 -->


__________________________________________________ _______________
goto FORUMDISPLAY

FIND:

<div class="threadpagenav">
{vb:raw pagenav}
<div id="threadpagestats" class="threadpagestats">{vb:rawphrase showing_threads_x_to_y_of_z, {vb:raw limitlower}, {vb:raw limitupper}, {vb:raw totalthreads}}</div>
</div>
</vb:if>
</div>

ADD, AFETR:

<!-- barne77 -->
<!-- vBSponsors -->
<vb:if condition="$foruminfo['sponsor_enabled'] == 1 AND $vboptions['sponsor_global_enable_sponsorship'] == 1">
{vb:raw vboptions.sponsor_global_default_text}
<a href="vB.Sponsors/link.php?f={vb:raw foruminfo.forumid}" title="{vb:raw foruminfo.sponsor_name}" target="_blank">
<vb:if condition="$foruminfo['sponsor_banner_enabled'] == 1 AND $vboptions['sponsor_global_enable_banners'] == 1">
<vb:if condition="!empty($foruminfo['sponsor_banner_big'])">
<vb:if condition="$vboptions['sponsor_global_enable_big_banners'] == 1">
<img src="{vb:raw foruminfo.sponsor_banner_big}" border="0" />
<vb:else />
<img src="{vb:raw foruminfo.sponsor_banner}" border="0" />
</vb:if>
<vb:else />
{vb:raw foruminfo.sponsor_name}
</vb:if> </vb:if> </a> </vb:if>
<!-- / vBSponsors -->
<!-- barne77 -->
__________________________________________________ _______________
GOTO
forumhome_forumbit_level1_post

FIND:


<ol class="subforumlist commalist">
{vb:raw forum.subforums}
</ol>
</div>
</vb:if>


AFTER, ADD:


<!-- barne77 -->
<!-- vBSponsors -->
<vb:if condition="$forum['sponsor_enabled'] == 1 AND $vboptions ['sponsor_global_enable_sponsorship'] == 1">
<div style="float:$stylevar[right]">
{vb:raw vboptions.sponsor_global_default_text}
<a href="vB.Sponsors/link.php?f={vb:raw forum.forumid}" title="{vb:raw forum.sponsor_name}" target="_blank">
<vb:if condition="$forum['sponsor_banner_enabled'] == 1 AND $vboptions['sponsor_global_enable_banners'] == 1">
<img src="{vb:raw forum.sponsor_banner}" border="0" />
<vb:else />
{vb:raw forum.sponsor_name}
</vb:if>
</div>
</a>
</vb:if>
<!-- / vBSponsors -->
<!-- barne77 -->


__________________________________________________ _______________
GOTO
forumhome_forumbit_level1_nopost

FIND:


<ol class="subforumlist commalist">
{vb:raw forum.subforums}
</ol>
</div>
</vb:if>
</div>
</vb:if>
</div>

AFTER, ADD:

<!-- barne77 -->
<!-- vBSponsors -->
<vb:if condition="$forum['sponsor_enabled'] == 1 AND $vboptions ['sponsor_global_enable_sponsorship'] == 1">
<div style="float:$stylevar[right]">
{vb:raw vboptions.sponsor_global_default_text}
<a href="vB.Sponsors/link.php?f={vb:raw forum.forumid}" title="{vb:raw forum.sponsor_name}" target="_blank">
<vb:if condition="$forum['sponsor_banner_enabled'] == 1 AND $vboptions['sponsor_global_enable_banners'] == 1">
<img src="{vb:raw forum.sponsor_banner}" border="0" />
<vb:else />
{vb:raw forum.sponsor_name}
</vb:if>
</div>
</a>
</vb:if>
<!-- / vBSponsors -->
<!-- barne77 -->

__________________________________________________ _______________

dadams982
08-20-2010, 12:54 PM
Is this one able to do the between forum topic banners as well... I remember the old one had that functionality built in.

Thanks for the port.

barne77
08-20-2010, 01:29 PM
have only editied the one in the pics upto now but will update when i done the others. First time doing any kind of editing taking me a while lol

barne77
08-20-2010, 02:15 PM
Should be ok now have done all the edits

Wayne@R32oc
08-21-2010, 08:59 AM
works great, been waiting for someone to do this! thanks alot.

masterweb
08-22-2010, 09:16 AM
Installed without problems, thanks dude it looks great Lol.

ChaFF
08-23-2010, 08:54 PM
When I click on banner, it refers to domain.com/vB.Sponsors/link.php?f=1 (Oops! This link appears to be broken) even though I've pointed Sponsor URL to http://www.example.com.
Please advise

barne77
08-24-2010, 07:20 AM
when you click on the banner yes it should show as link above but should then read this from your input in the admin pannel check your code as it works fine on mine.

the bit of code that does this is


<a href="vB.Sponsors/link.php?f={vb:raw forum.forumid}" title="{vb:raw forum.sponsor_name}" target="_blank">


barne77

ChaFF
08-24-2010, 10:05 AM
found what was wrong... in a path =) cheers. nominated!
next step would be to add functionality rotate banners? =)

Dragonsys
09-01-2010, 05:58 PM
Is this from this mod - https://vborg.vbsupport.ru/showthread.php?t=245691

Mr Peabody
09-11-2010, 02:22 AM
Thank you!

Lynne
09-11-2010, 03:13 AM
Did you get permission from the developer to post this? You cannot just upload an edit to somebody else's mod without their permission.

DannyITR
10-11-2010, 01:47 PM
I know I'll find the answer right after I post this but where the heck do you add the banners? I don't see the option in the forums& moderators edit page where it used to be.

DannyITR
10-11-2010, 01:55 PM
And the answer to my question was that my product was turned off from before. You need to turn it back on.

DannyITR
10-11-2010, 03:03 PM
I need help with vbulletin 4 coding. In the template edits it calls a variable:

{vb:raw vboptions.sponsor_global_default_text}

I'm trying to change the phrase and I can't do it. First of all, a search of phrases tells me I only have a variable called :

Standard Phrase: setting_sponsor_global_default_text_desc

which does not match the name does it? Its not changing the text so it must not be the correct one but there are no others. Why won't it change the text?

animalhouse
10-16-2010, 06:47 AM
I can't find where to add the sponsors either. Anybody?

Wayne@R32oc
10-31-2010, 08:05 PM
Anyone know why on my site (http://www.r32oc.com/) the banners are not aligning to the right?

ChaFF
12-28-2010, 05:38 PM
Anyone know why on my site (http://www.r32oc.com/) the banners are not aligning to the right?

Good shout. It would be cool if coder could take it into account and move sponsors to the right, closer to subscribe button
Also i reckon it's better to move Sponsorship text "Forum Sponsored By:" from left to the top (on top of banner)

speedracer68
02-05-2011, 01:20 PM
Anyone know why this does not show up in my admin panel?

speedracer68
02-05-2011, 02:03 PM
Oh, I forgot I also get this error when importing the product

MySQL Error : Incorrect key file for table './protour_vb4/datastore.MYI'; try to repair it
Error Number : 126
Request Date : Saturday, February 5th 2011 @ 07:57:05 AM
Error Date : Saturday, February 5th 2011 @ 07:57:05 AM

speedracer68
02-07-2011, 02:42 AM
After a database repair all is well. Never mind the two posts about.

I know this was asked before but is there any way to right justify the banners?

demo7up
04-26-2011, 06:00 PM
i love this edit but its screwing up my vbshout admincp panel

the directive in link.php which changes the directory

/********************
* Modify this to reflect the path to you forums*/
chdir('/home/nycjdm/public_html/');

require_once('./global.php');


Is also changing the directory for my other plugin so the other plugin does not find its own files.. is there a way to fix this?

demo7up
04-27-2011, 01:11 AM
damn.....

madkeen
05-27-2011, 06:13 AM
Can not get this to display teh banner

It show "Forum Sponsored by"

I get the following html code inserted

<!-- barne77 -->
<!-- vBSponsors -->

<span class="smallfont">Forum Sponsored By:</span>
<a href="vB.Sponsors/link.php?f=65" title="" target="_blank">



</a>
<!-- / vBSponsors -->
<!-- barne77 -->

but nothing else

Anyone able to help please?

madkeen
05-31-2011, 11:49 PM
Can get banners working, but not google adsense.

Anyone able to help with this?

brihan
06-10-2011, 09:46 PM
First off, Thank you very much barne77 for modifying this mod. I could not bump up to VB4 until I could get this working for all my advertisers.

I do have 2 small issues that I hope you or someone else can help me with.

1) In the ACP global settings menu tab is not displaying the correct text and when you click on it there is no text in the global settings area. See picture below.

https://vborg.vbsupport.ru/external/2011/08/2.jpg

2) I would like to remove "Forum Sponsored By" but I can not figure out how. I have done a search for the phrase and I find it but when I try to change the text in the box below nothing happens, it still says "Forum Sponsored By:

Am doing this in the wrong area?

https://vborg.vbsupport.ru/external/2011/08/3.jpg


And for the person who did not know where to include the ads, go to

Forums & Moderators -> Forum manager ->

Click on the forum you want to include the sponsorship in and scroll to the bottom of the page.

Thanks in advance for any help anyone can provide.

DannyITR
08-31-2011, 02:13 PM
First off, Thank you very much barne77 for modifying this mod. I could not bump up to VB4 until I could get this working for all my advertisers.

I do have 2 small issues that I hope you or someone else can help me with.

1) In the ACP global settings menu tab is not displaying the correct text and when you click on it there is no text in the global settings area. See picture below.

https://vborg.vbsupport.ru/external/2011/08/2.jpg

2) I would like to remove "Forum Sponsored By" but I can not figure out how. I have done a search for the phrase and I find it but when I try to change the text in the box below nothing happens, it still says "Forum Sponsored By:

Am doing this in the wrong area?

https://vborg.vbsupport.ru/external/2011/08/3.jpg


And for the person who did not know where to include the ads, go to

Forums & Moderators -> Forum manager ->

Click on the forum you want to include the sponsorship in and scroll to the bottom of the page.

Thanks in advance for any help anyone can provide.



To remove the text I removed this text from the templates:

{vb:raw vboptions.sponsor_global_default_text}

I tried using this for subforums but when I click on the banner I get an invalid redirect URL for some reason. Anyone else having this problem?

DannyITR
08-31-2011, 03:09 PM
With the new vbulletin 4.1.4 patch ALL links need to be added to the whitelist for them to work.

Wayne@R32oc
09-29-2011, 08:04 AM
Anyone getting "Invalid Redirect Errors" since updating? All of the banner links are now coming up with this error :(

Rather than tracking the stats id be happy to just have them static links if anyone can show me how?

pecky
11-26-2011, 05:59 PM
To get the banners to align right in 4.1.8 and probably other versions

change
<div style="float:$stylevar[right]">
to
<div style="float:right">

Only thing I found that made it work.

wickedstangs
01-15-2012, 02:07 PM
Anyone getting "Invalid Redirect Errors" since updating? All of the banner links are now coming up with this error :(

Rather than tracking the stats id be happy to just have them static links if anyone can show me how?

To fix it.. Go to Settings > Options > Disable Redirect Domain Checking > Yes

To get the banners to align right in 4.1.8 and probably other versions

change

to


Only thing I found that made it work.

Thank You Works great...

Mike Bucy
01-27-2012, 04:14 AM
I'm currently in the process of upgrading my site from 3.6.4 to 4.x.

I've used the VB3 version of VBSponsors for quite some time now and love it.

It there a way to upgrade keeping the old VBSponsors in tact?

Thanks

wickedstangs
01-27-2012, 04:25 AM
I'm currently in the process of upgrading my site from 3.6.4 to 4.x.

I've used the VB3 version of VBSponsors for quite some time now and love it.

It there a way to upgrade keeping the old VBSponsors in tact?


Thanks

Works the same I think..

brihan
02-22-2012, 07:53 AM
Before I can upgrade from 3.8.7 to 4.x I need to be able to get my big sponsor banners to appear at the top and bottom of each individual thread as well as by the submit button(s) when posting a new thread or reply.

I have it that way on my current board and need to keep it that way because all the sponsors are promised that much exposure.

On my current board I thought that all I did was take the vBSponsors code for the big banners and place it in the correct locations for where I wanted the banners to appear. I have tried this on my 4.x test board and no banner appears.

You can see all my banner placements here:
http://www.inspectionnews.net/home_inspection

Has anyone figured out how to do this with 4.x?

Thank you,

Brian

brihan
02-23-2012, 06:27 AM
Just checking back. The above post is really important to me.

Thanks,

Brian

brihan
03-01-2012, 09:11 PM
Anyone?

I can't believe that I was able to get the VB.Sponsors to show up in all desired areas of my VB 3.8.7 (I'm not that good at this stuff) and no one can figure out how to do it in VB 4.X.

It is so important to have the sponsors throughout all the threads and post/reply sections. Someone with the brains has to be able to figure this out.

I know where to put the code but there must be some small change to the code to make it work in the threads & post/reply sections.

This is holding me up from going live with my new board. Got to keep the advertisers happy.

If anyone has any suggestions I would be forever grateful.

Thank you,

Brian

brihan
03-07-2012, 12:19 AM
Has everyone moved away from vBulletin and/or vb.sponsors? If so, where did you go and what are you using for your sponsorship/advertising?

Hard to believe no one is using/supporting this anymore.

Seems a shame as all I need is just a little more functionality to get the sponsors banners in the threads and new post/reply areas like I currently have it with my 3.6.5 board.

Any help or suggestions would be greatly appreciated.

Thanks,

Brian

Mike Bucy
03-07-2012, 03:36 AM
I have upgraded to 4.1.11 and it works great. No problems here.

Just reconfigure the images and away you go.

Sample: www.v8buick.com

Hostboard
03-07-2012, 12:21 PM
Well this is a "re-write" of the original authors work to work in VB4 and is noted as being unsupported. There is no mention that I have seen (did not read all the threads) that he had permission to re-release this. However if you look at the last supported release by the original author he does show a link to Twitter noting (end of Feb) that he is going to release a VB4 version.

YMMV

I am now actualy in need of something like this too...

brihan
03-07-2012, 05:23 PM
Hi guys,

Thank you very much for your replies. It was getting lonely in here replying to myself.

Mike, I took a look at your site (very nice by the way) and I do see your sponsored ads.

I was able to get that far as well but what I need to figure out is how to get the ads on the thread pages and post/reply pages. This gives the sponsors MUCH more bang for their buck and they do pay more.

Here is an example (comparison) between one of your sponsored threads and one on my current board.

http://www.v8buick.com/showthread.php?228278-core-support

http://www.inspectionnews.net/home_inspection/attic-areas-home-inspection-commercial-inspection/25393-missing-ties-attic-framing.html

You can see that the Atlantic City Inspection Conference banner is at the top and bottom of the thread page. This is what I need to have on my 4.x board as well.

I have done the exact same thing on my 4.x as I have on my 3.6.5 but I'm not getting the banners to show.

Hostboard
03-07-2012, 06:18 PM
Have you tried using the advertising ability of VB4 yet? I use that for all my banners as you can directly control who and where they are displayed. I even go 1 step further uning OpenX as my ad server so I can track click throughs and the amount of times the banner is displayed. Plus manging the banners on a per advertiser is incredibly easier. Between the 2 you should be able to manage your banenrs much much easier.

I want to use vb.sponsers to place images next to/under the title to certain forums as added exposure.

popmyzit
06-03-2012, 01:24 AM
Thanks works with exception of needing a hack for adsense. There is some code missing which can be added to get Google adsense to work.

My main issue is the mod doesn't show on individual threads - even after modifying showthread template and adding the code - it used to in 3.8x

I think im going to use the built in vbulletin ad manager for that as I found two issues:

- link for digitaldeviation in footer as well as google adsense code:


google_ad_client = "pub-0851814186705981";
google_ad_output = "textlink";
google_ad_format = "ref_text";
google_cpa_choice = "CAAQnfzw4AIaCJwZC9ix5DwoKN2uuIEBMAA";
google_ad_channel = "3505039413";


which is still in the plugin, not sure exactly where if/it shows.

Pessimist
07-01-2012, 12:31 PM
To get the banners to align right in 4.1.8 and probably other versions

change

to


Only thing I found that made it work.
This is not 100% correct :)

Right version:

change
<div style="float:$stylevar[right]">
to
<div style="float:{vb:stylevar right}">

vivapotenza
07-17-2012, 10:33 PM
This is not working correctly for me in VB 4.2.0.

IT displays the small banners correctly as I want, but produces an internal500 error when you click it, does not forward to the external web address as it should. (I tried adding the desired site to the whitelist, and also Disabled Redirect Domain Checking, but neither of these things had any effect).

what happens is when you click it tries to find "http://www.mysite.com/vB.Sponsors/link.php?f=forumnumber" instead of the desired site.

Can anyone offer any guidance on this?

vivapotenza
07-18-2012, 07:39 PM
Right, Ive got that working now, all working good.

However, im now having difficulty getting the image to align properly to the right where I want it. I have edited my template as per post #43 above to get it to align right.

Is there anyway I can have it move all the way to the right, to where the "subscribe" ticks used to be? and also can I have the text on the left in line with the image on the right, rather than the image pushing the text to the next line down?

you can see what the current state of play is, and also what im trying to achieve here (Ive disabled this on my site until i can come to a resolution close to what I want):

https://vborg.vbsupport.ru/external/2012/07/26.jpg

thanks for any help, pulling my hair out trying to think of the answer, i bet its fairly simple as well.

vivapotenza
07-19-2012, 05:19 PM
anyone? there must be someone who knows enough about css to move an image over like above?

vivapotenza
07-19-2012, 08:26 PM
solution found here for future reference:

https://www.vbulletin.com/forum/showthread.php/404645-adding-another-column-onto-the-main-forum-only?p=2316133#post2316133

ScottishScoobie
07-28-2012, 10:02 AM
So, downloaded, unpacked, edited forum location. uploaded, imported plugin, see it in the ACP however when i expand vb.sponsors manager all i see is "View Statistics"

nothing more. have i gone wrong somewhere ?

When i edit a forum/section i can see the forum sponsor choices when populated, i see nothing.

its driving me nuts.

ScottishScoobie
07-29-2012, 01:38 PM
bump, anyone to support, dont mind rewarding you for your time if its successful.

Jonathan81
08-03-2012, 06:50 PM
Right, Ive got that working now, all working good.

However, im now having difficulty getting the image to align properly to the right where I want it. I have edited my template as per post #43 above to get it to align right.

Is there anyway I can have it move all the way to the right, to where the "subscribe" ticks used to be? and also can I have the text on the left in line with the image on the right, rather than the image pushing the text to the next line down?

you can see what the current state of play is, and also what im trying to achieve here (Ive disabled this on my site until i can come to a resolution close to what I want):

thanks for any help, pulling my hair out trying to think of the answer, i bet its fairly simple as well.

Anyone know how to fix this issue with the right alignment? (hope you don't mind me using your site to highlight this vivapotenza):

http://www.vivapotenza.com/forumdisplay.php?32-The-Market-Place

Jonathan81
08-03-2012, 07:12 PM
Another question...anyone know how to centre the large banner displayed on the thread listing?

Jonathan81
08-04-2012, 10:53 AM
Another question...anyone know how to centre the large banner displayed on the thread listing?

Managed to sort this out. Just trying to fix this issue now...

Anyone know how to fix this issue with the right alignment? (hope you don't mind me using your site to highlight this vivapotenza):

http://www.vivapotenza.com/forumdisplay.php?32-The-Market-Place

You can also see this highlighted at:

http://www.rallyforums.com/forum/forumdisplay.php?3-Irish-British-and-World-Rallying

Can anyone help?

Jonathan

ScottishScoobie
08-11-2012, 05:11 AM
ok, no replies, i will have to go this alone and have a stab in the dark at it.

can anyone tell me where i will find the 4 files for the styles that require editing as this is what i think im missing. everything else seems to be there.

ScottishScoobie
08-11-2012, 02:27 PM
ok found how to find the files, i was searching for the code in the search box not the name of the file.

so i find all 4 files.

FORUMDISPLAY code has been found and your code added
forumhome_forumbit_level1_nopost Does not contain the code you say to find
forumhome_forumbit_level1_post Does not contain the code you say to find
forumhome_forumbit_level2_post code has been found and your code added

Still nothing is showing even though enabled, so im guessing its to do with the level1 files.

people must be subscribed to this forum, why does no one help ? im not gobby, im just so frustratingly close but everyone thats asked questions for help and has got it working, wont reply to help.

ScottishScoobie
08-11-2012, 06:07 PM
I pasted the code in where i thought it should go and it works but not voting for mod of the month, as there has been zero support on it. still installed though.

ScottishScoobie
08-14-2012, 06:24 AM
Another question...anyone know how to centre the large banner displayed on the thread listing?

How ? would have been good, having the same issue myself. would prefer it centre rather than left. ;):up:

Jonathan81
08-18-2012, 06:46 AM
Before I can upgrade from 3.8.7 to 4.x I need to be able to get my big sponsor banners to appear at the top and bottom of each individual thread as well as by the submit button(s) when posting a new thread or reply.

I have it that way on my current board and need to keep it that way because all the sponsors are promised that much exposure.

On my current board I thought that all I did was take the vBSponsors code for the big banners and place it in the correct locations for where I wanted the banners to appear. I have tried this on my 4.x test board and no banner appears.

You can see all my banner placements here:
http://www.inspectionnews.net/home_inspection

Has anyone figured out how to do this with 4.x?

Thank you,

Brian

Anyone have an answer to this at all?

As per previous poster, I think I know where to add the code (Showthread) but when added, nothing appears. Looking at the source code, all I can see are the comments:


<!-- barne77 -->
<!-- vBSponsors -->

<!-- / vBSponsors -->
<!-- barne77 -->

This must be something relatively simple? An extra bit of code needed somewhere?

Jonathan81
08-18-2012, 07:07 AM
How ? would have been good, having the same issue myself. would prefer it centre rather than left. ;):up:

I can't remember now but looking back at the files, it looks like I've changed (in FORUMDISPLAY) this:

<img src="{vb:raw foruminfo.sponsor_banner_big}" border="0" />

to this:

<div align="center"><img src="{vb:raw foruminfo.sponsor_banner_big}" border="0" /></div>

I also appear to have put div tags around this:

<div><img src="{vb:raw foruminfo.sponsor_banner}" border="0" /></div>

Hope that helps?

Jonathan81
08-18-2012, 08:03 AM
Anyone have an answer to this at all?

As per previous poster, I think I know where to add the code (Showthread) but when added, nothing appears. Looking at the source code, all I can see are the comments:


<!-- barne77 -->
<!-- vBSponsors -->

<!-- / vBSponsors -->
<!-- barne77 -->

This must be something relatively simple? An extra bit of code needed somewhere?

To clarify, why does the following code work in forumhome_forumbit_level1_post, forumhome_forumbit_level2_post etc but not in SHOWTHREAD?

<!-- barne77 -->
<!-- vBSponsors -->
<vb:if condition="$forum['sponsor_enabled'] == 1 AND $vboptions ['sponsor_global_enable_sponsorship'] == 1">
<div style="float:$stylevar[right]">
{vb:raw vboptions.sponsor_global_default_text}
<a href="vB.Sponsors/link.php?f={vb:raw forum.forumid}" title="{vb:raw forum.sponsor_name}" target="_blank">
<vb:if condition="$forum['sponsor_banner_enabled'] == 1 AND $vboptions['sponsor_global_enable_banners'] == 1">
<img src="{vb:raw forum.sponsor_banner}" border="0" />
<vb:else />
{vb:raw forum.sponsor_name}
</vb:if>
</div>
</a>
</vb:if>
<!-- / vBSponsors -->
<!-- barne77 -->

Jonathan81
08-24-2012, 08:40 AM
Anyone?

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:
{vb:raw header}
{vb:raw navbar}
{vb:raw template_hook.showthread_above_posts}
{vb:raw poll}


Below add:
<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 (http://www.inspectionnews.net/home_inspection/exterior-systems-home-inspection-commercial-inspection/32542-patio-cover-attached-fascia-looks-unsound.html)

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-inspectors-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
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.Sponsors/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