Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
vb.sponsors edit for vb4 Details »»
vb.sponsors edit for vb4
Version: 1.01, by barne77 barne77 is offline
Developer Last Online: May 2013 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.0.x Rating:
Released: 08-19-2010 Last Update: 08-19-2010 Installs: 44
 
No support by the author.

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

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:


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

ADD, AFTER:

PHP Code:
<!-- 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:

PHP Code:
<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:

PHP Code:
<!-- 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:

PHP Code:
<ol class="subforumlist commalist">
                                        {
vb:raw forum.subforums}
                                    </
ol>
                                </
div>
                            </
vb:if> 
AFTER, ADD:

PHP Code:
<!-- 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:

PHP Code:
<ol class="subforumlist commalist">
                    {
vb:raw forum.subforums}
                </
ol>
            </
div>
            </
vb:if>
        </
div>
        </
vb:if>
</
div
AFTER, ADD:

PHP Code:
<!-- 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 --> 
__________________________________________________ _______________

Download Now

File Type: zip vb.sponsors.vb4.zip (198.6 KB, 268 views)

Screenshots

File Type: jpg forum-category-sponsors VB4 2 .jpg (12.9 KB, 0 views)
File Type: jpg admincp-global-settings.jpg (65.7 KB, 0 views)
File Type: jpg forumscfg.jpg (91.9 KB, 0 views)
File Type: jpg forum.jpg (35.6 KB, 0 views)
File Type: jpg cats.jpg (37.4 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #62  
Old 08-28-2012, 07:07 AM
gibgib gibgib is offline
 
Join Date: Nov 2003
Location: Maroochydore, Australia
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #63  
Old 08-29-2012, 08:58 AM
Jonathan81 Jonathan81 is offline
 
Join Date: May 2007
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Brilliant, thank you!

Jonathan
Reply With Quote
  #64  
Old 09-08-2012, 10:28 AM
gibgib gibgib is offline
 
Join Date: Nov 2003
Location: Maroochydore, Australia
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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>
Reply With Quote
  #65  
Old 10-30-2012, 10:16 PM
brihan brihan is offline
 
Join Date: Jan 2006
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #66  
Old 12-08-2012, 02:21 PM
moustafa moustafa is offline
 
Join Date: Oct 2008
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sponsors get a white background in forumhome, so any hint how to get the sponsors banner of same background as forumhome categories?
Reply With Quote
  #67  
Old 03-13-2013, 05:23 AM
brihan brihan is offline
 
Join Date: Jan 2006
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #68  
Old 03-13-2013, 08:10 AM
gibgib gibgib is offline
 
Join Date: Nov 2003
Location: Maroochydore, Australia
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #69  
Old 03-13-2013, 09:03 AM
brihan brihan is offline
 
Join Date: Jan 2006
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by gibgib View Post
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
Reply With Quote
  #70  
Old 03-25-2013, 04:01 AM
woodchip woodchip is offline
 
Join Date: Jul 2007
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #71  
Old 06-06-2022, 09:03 PM
loveyou-jesus loveyou-jesus is offline
 
Join Date: Dec 2009
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

atabase error in vBulletin 4.2.5:

;

MySQL Error : Table 'ducati85_vbtest.vbsponsors' doesn't exist
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:02 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05393 seconds
  • Memory Usage 2,397KB
  • Queries Executed 28 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (8)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (6)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete