vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Add Advertising after first post - Postbit Alteration (https://vborg.vbsupport.ru/showthread.php?t=126107)

GoTTi 09-07-2006 10:00 PM

Add Advertising after first post - Postbit Alteration
 
go into your postbit or postbit_legacy template and add this to the END of the template:

Code:

<if condition="!$GLOBALS['FIRSTPOSTID']">
 <br>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
    <td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">       
        Sponsored Links
    </td>
</tr>
<tr>
    <td class="alt2" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
<center>
<script type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxx";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text_image";
google_ad_channel ="xxxxxxx";
google_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000CC";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</center>
    </td>
</tr>
</table>
</if>

Note: This example shows code for a google ad. you can remove the entire google ad and place a different code in there. perhaps phpadsnew code or some other advertising companies codes. whatever you like.

This is the standard code without ads inside.

Code:

<if condition="!$GLOBALS['FIRSTPOSTID']">
 <br>
<table id="post$post[postid]" class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center">
<tr>
    <td class="thead" style="font-weight:normal; border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]" colspan="2">       
        Sponsored Links
    </td>
</tr>
<tr>
    <td class="alt2" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">
<center>
------PLACE AD CODE HERE------
</center>
    </td>
</tr>
</table>
</if>


Selene 09-08-2006 07:08 PM

Hi, thanks for this one!

*installed*

Dark Riku 09-08-2006 07:25 PM

does quick reply work with this?

Jesus05uk 09-10-2006 05:17 PM

How Can I make this only appear for guests?

Kintaro81 09-11-2006 03:23 PM

Quote:

Originally Posted by Jesus05uk
How Can I make this only appear for guests?

<if condition="!$GLOBALS['FIRSTPOSTID'] & is_member_of($bbuserinfo, 1)">

@Gotti
And for add advertising before last post?

DPSR 09-12-2006 01:15 PM

Yea i also want to know how to add advert after/before last post ?

LBSources 09-12-2006 07:38 PM

I had to disable this for all users as it conflicts with a quick reply issue ..

http://www.vbulletin.com/forum/showt...ply+page+white

But enabling for GUESTS only makes it all better...

Just in case anyone else is having this issue.. its an FF issue.. not noticed in IE.

Farjad 09-13-2006 08:52 PM

Quick Reply Issue FiX:

HTML Code:

<if condition="(!$GLOBALS['FIRSTPOSTID'] and !$GLOBALS['vbulletin']->GPC['ajax'])">

LBSources 09-18-2006 07:11 PM

quick question .. is it possible to set by FORUM ID where the ads should show up? similar to restricting it to certain usergroups, what if an array of forum ids equal that then dont show the ads ..

possible or too much to ask?

rezapci 09-18-2006 08:16 PM

thank you :)

LBSources 09-20-2006 10:31 AM

Quote:

Originally Posted by LBSources
quick question .. is it possible to set by FORUM ID where the ads should show up? similar to restricting it to certain usergroups, what if an array of forum ids equal that then dont show the ads ..

possible or too much to ask?

BUMP! ...

any ideas? :)

itsatonline 09-22-2006 10:33 AM

how can i add advertising aftar x post?

mkdevo 09-24-2006 08:25 PM

Quote:

Originally Posted by itsatonline
how can i add advertising aftar x post?

see this thread.

Mecho 09-26-2006 08:05 PM

Tnx for this great hack . but i have one problem .

how can i fix the size of ads so that it covers the whole area of the Sponserd links Box ? like the image that u attached !

tnx in advance

javo 09-27-2006 05:36 PM

Is there a way to exclude certain forums?
I see from the link I can enable it on forums specified but it would be easier if I could just specify the ones to not show up.

Thanks in advance.

farooqaaa 09-29-2006 03:12 PM

Thanks!!

Farooqaaa is clicking "Install"

ehsanix 09-29-2006 05:43 PM

thank u for this useful hack...

spipo 09-30-2006 03:36 PM

jello
I would like to put adense before "first thread" and after the "post reply boutton" .

like this exemple

http://img509.imageshack.us/img509/3324/ggggmg8.jpg



thanks to all

KevinLiles 10-15-2006 08:41 PM

Thank you

oldfan 10-16-2006 04:25 PM

why is it messing up my page format?
http://www.metallifukinca.com/showth...8672#post48672

dieselpowered 10-16-2006 07:18 PM

Only problem with this hack is after you edit a post, you will notice the box stays but the content is gone. Hit refresh, and then all is good. Must be playing havok with the AJAX or something.

OoogleeMooglee 10-16-2006 07:33 PM

Is there a way to edit this so that it only displays the ad if someone actually replies to a thread? I have an ad that displays on the bottom of every forum page and when there is a new post with no replies, the ad shows up under the first post which (because there are no replies yet) ends up right on top of my bottom ad. Any thoughts?

oldfan 10-18-2006 02:41 AM

Quote:

