vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - Google Adsense after first post (or other advertisements) (https://vborg.vbsupport.ru/showthread.php?t=231857)

gnrx 04-21-2018 11:09 PM

I have another question:
In PostbitLegacy (is my template) I view on insert my adsense code for appars at end of post (post/text by user) but appears, logicaly, in all posts.
I want appears ever 3 posts, for example:
I add this code:
Code:

<vb:if condition="$post[postcount] % X == 0">
But not work, first post appears ell, other posts of same tjread appears wwong.

Ins opssible made this?

Regards.

MarkFL 04-21-2018 11:23 PM

Try changing the "X" to a "3".

gnrx 04-21-2018 11:34 PM

Sorry, yes, I try to change X to 3.

I have the problem indicate above.

I insert my adsense code, with this code indicate above just after this in postbit_legacy template
Code:

<div id="post_message_{vb:raw post.postid}">
                                                <blockquote class="postcontent restore ">
                                                        {vb:raw post.message}
                                                </blockquote>
                                        </div>

Work if not insert
Code:

<vb:if condition="$post[postcount] % 3 == 0">
Work in first post, but the rest of post of some thread appears lie "unbalanced".

If you want I can attach a screenshoot.

Thanks and regards!!

MarkFL 04-22-2018 12:42 AM

Locate this at the very end:

HTML Code:

{vb:raw template_hook.postbit_end}
Directly above that, try adding:

HTML Code:

<vb:if condition="(THIS_SCRIPT == showthread) AND !($post[postcount] % 3)">
        <div style="clear: both; margin: 1em 0;" class="attachments">
                <div style="text-align: center">
                        Your text here.
                </div>
        </div>
</vb:if>


gnrx 04-22-2018 07:18 AM

Thanks MarkFL,

With your code, I have my text every 3 posts but between posts.
My iddea, if its possible, is, just at end of the text/reply of the post user, inside the post.

Again, thank you! :)

MarkFL 04-22-2018 12:04 PM

Quote:

Originally Posted by gnrx (Post 2594325)
Thanks MarkFL,

With your code, I have my text every 3 posts but between posts.
My iddea, if its possible, is, just at end of the text/reply of the post user, inside the post.

Again, thank you! :)

Try putting the code directly below this block:

HTML Code:

<div id="post_message_{vb:raw post.postid}">
        <blockquote class="postcontent restore ">
                {vb:raw post.message}
        </blockquote>
</div>


gnrx 04-22-2018 08:08 PM

Thanks MarkFL,
Works perfect!!
I try in other positions, but in this position, work perfect!!!
Appears the code at end of post inside post :)
Thanks!!!

In other question, its possible insert the code for, ever 3 or 5 posts but with different content? I'm explain:
Code:

<vb:if condition="(THIS_SCRIPT == showthread) AND !($post[postcount] % 3)">
My text A here

And:
Code:

<vb:if condition="(THIS_SCRIPT == showthread) AND !($post[postcount] % 5)">
My text B here

I try this, at end of postbit_legacy, (I try a since days ago) but not fine...

Again, thank you!

Edit: Now I try with your code and yes, works perfect :)

Thanks master.

gnrx 08-23-2018 08:00 PM

Hello.
In this lasts weeks I edit this ads in location, but continue with my last doubt, if its is possible, real are fantastic:
My iddea:


We have the code A of adsense (for one add) and also, we have the code B for other/config add.

Mi iddea, if its possible.

In the first post number 3 (for example) appears the code A, in the post 6 de code B, in the post 9 de code A, in the post 12 the code B...etc...
.
If I use this:
Code:

<vb:if condition="(THIS_SCRIPT == showthread) AND !($post[postcount] % 3)">
Code A

and:

Code:

<vb:if condition="(THIS_SCRIPT == showthread) AND !($post[postcount] % 5)">
Code B

In the post number 15 and in the 30, 45...appears the 2 adds (or to codes) and I don't want this, I want only appear one add.

Sorry if I not explained well.

This, is a little important for me :)

Thanks in advanced!

Regards!


All times are GMT. The time now is 08:31 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.01842 seconds
  • Memory Usage 1,739KB
  • 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
  • (7)bbcode_code_printable
  • (3)bbcode_html_printable
  • (1)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
  • (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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete