vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Adsense as a poster on your forums (https://vborg.vbsupport.ru/showthread.php?t=108648)

Keyser520 02-21-2006 10:00 PM

Adsense as a poster on your forums
 
So I've been playing around a bit with my new vb board, and figured out how to make it appear as if the "advertiser" has the second post on every page.

You can play around with the code some more to change some of the messages from the ones I have on there (i.e. posts: location:, etc)

For kicks, I have the "online" icon set to say "Google is online", so change this tag if you want it to say something else.

This was designed for "legacy". I do not know if it works for the new forum layout

You can also ad a custom ad "Avatar" as well. Just replace the "<!-- IF YOU WANT TO GIVE THE AD AN AVATAR, BUT IT HERE -->" with the code for the avatar.

Add this code to the END of your postbit_legacy template

PHP Code:

<if condition="$post[postcount] % $vboptions[maxposts] == 1">

$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">


<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="0" border="0" width="100%" align="center">
<
tr>
    <
td class="thead" style="font-weight:normal" align="left">        
            <!-- 
status icon and date -->
                         
Sponsored Ads            
        
</td>
        <
td class="thead" style="font-weight:normal" align="right">
            &
nbsp;
            
#<a><strong>1.5</strong></a>
        
</td>
        
</
tr>
<
tr valign="top">
    <
td class="alt2" width="175">
            
            <
div>

                <
class="bigusername" href="">Advertisement</a>
            </
div>
            
                        <
div class="smallfont"><div class="smallfont">Sponsored posting</div></div>
            <
div class="smallfont">
                    &
nbsp;<br />
                    <!-- IF 
YOU WANT TO GIVE THE AD AN AVATARBUT IT HERE -->
            </
div>
                        
            <
div class="smallfont">
                &
nbsp;<br />
                <if 
condition="$post['joindate']"><div>$vbphrase[join_date]: the beginning</div></if>
                <if 
condition="$post['field2']"><div>$vbphrase[location_perm]: everywhere</div></if>
                <if 
condition="$post['age']"><div>$vbphrase[age]: really old</div></if>
                <
div>
                    
$vbphrase[posts]: lots
                
</div>
            </
div>                                    
        
    </
td>
    <
td class="alt1">
    

            <!-- 
icon and title -->
            <
div class="smallfont">
                <if 
condition="$post['title']"><strong>Sponsored...</strong></if>
            </
div>
            <
hr size="1" style="color:$stylevar[tborder_bgcolor]/>
            <!-- / 
icon and title -->
        
        <!-- 
message -->
        <
div align="center">
                         <!--
PUT YOUR ADSENSE CODE HERE -->
                         </
div>
        <!-- / 
message -->
            
    
    </
td>
</
tr>
<
tr>
    <
td class="alt2">
        <
img class="inlineimg" src="images/statusiconrunes/user_online.gif" alt="Google is online" border="0" />
        &
nbsp;
    </
td>
    <
td class="alt1" align="right">
    
        <!-- 
controls -->
        <!-- / 
controls -->
    </
td>    
</
tr>
</
table>

</
div>
$spacer_close

</if> 


RichieBoy67 02-22-2006 07:16 PM

I like that!! Thanks

Moparx 02-22-2006 07:19 PM

you need to remove 'Keep the site running'. You are not allowed to have any text which asks or suggests to your members or guests to click adsense ads.

Keyser520 02-22-2006 07:58 PM

Thanks.

I replaced it with "Sponsored posting" but you could make it whatever you want.

GamerJunk.net 02-22-2006 08:08 PM

This is cool.

Keyser520 02-22-2006 08:17 PM

Thanks. It probably took me about 5 hours (off an on) to go through and figure out what did what. I'm pretty happy with it, though. I can do the same for the posbit normal rather than legacy if enough want it done, though no promises on how long it will take.. lol

Lineman28645 02-22-2006 08:42 PM

Great! I'll be using this!

Keyser520 02-22-2006 08:47 PM

The "avatar" spot that I included under the "poster name" is a great place to put something like the google firefox referal icon, ...

The Chief 02-22-2006 10:32 PM

lol, this is pretty cool, like it :)

might be installing this soon...

MagikMuzik 02-22-2006 11:11 PM

Quote:

