vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   ads on FORUMHOME (https://vborg.vbsupport.ru/showthread.php?t=326054)

scottkoz20 02-02-2018 02:57 PM

ads on FORUMHOME
 
I am trying to add a couple of ad slots onto my forum home page after a couple of groupings and I'm not sure on the correct syntax to use for a plug-in

global $ids;

$excluded = array(88,115);

if (!is_member_of($vbulletin->userinfo, $excluded) AND THIS IS WHAT I AM NOT SURE OF)
{
ad code
}

I am using $post['postid'] == $ids[x] for posting of ads after certain posts...

Also, am I overlooking something obvious in implementing this?

thanks in advance
Scott

Dave 02-02-2018 02:58 PM

Where are you trying to add this? The FORUMHOME template or a hook?

scottkoz20 02-02-2018 03:12 PM

Hi Dave

misread your question

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

and I was trying to use a hook

scottkoz20 02-25-2018 11:07 AM

I actually figured this out

for someone else looking to add this in

in the ForumHome --> forumhome_forumbit_level1_nopost


I added this to the top

Code:

<vb:if condition="$forum[forumid]==XXX">
<div><center>
AD CODE HERE
</center></div>
</vb:if>

I also have this wrapped around it if you want to block this from certain usergroups (like donators, etc.)

Code:

<vb:if condition="!is_member_of($bbuserinfo,88)">  </vb:if>


All times are GMT. The time now is 02:26 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.01020 seconds
  • Memory Usage 1,711KB
  • 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_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