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
  #92  
Old 01-01-2006, 12:17 PM
kommuni kommuni is offline
 
Join Date: Apr 2004
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RasMasta
Awesome thanks.
Quote:
I have no idea what the difference is, but this plugin worked for me in v3.5.2 in the postbit_legacy template.
there are two "styles" to display posts in vbulletin- one of both has the avatar and information about a user above his/her post (the default setting) the other "old style" is the one wich shows it on the left like here in this forums. That's the difference.

Awesome idea - i hope that will pull up my click-through rate a bit...

*installed*
Reply With Quote
  #93  
Old 01-05-2006, 03:20 PM
PolyMarauder's Avatar
PolyMarauder PolyMarauder is offline
 
Join Date: Sep 2004
Location: gamingartist.com
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Brilliant? Absolutely Brilliant?

Cheers! (installed)

Here is my thank you? enjoy

Reply With Quote
  #94  
Old 01-05-2006, 10:31 PM
lochie lochie is offline
 
Join Date: Aug 2004
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this deffinetly work with 3.5.3? I've installed it and it doesn't appear at al;l no matter which of the 2 postbits I put the code in. I'm having some issues with my skin since upgrading and not sure if this is all connected.

I know it's for 3.5.2 but wasn't sure if it's just not compatible with my version or caused by my other issues.
Reply With Quote
  #95  
Old 01-06-2006, 12:16 PM
PolyMarauder's Avatar
PolyMarauder PolyMarauder is offline
 
Join Date: Sep 2004
Location: gamingartist.com
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I usually just do the patches and wait a week or so to see if there are any issues like this. I have to admit though with the new plugin system it will be a lot easier to do a global update. For me now its not a matter of reinstalling my hacks it’s more of will they work with the next version. Anyway I too would like to know if anyone else is having an issue.
Reply With Quote
  #96  
Old 01-10-2006, 02:56 PM
neutek neutek is offline
 
Join Date: Mar 2003
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks 1st of all
this works fine for me to show to everyone - i can see ads

but doesnt work for me when i change to this - (so usergroups cannot see)

Code:
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0 && is_member_of($bbuserinfo,array(1,2,3))">


my code:
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">
<!-- MY AD CODE HERE -->
	</td> 
</tr> 
</table> 
</div> 
$spacer_close 
</if>
i would really like some help
just want certain usergroups not to be able to see
Reply With Quote
  #97  
Old 01-13-2006, 02:25 PM
TitanJeff's Avatar
TitanJeff TitanJeff is offline
 
Join Date: Jul 2002
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just installed and lovin' it. Mine also needed to go to the postbit-legacy.

I do have one question. I have a space below my ad and my other posts don't have that. If possible, I would like to remove that space below my ad. Anyone know how?
Reply With Quote
  #98  
Old 01-14-2006, 04:01 PM
adobepoint adobepoint is offline
 
Join Date: Jan 2006
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to post the ads on top of the first post?
Reply With Quote
  #99  
Old 01-15-2006, 05:40 AM
PolyMarauder's Avatar
PolyMarauder PolyMarauder is offline
 
Join Date: Sep 2004
Location: gamingartist.com
Posts: 37
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TitanJeff
I have a space below my ad and my other posts don't have that. If possible, I would like to remove that space below my ad. Anyone know how?
I don't know for sure but I think if you remove the "$spacer_close" part at the end of the code that will get rid of the space.
Reply With Quote
  #100  
Old 01-15-2006, 01:19 PM
TitanJeff's Avatar
TitanJeff TitanJeff is offline
 
Join Date: Jul 2002
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

A little help for a newbie.

I got this working great and then wanted to set it up to show up only for guests, etc.

I got this error after making the change:
The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/jfuqua/public_html/goForum/includes/adminfunctions_template.php(3532) : eval()'d code on line 223

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Here's what I added:
<!-- / post #$post[postid] -->
<if condition="is_member_of($bbuserinfo,array(2,5,6,7) )">
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

My goal is for groups 2,5,6,7 to not see the ads.

Where did I goof? Thanks.
Reply With Quote
  #101  
Old 01-15-2006, 03:12 PM
TitanJeff's Avatar
TitanJeff TitanJeff is offline
 
Join Date: Jul 2002
Posts: 208
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by PolyMarauder
I don't know for sure but I think if you remove the "$spacer_close" part at the end of the code that will get rid of the space.
Thanks but that didn't take care of it for me.
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:22 AM.


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.04798 seconds
  • Memory Usage 2,321KB
  • 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
  • (2)bbcode_code
  • (1)bbcode_html
  • (4)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