Go Back   vb.org Archive > vBulletin 5 Connect Discussion > vB5 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 08-10-2018, 10:53 AM
plongeur.com plongeur.com is offline
 
Join Date: Mar 2017
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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 ?
Reply With Quote
  #2  
Old 08-10-2018, 08:28 PM
Seven Skins's Avatar
Seven Skins Seven Skins is offline
 
Join Date: Sep 2008
Location: London, UK
Posts: 1,481
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 08-13-2018, 04:55 AM
plongeur.com plongeur.com is offline
 
Join Date: Mar 2017
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 :


The ad script is actually a div. Putting it into another div does not change anything.
Attached Images
File Type: jpg 09-08-2018 16-42-40.jpg (28.5 KB, 0 views)
Reply With Quote
  #4  
Old 09-19-2018, 08:01 PM
noypiscripter's Avatar
noypiscripter noypiscripter is offline
 
Join Date: Jul 2013
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you tried this?

https://vbmods.rocks/forum/vbulletin...-using-plugins
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:12 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03867 seconds
  • Memory Usage 2,205KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (4)post_thanks_box
  • (4)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit_info
  • (4)postbit
  • (1)postbit_attachment
  • (4)postbit_onlinestatus
  • (4)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete