vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Adsense inside first post text (aligned right) (https://vborg.vbsupport.ru/showthread.php?t=138190)

GiaNNi 02-01-2007 09:25 PM

Adsense inside first post text (aligned right)
 
1 Attachment(s)
Id like to do something like this:

forrie 02-02-2007 09:36 AM

count me in on that too i like that idea

Neutral Singh 02-02-2007 10:42 AM

me too for a long time.

DPSR 02-02-2007 12:45 PM

Try this-

In postbit search:
PHP Code:

<!-- message --> 

after add:
PHP Code:

<span style="float: right;"><if condition="(($post[postcount]==1) or ($post[islastshown] and !$GLOBALS['vbulletin']->GPC['ajax']))">
===
YOUR AD CODE===
</if></
span

Above code will display adverts in first post and in last post






If you want advert in 1st post only, try this:
PHP Code:

<span style="float: right;"><if condition="(($post[postcount]==1) and !$GLOBALS['vbulletin']->GPC['ajax'])">
===
YOUR AD CODE===
</if></
span

Demo: http://img239.imageshack.us/img239/8869/sssl0.gif

Enjoy :rolleyes:

GiaNNi 02-02-2007 03:03 PM

Thanks, im trying to insert it ;)

What is !$GLOBALS['vbulletin']->GPC['ajax'] for?

Smitty 04-18-2007 09:46 AM

I tried this and I get an ad in the first post in the first page of a thread and in the last post in every page of a thread.

I'm looking for a way to get an ad to show in the first post on every page AND the last post on every page.

Any ideas?

Edit Add: I've got
Code:

<!-- Start AdSense Google within post message -->
<if condition="(($post[postcount] % $vboptions[maxposts] == 1) or ($post[islastshown]))">
<span style="margin: 2px; float: right; width: 301px; height: 251px;">
GOOGLE ADSENSE CODE HERE
</span>
</if>
    <div id="post_message_$post[postid]">$post[message]</div>
                <!-- End AdSense Google within post message -->

to work, but if someone uses the 'quick edit' on a post with adsense in it (first or last post in a thread), the ajax of Quick Edit kicks in but the google ad that is there is superimposed over part of the editing box....

Quote:

Originally Posted by GiaNNi (Post 1172989)
Thanks, im trying to insert it ;)

What is !$GLOBALS['vbulletin']->GPC['ajax'] for?

I echo this question.

Keloran 10-22-2007 01:17 PM

i think its to stop, if your the person who when posts on quick reply, is the post on the next page, then it will only show hte advert

i think that stops it, testing to find out

unitedpunjab 11-21-2007 07:54 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=140664" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=140664</a>


All times are GMT. The time now is 10:03 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.01056 seconds
  • Memory Usage 1,728KB
  • 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
  • (1)bbcode_code_printable
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete