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)
-   -   Mini Mods - Adsense Inside the Post (https://vborg.vbsupport.ru/showthread.php?t=140664)

unitedpunjab 02-27-2007 10:00 PM

Adsense Inside the Post
 
This little template modification allows you to put an Ad inside the post with Text wrapped around the Ad.

See Screenshot.

In postbit template replace
Code:

<!-- message -->
  <div id="post_message_$post[postid]">$post[message]</div>
  <!-- / message -->

With
Code:

        <!-- message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1)) and ($show['guest'])">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
      ADSENSE CODE HERE
</span>
</if>
    <div id="post_message_$post[postid]">$post[message]</div>
              <!-- / message -->

  • you will have to replace ADSENSE CODE HERE with the actual code.
  • The code is for 300 * 250 Medium Rectangle Format,Edit width & height parameters if you want to use any other format.
  • Ad is shown on the first and last post (modify if you want)
  • Ad is shown to guests Only ( remove "and ($show['guest'])" to show to all)
Version History:
v 1.0.1 :Ads displayed after the first post on every page (instead of just the first page)

Tip: To remove quote button for guests.
Replace
Code:

<if condition="$post['replylink']
with
Code:

<if condition="$post['replylink'] AND $show['member']">

bollie 02-28-2007 04:49 AM

Nice ;) instal

3dsoft 03-02-2007 06:01 PM

Hi, this looks cool. Will adsense show up only in 1st post (thread start) or in all posts? Because I would not like it to show up in all posts. Also, I think that googles rules say that no more than 3 ads per page.

unitedpunjab 03-02-2007 06:03 PM

Quote:

Originally Posted by 3dsoft (Post 1194298)
Hi, this looks cool. Will adsense show up only in 1st post (thread start) or in all posts? Because I would not like it to show up in all posts. Also, I think that googles rules say that no more than 3 ads per page.

Only in the First and Last post and only to guests,if you want in a different way then let me know.

2 FN LOW 03-03-2007 02:11 AM

so this actually shows up in the users posts and not in a post of its own?

BigJimTheLug 03-03-2007 02:16 AM

This is a nice modification, but you will run into problems when you or someone at your site uses the "quote" option.

It will screw things up, watch.

unitedpunjab 03-03-2007 02:34 AM

Quote:

Originally Posted by 2 FN LOW (Post 1194561)
so this actually shows up in the users posts and not in a post of its own?

yes its shown in user posts,

Quote:

Originally Posted by MARKETPROFITS (Post 1194562)
This is a nice modification, but you will run into problems when you or someone at your site uses the "quote" option.

It will screw things up, watch.

Ads are shown only to guest,even if ads are shown to members there will be no problem.Ads will not get 'quoted' along with the post.

BigJimTheLug 03-03-2007 02:50 AM

Quote:

Originally Posted by unitedpunjab (Post 1194571)
yes its shown in user posts,



Ads are shown only to guest,even if ads are shown to members there will be no problem.Ads will not get 'quoted' along with the post.

No, an ad won't get quoted. However, if someone wraps "quotes" around the post they make, then the blending efficiency of the mod will vanish. I used this ad implementation at first, but when it came time to wrap quotes around posts, this modification was inefficient.

unitedpunjab 03-03-2007 02:59 AM

I See...

3dsoft 03-03-2007 09:27 PM

Quote:

Only in the First and Last post and only to guests,if you want in a different way then let me know.
Sounds perfect to me. :)


All times are GMT. The time now is 01:11 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.05130 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
  • (4)bbcode_code_printable
  • (5)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
  • (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