Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Google Adsense (or other) in a Block like an Individual Profile comment Details »»
Google Adsense (or other) in a Block like an Individual Profile comment
Version: 1.01, by YankForum YankForum is offline
Developer Last Online: Sep 2014 Show Printable Version Email this Page

Category: Mini Mods - Version: 4.0.6 Rating:
Released: 04-05-2010 Last Update: 04-05-2010 Installs: 21
Template Edits
Re-useable Code Translations  
No support by the author.

This simple hack enables you to add an advertising block to every member's profile page , this block looks just like other comments posted to the user's profile and is an encouraging way to force visitors clicking on it !


It's a pretty simple template edit. I promise if there will be a need , i'll prepare it as a plugin , with no template edit !

Installation:
1-upload the "upload" folder (1 image file)
2-only one template edit :

vbulletin>Styles & Templates>Style Manager>edit templates>Member Info Templates>memberinfo_block_visitormessaging :


Find :
Code:
{vb:raw block_data.messagebits}
ADD before it (in case you want your add to be displayed on top of comments) or after it (in case you want your add to be displayed below all comments) , code below:

Code:
<li class="postbit postbit-lite postcontainer<vb:if condition="!$message['avatarurl']"> noavatar</vb:if>" id="vmessage_{vb:raw message.vmid}">
			<a href="#" class="avatarlink">
				<img src="/images/avatars/asdhkwjhqdkh.gif" alt="Sponsored Ads" />
			</a>
	<div class="postbithead">
		<label for="vmessage_{vb:raw message.vmid}">
			<a href="#" class="username">Sponsored</a>
		 - <span class="postdate">03-08-2010 </span>- <a href="#" >permalink</a>
		</label>
	</div>
	<div id="vmessage_message_{vb:raw message.vmid}">
		<blockquote class="posttext restore" style="padding-left:90px">
	//PUT YOUR GOOGLE ADSENSE OR ANY OTHER ADS YOU'RE USING
		</blockquote>
	</div>
	<div class="postbitfoot floatcontainer">
		<span class="postcontrols">
				<a href="#" title="Sponserd links">{vb:rawphrase view_conversation}</a>
		</span>
	</div>
</li>
3-Do not forget to change the "//PUT YOUR GOOGLE ADSENSE OR ANY OTHER ADS YOU'RE USING" to match your desired adsense code ( or any other ).

DONE

thnx goes to Leo Brazil for this thread , giving me this idea to have that option in profile pages also !

Download Now

File Type: zip Adsense integration to Profiles.zip (9.4 KB, 85 views)

Screenshots

File Type: jpg screenshot.jpg (47.8 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-06-2010, 08:15 PM
archet1337's Avatar
archet1337 archet1337 is offline
 
Join Date: Sep 2009
Location: Norway
Posts: 251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great mod. Thanks for sharing

Is there any way to have the sponsored links show even when a member does not have any visitor messages on the members page?
Reply With Quote
  #3  
Old 04-06-2010, 08:25 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure if the TOS has changed since I received an email warning against this but.. disguising your Adsense ads to appear to be anything other than ads (ie: a Post from a member of the site) is something they frown upon, and can result in your account and all its earnings being killed off.

*edit* The way around it, from memory, was to totally strip back the postbit that you are using for the Google post, so it looks nothing like all the rest. To hide it like you are suggesting is totally against the TOU.
Reply With Quote
  #4  
Old 04-06-2010, 08:27 PM
kall's Avatar
kall kall is offline
 
Join Date: Apr 2004
Location: New Zealand
Posts: 2,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just checked https://www.google.com/support/adsen...n&answer=48182 :

Quote:
Encouraging Clicks

Publishers may not ask others to click their ads or use deceptive implementation methods to obtain clicks. This includes, but is not limited to, offering compensation to users for viewing ads or performing searches, promising to raise money for third parties for such behavior or placing images next to individual ads.

In order to ensure a good experience for users and advertisers, publishers participating in the AdSense program may not:

* Compensate users for viewing ads or performing searches, or promise compensation to a third party for such behavior.
* Encourage users to click the Google ads using phrases such as "click the ads", "support us", "visit these links" or other similar language.
* Direct user attention to the ads using arrows or other graphical gimmicks.
* Place misleading images alongside individual ads.
* Place ads in a floating box script.
* Format ads so that they become indistinguishable from other content on that page.
* Format site content so that it is difficult to distinguish it from ads.

* Place misleading labels above Google ad units. For instance, ads may be labelled "Sponsored Links" or "Advertisements", but not "Favourite Sites" or "Today's Top Offers".
Reply With Quote
  #5  
Old 04-06-2010, 09:03 PM
YankForum's Avatar
YankForum YankForum is offline
 
Join Date: Mar 2010
Location: MY
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kall View Post
thnx kall for reminding such an important rule ,but if we are supposed to stick to TOS this much , we are not allowed to change the color of ads to the same color of other links in the page in a way that it's not recognizable .

as you can see we are not trying to mislead visitors , we have mentioned following phrase : SPONSORED ADS that tells visitors it's not a normal link
also the avatar we are using should confirm that google is the owner of links next to it , not the website owner & we are not trying to change the format of ads , we are not changing adsense codes .
Reply With Quote
  #6  
Old 04-06-2010, 09:13 PM
YankForum's Avatar
YankForum YankForum is offline
 
Join Date: Mar 2010
Location: MY
Posts: 304
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by archet1337 View Post
Great mod. Thanks for sharing

Is there any way to have the sponsored links show even when a member does not have any visitor messages on the members page?
i'm glad u liked it
yes , in same template find line below :
Code:
<vb:if condition="$block_data['messagebits']">
and erase it
and find line below :
Code:
</vb:if>
<vb:if condition="$show['quickcomment']">
change it to :
Code:
<vb:if condition="$show['quickcomment']">
Reply With Quote
  #7  
Old 04-06-2010, 09:29 PM
tafreeh tafreeh is offline
 
Join Date: May 2008
Location: Canada
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The idea and mod, both of them are pretty sick. But I wish it wouldn break any adsense TOS or TAC(Terms and Conditions).
Reply With Quote
  #8  
Old 04-07-2010, 02:20 AM
archet1337's Avatar
archet1337 archet1337 is offline
 
Join Date: Sep 2009
Location: Norway
Posts: 251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have added a google avatar, and I can't possibly see how this should break any adsense TOS / TAC



I've attached the avatar if anyone else wants to use it
Reply With Quote
  #9  
Old 04-07-2010, 03:27 AM
tafreeh tafreeh is offline
 
Join Date: May 2008
Location: Canada
Posts: 536
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why dont you confirm with Adsense, and then let us know. so everyone can use it.
Reply With Quote
  #10  
Old 04-07-2010, 05:22 AM
ps2wiz ps2wiz is offline
 
Join Date: Apr 2005
Posts: 217
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this.

By the way, I believe by mistake you left a link to your customized avatar in the code.
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:50 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.04937 seconds
  • Memory Usage 2,329KB
  • Queries Executed 24 (?)
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
  • (5)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete