PDA

View Full Version : Ads between posts


plongeur.com
08-10-2018, 10:53 AM
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 :


<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

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




And wrap the ad code in div

<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
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/attachment.php?attachmentid=157176&stc=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-5-modifications/vbulletin-5-template-only-modifications/92-how-to-put-ads-after-first-post-in-a-thread-on-vb5-without-using-plugins