Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Randomly positioned ad in between postbits in showthread Details »»
Randomly positioned ad in between postbits in showthread
Version: 1.01, by UK Jimbo UK Jimbo is offline
Developer Last Online: Mar 2013 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 10-09-2005 Last Update: Never Installs: 237
Uses Plugins Template Edits
 
No support by the author.

Inspired by this hack.

The ad is positioned randomly after one of the postbits. We use this for positioning adsense ads on visordown.com.

Install the attached plugin then add the following code to your postbit or postbit_legacy template:

HTML Code:
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0">
$spacer_open 
<div style="padding:0px 0px $stylevar[cellpadding]px 0px"> 

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> 
<tr> 
	<td class="thead" align="left">Sponsored Links</td> 
</tr> 
<tr> 
	<td class="alt1" align="center">

<!-- ad code goes here -->

	</td> 
</tr> 
</table> 

</div> 
$spacer_close 
</if>

Changelog

v1.01
Bug fix: The ad code shouldn't appear on PMs any more (template change)

Donations

Hopefully this plugin will earn you provide you with some good revenue. If you'd like to show your appreciation please donate as little or as much as you like.

Supporters / CoAuthors

Show Your Support

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

Comments
  #182  
Old 05-23-2006, 05:06 PM
UK Jimbo's Avatar
UK Jimbo UK Jimbo is offline
 
Join Date: Sep 2002
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you're running in "legacy postbit" mode (user info goes at the left hand side of posts) then you need to edit the template postbit_legacy instead of postbit.

You also haven't clicked install for this mod
Reply With Quote
  #183  
Old 05-23-2006, 07:22 PM
durapuma durapuma is offline
 
Join Date: Mar 2006
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello again,

i have just restore the "postbit" template and have add the code to the postbit_lecacy template. But it don't run

Whats the problem ?

I will click on install, if it runs
Reply With Quote
  #184  
Old 05-23-2006, 07:53 PM
dssart dssart is offline
 
Join Date: May 2002
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wanted to say that this was an excellent hack. Clicked Install. Now, if it generates some cash I'd be happy to donate a little

One newbie type question that has me stumped. I want to make the ads visible to non-registered guests, Users awaiting EMail confirmation and to those who have a post total of less than 50. I know this really goes beyond the realm of this hack, but if anyone can clarify this I would be grateful. For some reason I can't grasp this and I'm sure it super-simple.

Here are my default usergroups and their Usergroup I.D.s:

(COPPA)-4
Administrators-6
Moderators-7
Registered-2
Super Moderators-5
Unregistered-1
Users Awaiting EMail Confirmation-3


Now here are my Usergroup Titles/Minimum Posts/I.D. #

New Member/0/1
Junior Member/20/2
Member/50/3
Senior Member/100/4


How can I edit the hack so that after a minimum post requirement a user can be "ad-free"?


Thanks!
Reply With Quote
  #185  
Old 05-23-2006, 10:27 PM
Stop Stop is offline
 
Join Date: Oct 2005
Location: Riyadh
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack & works fine.
Thanks Jimbo
Reply With Quote
  #186  
Old 05-23-2006, 11:46 PM
T.S. T.S. is offline
 
Join Date: Apr 2006
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dssart
Just wanted to say that this was an excellent hack. Clicked Install. Now, if it generates some cash I'd be happy to donate a little

One newbie type question that has me stumped. I want to make the ads visible to non-registered guests, Users awaiting EMail confirmation and to those who have a post total of less than 50. I know this really goes beyond the realm of this hack, but if anyone can clarify this I would be grateful. For some reason I can't grasp this and I'm sure it super-simple.

Here are my default usergroups and their Usergroup I.D.s:

(COPPA)-4
Administrators-6
Moderators-7
Registered-2
Super Moderators-5
Unregistered-1
Users Awaiting EMail Confirmation-3


Now here are my Usergroup Titles/Minimum Posts/I.D. #

New Member/0/1
Junior Member/20/2
Member/50/3
Senior Member/100/4


How can I edit the hack so that after a minimum post requirement a user can be "ad-free"?


Thanks!
I believe this would be done by adding a new usergroup and having users automatically promoted to it after 50 posts, then using the "if" by usergroup as explained earlier in the thread. Unless an "if" can be done by postcount, I am not sure.
Reply With Quote
  #187  
Old 05-24-2006, 12:06 AM
dssart dssart is offline
 
Join Date: May 2002
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks T.S., I would ideally like to keep my usergroups/usertitles and have this handled by a conditional if possible..but if that can't de done, I'll try anything.
Reply With Quote
  #188  
Old 05-24-2006, 12:14 AM
T.S. T.S. is offline
 
Join Date: Apr 2006
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dssart
Thanks T.S., I would ideally like to keep my usergroups/usertitles and have this handled by a conditional if possible..but if that can't de done, I'll try anything.
Try this
Code:
<if condition="$post[posts] >=50">

Jimbo's code

</if>
Reply With Quote
  #189  
Old 05-24-2006, 12:17 AM
dssart dssart is offline
 
Join Date: May 2002
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks T.S.!

The first "if" line would go before Jimbo's first line of code in his hack and the last would go after his last line correct?
Reply With Quote
  #190  
Old 05-24-2006, 12:19 AM
T.S. T.S. is offline
 
Join Date: Apr 2006
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by dssart
Thanks T.S.!

The first "if" line would go before Jimbo's first line of code in his hack and the last would go after his last line correct?
Correct.
Reply With Quote
  #191  
Old 05-24-2006, 12:20 AM
dssart dssart is offline
 
Join Date: May 2002
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks again..I'll give it a go tomorrow after I get home from my real job
Reply With Quote
Reply


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 02:01 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.05201 seconds
  • Memory Usage 2,314KB
  • Queries Executed 26 (?)
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
  • (1)bbcode_code
  • (1)bbcode_html
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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_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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete