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)
-   -   Adsense, different sizes for visitors to members (https://vborg.vbsupport.ru/showthread.php?t=128551)

MadKad 10-07-2006 10:00 PM

Adsense, different sizes for visitors to members
 
I made this for our forum because our members didn?t like it when we added the big Adsense banner under last post, so I made this small hack where it shows smaller adverts for members and bigger ones to visitors.

What it does:
Shows one size advert to visitors (Adsense, text links, banners or anything you want)
Can be set to have more features that to adds if you no coding (or ask)
Set to show for user groups

More good news
This mod also adds the adverts to the bottom of the read pm page just under the PM msg :up:


Files:
1 Product file
1 Main template edit
New template will need your ad?s adding

Folder contains:
product-google_adds_sizes.XML file
Read me first.txt file (please read first)

FAQ:

Q: will this work in 3.6.0
A: Yes :D

Q: Can I add more that two kinds of adverts?
A: Yes you will need to add more code to the template

Q: My ad's are not showing?
A: Please make sure you add your user groups like 1, 2, 3, 4 with the spaces and not 1,2,3,4

This is the code you will need I have commented it.

Code:

<if condition="in_array($bbuserinfo['usergroupid'], array(usergroupshere))">
advert here
</if>

Supported at webmaster forum

Thank you

MadKad 10-08-2006 09:20 AM

Screen shots here

https://vborg.vbsupport.ru/external/2007/01/13.jpg

and here

https://vborg.vbsupport.ru/external/2007/01/13.jpg

Adding the adverts after the first post insted or as well please do the following


After first post ad's:
================================================

Template > postbit_legacy

Find: the very bottom of code in template

After add:
Code:

<!-- Start Google bottom -->
<if condition="!$GLOBALS['FIRSTPOSTID']">
<br />
$google_bottom
</if>
<!-- / End Google bottom -->

=================================================

Template > postbit

Find: the very bottom of code in template

After add:
Code:

<!-- Start Google bottom -->
<if condition="!$GLOBALS['FIRSTPOSTID']">
<br />
$google_bottom
</if>
<!-- / End Google bottom -->

=================================================

Thats it that is the codes needed for both post styles after the first post :cool:

fuzionpoker 10-08-2006 01:42 PM

Hi ive added this and it looks quite good!

However, the ads move so that there under the last post... is it possible for me to make it so that they stay after the 1st post?!

Thanks
JoRd

MadKad 10-13-2006 01:39 PM

Hi I have edited the secound post that will tell you how to do this :)

dont forget to click install :)

Caiman 10-13-2006 03:44 PM

I can't seem to find

Code:

<!-- / post #$post[postid] -->
in any of my postbit templates, hmm... maybe im being blind... be back soon.

MadKad 10-13-2006 03:52 PM

did you use the find box and click find?

Caiman 10-13-2006 03:55 PM

Of course. Doesn't seem to exist in my unmodified, original vB template either. (3.6.2) Hmm. Mod works fine otherwise, just want it after the first post too, still investigating, I might be doing something no0bishly wrong.

MadKad 10-14-2006 10:06 AM

oooops :( looks like that code isnt there in the new version!!

I will now look for a different cod efor you sorry about this :(

MadKad 10-14-2006 11:31 AM

ok I have changed the secound post and it all words :)

sorry about the problem also I have updated the files, to upgrade just uplaod the new version and tick overwrite then all should change apart from the template you have allready installed :)

AMG021 10-31-2006 01:58 AM

nice mod. everything works but under first post it won't show the add the under the last one it shows but not first help dude


All times are GMT. The time now is 05:07 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.01156 seconds
  • Memory Usage 1,736KB
  • 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
  • (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