Originally Posted by The Chief
lol, this is pretty cool, like it :)

might be installing this soon...

looks great, might give it a whirl later on.

Smiry Kin's 02-23-2006 01:15 AM

thanks for saving me the work! i see this someone where was gonna make it :P very nice dude!

neutek 02-23-2006 01:30 AM

thanks! does this have support for horizontal user info view also?

influence 02-23-2006 01:32 AM

wasn't this created long time ago? I have seen few sites with it before

AshokForums.com 02-23-2006 02:09 AM

looks great mate..

kall 02-23-2006 02:28 AM

Quote:

Originally Posted by Keyser520
Thanks.

I replaced it with "Sponsored posting" but you could make it whatever you want.

Not true.

Quote:

Originally Posted by adsense Program Policies
Incentives

Web pages may not include incentives of any kind for users to click on ads. This includes encouraging users to click on the ads or to visit the advertisers' sites as well as drawing any undue attention to the ads. For example, your site cannot contain phrases such as "click here," "support us," "visit these links," or other similar language that could apply to any ad, regardless of content. These activities are strictly prohibited in order to avoid potential inflation of advertiser costs. In addition, publishers may not bring unnatural attention to sites displaying ads or referral buttons through unsolicited mass emails or unwanted advertisements on third-party websites. Publishers are also not permitted to use deceptive or unnatural means to draw attention to or incite clicks on referral buttons.


yinyang 02-23-2006 02:49 AM

nice research kall. ahhhhh... the fine print. the fine print always bites you in the arse.

MissKalunji 02-23-2006 04:03 AM

Quote:

Originally Posted by yinyang
nice research kall. ahhhhh... the fine print. the fine print always bites you in the arse.

lol yes they do

Smiry Kin's 02-23-2006 04:58 AM

can you make it show like this one?? say if you got a big thread, make it show more then once?

https://vborg.vbsupport.ru/showthread.php?t=106596

Keyser520 02-23-2006 02:06 PM

I'm confused. What fine print does this violate?

Smirky, the same if conditionals that Moparx used will work in the one I did as well. The real difference between the two is that mine is designed to LOOk like an actual post, where his is more of an inserted banner. It's just a matter of which style you want to use.

thedvs 02-23-2006 04:27 PM

thank you nice hack

Keyser520 02-23-2006 04:36 PM

If someone can explain to me what it is about my code that violates google TOS, I will change it so that's it's "legal".

I just don't know what the problem is yet..

Thanks.

Taylor123 02-23-2006 05:49 PM

has anyone tried installing it on 3.5.4?

Xplorer4x4 02-23-2006 05:52 PM

Quote:

Originally Posted by Keyser520
If someone can explain to me what it is about my code that violates google TOS, I will change it so that's it's "legal".

I just don't know what the problem is yet..

Thanks.

As far as I can tell it is legal so long as your not having more then 3 ad units on any page.

Keyser520 02-23-2006 06:16 PM

I haven't upgraded to 3.5.4 yet, but I will hopefully tonight or tomorrow. When I do so, I"ll post if it works on 3.5.4 or not. The only thing that might cause a problem is if the variable names changed. If so, I'll have a new version up in a couple of days time.

I am also thinking about making it so that the "post time" for the add shows up as the same time as the first post, and adding the code to cause it to NOT display if there are fewer than 5 posts for a page or something like that.... (I know someone did something like that somehwere---I just have to find it).

Moparx 02-23-2006 06:20 PM

Quote:

Originally Posted by Keyser520
If someone can explain to me what it is about my code that violates google TOS, I will change it so that's it's "legal".

I just don't know what the problem is yet..

Thanks.

It is fine now since you changed the wording that was used earlier :)
Quote:

Originally Posted by Keyser520
and adding the code to cause it to NOT display if there are fewer than 5 posts for a page or something like that.... (I know someone did something like that somehwere---I just have to find it).

The link to one of my templates in this thread has the code to do it if you want to use it.

Smiry Kin's 02-23-2006 06:52 PM

Quote:

Originally Posted by Keyser520
I'm confused. What fine print does this violate?

Smirky, the same if conditionals that Moparx used will work in the one I did as well. The real difference between the two is that mine is designed to LOOk like an actual post, where his is more of an inserted banner. It's just a matter of which style you want to use.

