vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Mods allowing specific sets of ads for specific forums (https://vborg.vbsupport.ru/showthread.php?t=179144)

Cyburbia 05-14-2008 12:04 AM

Mods allowing specific sets of ads for specific forums
 
Apparently, this is a rarity: a banner mod where selected ads are displayed only in selected subforums.

phpadsnew integration: well, apparently it's possible with some hacking of the code, but I think there needs to be a different template for each forum. There's also a lot of criticism of phpadsnew: too bloated, too difficult to set up and configure, and so on.

vB Ad Management: no longer supported. Also, it doesn't allow specific ads for specific forums; a number of people asked for the feature, though.

Geek Advertising Banner: apparently there's nothing available on whether it can do this or not.

Does such a mod exist?

MrEyes 05-14-2008 07:52 AM

To be honest with the introduction of default ad locations in 3.7 I wouldn't bother with most of the ad mods that currently exist. Unless of course you need them in different locations to the default locations.

Within the templates you can use conditionals to decide which ad code to display. As an example on my forum I have the following:

Logged Out/Guest Users
Text or images header banner
Text or images banner after first post (x 2)

Logged In
Text only header banner
Small text only banner after first post

Subscriber
No header
No first post ad

All of this is controlled via conditionals, and could easily be extended to perform checks on forum id's. For example this is a summary of my code for the header banner:

Code:

<if condition="!in_array($bbuserinfo[usergroupid], array(25,26,6,7,5)) AND !in_array(THIS_SCRIPT, array(searchresults,adv_index))">
        <if condition="$show['member']">
                <!-- LOGGED IN BANNER MARKUP -->
        <else />
                <!-- GUEST BANNER MARKUP -->
        </if>
</if>

A verbose description of this is, if the user is not in usergroups 25,26,6,7,5 and the current page is not my CMPS page or my searchresults (custom) page. Then check if the user is logged in, if yes then display the "LOGGED IN BANNER MARKUP" otherwise display "GUEST BANNER MARKUP"

You could extended the conditional statements to include checks on forum ID.


All times are GMT. The time now is 12:17 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.00920 seconds
  • Memory Usage 1,710KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)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