vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Randomly positioned ad in between postbits in showthread (https://vborg.vbsupport.ru/showthread.php?t=98057)

UK Jimbo 10-09-2005 10:00 PM

Randomly positioned ad in between postbits in showthread
 
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.

https://vborg.vbsupport.ru/external/2010/02/12.gif

Wachtmeister 10-10-2005 07:44 PM

I'll give this one a try, because the "Adsense after first post" did not work with Firefox at "Quick Reply". Thanks for releasing this one.

edit: works perfect.

dieselpowered 10-10-2005 08:20 PM

I had the same problem with the adsense code affecting the functionality of AJAX. Quick reply would work ONLY if you did not have to click to activate it. One thing you may want to test is to attempt to click quick reply in a post AFTER the display of the adsense and see if it works.

The code I have now will allow you to click quick reply in a post above the adsense, however, not in a post below it.

If this works I will be using it :)

DeeperImage 10-11-2005 01:53 AM

I've installed the plugging and the code and this is not working, What am I doing wrong? Thanks.

It just doesn't show up.

auz1111 10-11-2005 02:28 AM

nice one! just wish we could add/edit the ads without going into the template.

hbalagh1 10-11-2005 03:35 AM

can you select certain usergroups not to see this?

Keyser S?ze 10-11-2005 04:57 AM

yea i got the same question, id prefer only guests see the ads, not logged in members, i get more guests than anything

GrendelKhan{TSU 10-11-2005 05:01 AM

mandatory "is there a screen shot?" request. ;) :p

Doc Great 10-11-2005 08:38 AM

To make only guest see the ads take this code and add it at the end of the postbit (_legacy) template.

Code:

<if condition="in_array($bbuserinfo[usergroupid], array(1))">
<if condition="$GLOBALS['adsense_position'] == $post['postcount']">
$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>
</if>

@UK Jimbo, do you allow me to translate/modify and post this modification @ www.vbhacks-germany.com (of course with your copyright)? :)

UK Jimbo 10-11-2005 09:36 AM

Thanks for posting the usergroup variation Doc Great. I've got no issues with you re-posting the code elsewhere as long as it's not being sold!


All times are GMT. The time now is 08:33 AM.

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.03885 seconds
  • Memory Usage 1,745KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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