vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=262)
-   -   Ads between posts (https://vborg.vbsupport.ru/showthread.php?t=326648)

plongeur.com 08-10-2018 10:53 AM

Ads between posts
 
Hi all,

I am still trying to insert ads between my posts, i ended up changing the "widget_conversationdisplay" template.

Starting line 394, i changed it to have :

Code:

<vb:if condition="$counter == $thispagetotal - 1">
        {vb:template {vb:raw replyTemplateName}, conversation={vb:raw node.content}, pagingInfo={vb:raw pagingInfo}, bbcodeOptions={vb:raw channelBbcodes}, postIndex={vb:raw postIndex}, commentId={vb:raw commentId}, showInlineMod={vb:raw showInlineMod}, widgetConfig={vb:raw widgetConfig}, view={vb:raw view}, hidePostIndex={vb:raw hidePostIndex}, adlocation="last-post"}
<vb:elseif condition="$counter == 1" />
        <font color="white">Pub</font>
        ad script here
        {vb:template {vb:raw replyTemplateName}, conversation={vb:raw node.content}, pagingInfo={vb:raw pagingInfo}, bbcodeOptions={vb:raw channelBbcodes}, postIndex={vb:raw postIndex}, commentId={vb:raw commentId}, showInlineMod={vb:raw showInlineMod}, widgetConfig={vb:raw widgetConfig}, view={vb:raw view}, hidePostIndex={vb:raw hidePostIndex}}
<vb:elseif condition="$counter == 5" />
        <font color="white">Pub</font>
        ad script here
        {vb:template {vb:raw replyTemplateName}, conversation={vb:raw node.content}, pagingInfo={vb:raw pagingInfo}, bbcodeOptions={vb:raw channelBbcodes}, postIndex={vb:raw postIndex}, commentId={vb:raw commentId}, showInlineMod={vb:raw showInlineMod}, widgetConfig={vb:raw widgetConfig}, view={vb:raw view}, hidePostIndex={vb:raw hidePostIndex}}
<vb:elseif condition="$counter == 10" />
        <font color="white">Pub</font>
        ad script here
        {vb:template {vb:raw replyTemplateName}, conversation={vb:raw node.content}, pagingInfo={vb:raw pagingInfo}, bbcodeOptions={vb:raw channelBbcodes}, postIndex={vb:raw postIndex}, commentId={vb:raw commentId}, showInlineMod={vb:raw showInlineMod}, widgetConfig={vb:raw widgetConfig}, view={vb:raw view}, hidePostIndex={vb:raw hidePostIndex}}
<vb:else />
        {vb:template {vb:raw replyTemplateName}, conversation={vb:raw node.content}, pagingInfo={vb:raw pagingInfo}, bbcodeOptions={vb:raw channelBbcodes}, postIndex={vb:raw postIndex}, commentId={vb:raw commentId}, showInlineMod={vb:raw showInlineMod}, widgetConfig={vb:raw widgetConfig}, view={vb:raw view}, hidePostIndex={vb:raw hidePostIndex}}
</vb:if>

For some reason i can't figure, if i remove the "pub" text it gets messy as my ad divs include all the posts above them.
I just can't understand why.

Does anyone have an idea ?

Seven Skins 08-10-2018 08:28 PM

You can try removing this whole line

Code:

<font color="white">Pub</font>



And wrap the ad code in div

Code:

<div>ad script here</div>


Also you may need to clear floats as well around ad codes.

plongeur.com 08-13-2018 04:55 AM

1 Attachment(s)
if i remove the text, the ad div actually spans over the posts aboce it, this why i added it.

You can see it here :
https://vborg.vbsupport.ru/attachmen...1&d=1534143233

The ad script is actually a div. Putting it into another div does not change anything.

noypiscripter 09-19-2018 08:01 PM

Have you tried this?

https://vbmods.rocks/forum/vbulletin...-using-plugins


All times are GMT. The time now is 05:36 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.02003 seconds
  • Memory Usage 1,722KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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