vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   conditional ad after 5th, 15th post (https://vborg.vbsupport.ru/showthread.php?t=318181)

MarkFL 09-25-2017 02:12 PM

Did you set the plugin to be active?

Sal Collaziano 09-25-2017 02:13 PM

Quote:

Originally Posted by MarkFL (Post 2590093)
Did you set the plugin to be active?

I did, but I didn't see the new ad. But no error message, so that's good. :p

MarkFL 09-25-2017 02:27 PM

Are you doing this on a live site or a test site?

Sal Collaziano 09-25-2017 02:29 PM

Quote:

Originally Posted by MarkFL (Post 2590095)
Are you doing this on a live site or a test site?

Live site...

--------------- Added [DATE]1506365510[/DATE] at [TIME]1506365510[/TIME] ---------------

Oh, my fault. I see what the problem is. It's because I'm trying to use this on my mobile theme. :o Would you show me how to add that into the mix? :p

MarkFL 09-25-2017 04:58 PM

Quote:

Originally Posted by Sal Collaziano (Post 2590096)
Live site...

--------------- Added [DATE]1506365510[/DATE] at [TIME]1506365510[/TIME] ---------------

Oh, my fault. I see what the problem is. It's because I'm trying to use this on my mobile theme. :o Would you show me how to add that into the mix? :p

Yes, the mobile style doesn't seem to have any template hooks in the postbit templates. Try adding the following line to the very bottom of whichever postbit template you are using in your mobile style:

HTML Code:

{vb:raw template_hook.postbit_end}

Sal Collaziano 09-25-2017 05:01 PM

Quote:

Originally Posted by MarkFL (Post 2590100)
Yes, the mobile style doesn't seem to have any template hooks in the postbit templates. Try adding the following line to the very bottom of whichever postbit template you are using in your mobile style:

HTML Code:

{vb:raw template_hook.postbit_end}

That did it! Thank you very much! :p I was going to try and hack this:
global $styleid;

if ($styleid == 1){

...into the plugin - but surely would have broken things. :p I appreciate you helping me out with this!

--------------- Added [DATE]1506366173[/DATE] at [TIME]1506366173[/TIME] ---------------

Ahh! Poop! It shows up in my non-mobile style as well. One more? Can you tell me how to prevent it from displaying there? :o

MarkFL 09-25-2017 05:08 PM

Quote:

Originally Posted by Sal Collaziano (Post 2590101)
Ahh! Poop! It shows up in my non-mobile style as well. One more? Can you tell me how to prevent it from displaying there? :o

If you only want it to display in your mobile style, change the conditional to read:

PHP Code:

if (STYLEID == AND !is_member_of($vbulletin->userinfo$excluded) AND $post['postid'] == $ids[2]) 


Sal Collaziano 09-25-2017 05:11 PM

Quote:

Originally Posted by MarkFL (Post 2590103)
If you only want it to display in your mobile style, change the conditional to read:

PHP Code:

if (STYLEID == AND !is_member_of($vbulletin->userinfo$excluded) AND $post['postid'] == $ids[2]) 


Thank you, again. It's so cool all the things you can do with coding knowledge. It's sort of fun and entertaining. :p :)

MarkFL 09-25-2017 05:16 PM

Quote:

Originally Posted by Sal Collaziano (Post 2590104)
Thank you, again. It's so cool all the things you can do with coding knowledge. It's sort of fun and entertaining. :p :)

Careful...it can be quite addicting! :eek::D

Sal Collaziano 09-25-2017 05:18 PM

Quote:

Originally Posted by MarkFL (Post 2590105)
Careful...it can be quite addicting! :eek::D

I see that! If I weren't so busy I'd get a For Dummies book. :p When I have some free time, I just might...


All times are GMT. The time now is 08:19 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.01027 seconds
  • Memory Usage 1,748KB
  • 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
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (8)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
  • (10)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