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)
-   -   Forum Display Enhancements - Google AdSense (or other) after post... (https://vborg.vbsupport.ru/showthread.php?t=169075)

goranbaxy 01-31-2008 12:27 PM

If you are displaying ads only to guests you can replace this code:

Code:

<td class="thead" align="left">Sponsored Links</td>
with this one:
Code:

<td class="thead" align="left"><a href="http://www.mysite.com/linkToPost.php">Remove ads from forum!</a></td>
Red part of cod should be replaced with link to a topic where you can explain that if some one register he will see "ads free" forum!

piloto-43 02-01-2008 05:36 AM

thanks..

installed.

Prince 02-01-2008 02:09 PM

very nice, thanks.

Soonerdude 02-05-2008 12:28 AM

How would you make it visible only to certain usergroups?

I'd like to make it not visible to admins, mods, and donors.

goranbaxy 02-05-2008 05:13 AM

You can try this:
Code:

<if condition="!is_member_of($bbuserinfo, X, Y, Z)">
Where X, Y and Z are the IDs of admin, mods and donors.
Try it and let me know did it work.

induslady 02-06-2008 06:01 PM

Hi,

I tried using this conditional code of yours...

Quote:

<if condition="$post[postcount] % X == 0">
Replaced 'X' with 5.

In a thread with a total of 37 posts, it displays the ad after the 5th post, 15th post, 25th post and 35th post.

But it is just making space for the ad after the 10th post, 20th post, 30th post. But not showing the ad. Why?

Please can you help fix this for me.

This also spoiled the display of ads after the last post in every page that was working fine earlier.

I'm also using conditionals for "after 1st post on every page", that is working fine.

Thanks in advance.

goranbaxy 02-07-2008 05:29 AM

@induslady: can you add a screen shoot, I'm not sure I understand what you're talking about.

induslady 02-08-2008 08:33 PM

Hello,

Thank you for your response. I am attaching screen shots and have explained below what's happening on using this condition...

Quote:

<if condition="$post[postcount] % X == 0">
replaced X with 5.

Meaning, I want to show Google ads below every 5th post in the thread.
My forum threads have max 10 posts per page.

Using the above condition, I am able to get ads displayed below 5th post. (refer image 1 - showing ad)

But ads are not getting displayed below 10th post. (refer image 2 - no ad - white space)

While ads are getting displayed below 15th post too. (refer image 3 - showing ad)

But again ads are not getting displayed below 20th post. (refer image 4 - no ad - white space)

I used to have conditions included for displaying ads "below the 1st post in all pages of the thread and below the last post in all pages of the thread".

After I included the above condition to display ad below the 'X' post,
the condition for displaying ads below last post in all pages of a thread is also not working.

While I have ads below 1st post in all pages of a thread working fine.

Hope my issue is clear now with the screen shots and the explanation.
Please advise. Thanks.

goranbaxy 02-10-2008 10:25 AM

Did you use this code to display ads on last post on every page?
Code:

<if condition="$post['islastshown']">

induslady 02-13-2008 12:18 AM

Yes, to display ads below the last post in all pages of the thread, I use...

Quote:

<if condition="$post['islastshown']">
To display ads below the 1st post in all pages of the thread, I use...

Quote:

<if condition="$post[postcount] % $vboptions[maxposts] == 1 AND $GLOBALS[threadinfo][replycount] >= 2">
When I use the below condition to display ad below every 5 posts(replacing X as 5), the former last post display does not seem to work. While the latter 1st post display works fines.

Quote:

<if condition="$post[postcount] % X == 0">
What could be the issue? Please advise.


All times are GMT. The time now is 07:42 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.01240 seconds
  • Memory Usage 1,738KB
  • 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
  • (3)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