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-12-2005 09:04 AM

Magic. PEBKAC.

dsotmoon 10-12-2005 05:23 PM

install, thanks for this Jimbo, works perfectly

dsotmoon 10-13-2005 01:05 AM

one last question, i think, what would I add to the following to keep this from showing in certain forums...

Code:

<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0 && is_member_of($bbuserinfo,array(1,2,3,4,8,9,11,14,15,19))">

Doc Great 10-13-2005 08:12 AM

I did (it again :D) --> a little modification to show all guests Ad, but let the reg. users choose if they want to get ad-posts or not.

Install: new profile field (single choice) On/Off (parameters) - note the field numer (e.g. 6)

Ad the following code at the end of your postbit (_legacy)

Code:

<if condition="in_array($bbuserinfo[usergroupid], array(1))">
<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 Start -->

<!-- Ad between -->


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

</div>
$spacer_close
</if></if>

<else />

<if condition="$vbulletin->userinfo['field6'] == 'On'">
<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 Start -->

<!-- Ad between -->

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

</div>
$spacer_close
</if></if>

Finished - have fun :)

lebstars.com 10-16-2005 03:04 PM

Could some1 tell me where to put the HTML code,
i installed the xml file through plug-in manager, but What Now?

UK Jimbo 10-16-2005 04:43 PM

Quote:

Originally Posted by lebstars.com
Could some1 tell me where to put the HTML code,
i installed the xml file through plug-in manager, but What Now?

At the end of your postbit or postbit_legacy templates.

The vBulletin manual explains how to edit styles/templates. :)

Xplorer4x4 10-21-2005 05:20 AM

Quote:

Originally Posted by Andreas
What about:
Show Adsense in (or under, above) first unread Post of a Thread.
I think this is the place that would get the most user attention?

If this helps you guys i tried using the following IF condition to do this but vB said it was not alowed.

PHP Code:

<if condition="$threadview = fetch_bbarray_cookie('thread_lastview', $thread['threadid']);"

It says:
Quote:

With a few exceptions, function calls are not permitted in template conditional expressions. Please go back and re-write this expression.


somedevil 10-21-2005 07:13 PM

OK, I added Doc's code....doesn't seem to be working. All members are seeing the ads with the default for members set to off.

Doc, where you have ad start and ad between twice in the code, am I right in thinking the adsense code should be inserted in both areas?

lsgworldl 11-04-2005 09:37 AM

<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"> <!--e-bannerx.com code begin-->
<SCRIPT language=JavaScript type=text/javascript>
<!--
var rnd = Math.round(Math.random() * 10000000);
document.writeln('<SCR'+'IPT language=JavaScript type=text/javascript src="http://www.e-bannerx.com:8888/adrevolver/banner?js&place=13471&cpy='+rnd+'">');
document.writeln('</SC'+'RIPT>');
//-->
</SCRIPT><NOSCRIPT>
<IFRAME src="http://www.e-bannerx.com:8888/adrevolver/banner?place=13471&cpy=1" width=468 height=60 scrolling=no allowtransparency=true frameborder=0 marginheight=0 marginwidth=0>
<A href="http://www.e-bannerx.com:8888/adrevolver/href?place=13471&rnd=1000" target="_blank">
<IMG src="http://www.e-bannerx.com:8888/adrevolver/banner?img&place=13471&rnd=1000" width=468 height=60 border=0 alt="e-bannerx.com" ismap></A></IFRAME></NOSCRIPT>
<!--e-bannerx.com code end--> </td> </tr> </table> </div> $spacer_close </if>
($hook = vBulletinHook::fetch_hook('postbit_imicons')) ? eval($hook) : false;

where in postbit do I add this, I have tried the end it dont work

UK Jimbo 11-04-2005 09:46 AM

Quote:

Originally Posted by lsgworldl
where in postbit do I add this, I have tried the end it dont work

Are you using legacy postbits? If so add it to postbit_legacy.

I've no idea what you're doing with the code $hook = vBulletinHook::fetch_hook('postbit_imicons')) that shouldn't be in a template anywhere and isn't part of this hack.


All times are GMT. The time now is 09:13 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.01286 seconds
  • Memory Usage 1,751KB
  • 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
  • (2)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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