Originally Posted by oldfan
why is it messing up my page format?
http://www.metallifukinca.com/showth...8672#post48672


bump :)

gamesmastervide 10-20-2006 04:16 PM

i read through that link but anyway to make it viweable by certain usergroups?? I have a vip system and I would like to remove ads for vips...

I tried this
<if condition="$post[postcount] == 1 AND in_array($GLOBALS[usergroupid], array(6,9,14))">

but it did not work no groups could see it i got the same prob for certain forums aswell using that code on the link provided in this post...

oldfan 10-24-2006 05:31 AM

Quote:

Originally Posted by oldfan
bump :)

anyone?

toonysnn 10-25-2006 01:00 AM

Nice hack, installed.
I modified it a bit to show a bit diffrently like a normal post, to make it seem like someone is posting so they will read it :p Thanks.

Prince 11-05-2006 04:03 PM

Quote:

Originally Posted by Farjad
Quick Reply Issue FiX:

HTML Code:

<if condition="(!$GLOBALS['FIRSTPOSTID'] and !$GLOBALS['vbulletin']->GPC['ajax'])">

where exactly is this code supposed to go?

Mecho 11-05-2006 05:46 PM

Quote:

Originally Posted by Farjad
Quick Reply Issue FiX:

HTML Code:

<if condition="(!$GLOBALS['FIRSTPOSTID'] and !$GLOBALS['vbulletin']->GPC['ajax'])">

Tnx Man .. its ok now

Mecho 11-05-2006 05:50 PM

Quote:

Originally Posted by Prince
where exactly is this code supposed to go?


Find this code in postbit_legacy :
Quote:

<if condition="!$GLOBALS['FIRSTPOSTID']">
Replace with :
Quote:

<if condition="(!$GLOBALS['FIRSTPOSTID'] and !$GLOBALS['vbulletin']->GPC['ajax'])">
;)

UncoderMom 11-06-2006 04:23 PM

How do I get this only to show for showthread. Its gone all wacky in the new groups hack!

It was showing in my pms but that didn't bother me. I just don't know if it was a legal content area.

UncoderMom 11-11-2006 04:31 PM

anyone??

KipLarson 11-14-2006 02:50 PM

Does this work in 3.61? Also, is this a violation of Google's TOS? I can only assume it is not as Google themselves recommend placing ads after the first post on forum sites.

See this link

https://www.google.com/adsense/suppo...y?answer=43868

kman5428 11-14-2006 05:20 PM

Hey I'm using the above hack and love it, currently I use it to show PHPadsNew ads to only guest on the forum with this code:

<if condition="$post[postcount] % $vboptions[maxposts] == 1 AND !$bbuserinfo[userid]">

but I want to also show the ads after the last post on each page, how can I add that to the code?

KipLarson 11-16-2006 09:01 PM

Anyone know if this works with 3.61? Please respond :(

Mecho 11-16-2006 09:13 PM

Quote:

Originally Posted by KipLarson (Post 1118911)
Anyone know if this works with 3.61? Please respond :(


yes . it works

KipLarson 11-17-2006 02:48 PM

Quote:

Originally Posted by Mecho (Post 1118921)
yes . it works

What about 3.54? I might try it on my 3.61 forum first. (Thanks by the way for the response)

KipLarson 11-19-2006 07:28 PM

Ok, I posted this on two of my forums, however I use vb advanced links directory and the ads are displayed after every single reply in the links directory.

It works fine in the forum though.

Here is the code I'm using:

PHP Code:

<if condition="!is_member_of($bbuserinfo, 2, 3, 6, 7, 9, 10) AND !$GLOBALS['FIRSTPOSTID']">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<
table class="tborder" cellpadding="0px" cellspacing="$stylevar[cellspacing]border="0" width="100%" <td align="center">
<
tr>
    <
td class="thead" align="left">Sponsored LinksLog in or <a href="http://www.haloboards.com/register.php?">Register</ato remove these</td>
</
tr>
<
tr>
    <
td class="alt1" align="center">

Adsense Ad here

    
</td>

</
tr>
</
table>

</
div>
$spacer_close

</if> 

So why is it showing up on after every reply in my links directory? I tried using an if conditional to not show it on that page, but I didn't do it right and can't figure out how to fix it. Any help please?

RealRnB 11-26-2006 07:39 AM

thanks

JohnGBSA 11-28-2006 07:57 PM

This is confusing me no end right now...

I added the code as the last thing in my legacy_postbit template, and made sure I replaced the adsense code with my own. However I get nothing when I look at my forum. No advertising at all.

I'm running 3.6.4 so I'm not sure if that has anything to do with it.

Any help would be apreciated.

/John

GFX Brands 12-06-2006 11:53 PM

i have a question

if i use a banner system already

i tried to put in my code

$bannerads

but no ads showed up any help ?


All times are GMT. The time now is 04:59 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.01367 seconds
  • Memory Usage 1,828KB
  • 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
  • (3)bbcode_html_printable
  • (1)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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