so how i do that?... o.0
p.s works ok on 3.5.4

misticjeff 02-23-2006 10:46 PM

Installed!!

Question: can a conditional be put in so that it does not insert for certain membergroups??? Like an <if> statement or something.... obviously you see i'm not a coder in any way.

Moparx 02-23-2006 11:04 PM

Quote:

Originally Posted by misticjeff
Installed!!

Question: can a conditional be put in so that it does not insert for certain membergroups??? Like an <if> statement or something.... obviously you see i'm not a coder in any way.

Change:
PHP Code:

<if condition="$post[postcount] % $vboptions[maxposts] == 1"

To:
PHP Code:

<if condition="is_member_of($bbuserinfo, 1,2) AND $post[postcount] % $vboptions[maxposts] == 1"

currently it is configured to groups 1 & 2 so it will show for the guest and registered user usergroups

kall 02-24-2006 01:26 AM

Quote:

Originally Posted by Keyser520
If someone can explain to me what it is about my code that violates google TOS, I will change it so that's it's "legal".

I just don't know what the problem is yet..

Thanks.

Have you asked Google if presenting the ads in this way violates their TOS?

They emailed me to advise that presenting the ads in such a way as to make it appear the Google Adsense was a Poster was, in itself, a violation of the TOU.

No 'click here' or anything to be seen, just EXACTLY what you have done here. It is against the TOU to make the adsense appear to be a poster.

Keyser520 02-24-2006 12:37 PM

Well, if it's against the Google TOU, then don't use it. I will email them to see what they say about it. I read the TOS and didn't see how it violated it, but I could have missed something.

However, I'm sure it could be used for other advertisement purposes... if you use other providers, or the like.

Smiry Kin's 02-24-2006 01:14 PM

it isnt agaisnt it, google can bann you with out contacting you, tell you, and replying to your future emails, theres nothing you can do, google adsense is crap full stop, i use this for other adsense sites, far more better. :)

Keyser520 02-24-2006 03:51 PM

What sites would you recommend that are far better?

Keyser520 02-24-2006 03:59 PM

Moparx...what would the if statement be in order to have it check for how many replies are on that page? i.e. so that it shows if you have more than 5 replies on a page rather than more than 5 replies total?

Smiry Kin's 02-24-2006 04:07 PM

Quote:

Originally Posted by Keyser520
What sites would you recommend that are far better?

depends what your sites about? if its porn theres some nice places, if not, theres a few. im currently on two of them, one only open to large sites, other, is publicly.

Moparx 02-24-2006 05:45 PM

Quote:

Originally Posted by Keyser520
Moparx...what would the if statement be in order to have it check for how many replies are on that page? i.e. so that it shows if you have more than 5 replies on a page rather than more than 5 replies total?

Add this to the end of your conditional
PHP Code:

AND $GLOBALS[threadinfo][replycount] >= 


Keyser520 02-24-2006 06:04 PM

smirky, it is NOT porn. So what are the sites?

Moparx.. That conditional sets it for 5 posts or more in the whole thread. I want to do it as 5 posts or more per page. In other words, if the thread has 1 2 3 or 4 posts, no ad is shown, but at 5 or more, then and add is shown. If a thread shows 20 posts per page and there are 21 pages, then page 2 shows 1 posts and 1 add...but I don't want it to show the ad UNTIL there are 5 posts on page 2.... and the same for each subsequent page...

Does this have to be done as some kind of formula such as:

(last thread number shown on current page) mod (total replies shown per page) >=5

If so, then what are those variables stored as?

theodonnells 02-26-2006 04:00 PM

I installed this and it worked fine, but my pages seemed to hang a little before they loaded.So have uninstalled it....

Smiry Kin's 02-26-2006 08:59 PM

Quote:

Originally Posted by theodonnells
I installed this and it worked fine, but my pages seemed to hang a little before they loaded.So have uninstalled it....

thats your adds, if you use slow loading ones..

Keyser520 02-27-2006 02:10 PM

theodonnells, try changing the ad type you are displaying, play around with image vs links vs text and see if any give you faster loading time?

thedvs 02-28-2006 08:11 PM

i inserted mine and if the quick reply click icon is enabled
the 3rd post qr icon doesnt seem to work..


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