vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Advert Management (https://vborg.vbsupport.ru/showthread.php?t=39074)

Jeremy W. 05-27-2002 11:58 AM

So, does this do rotations if there are more then one ad for a certain forum?

Parker Clack 05-27-2002 12:19 PM

Jeremy:

Yes as long as you have them in the same forum they will show up together. You chose the forum(s) that you want the banner(s) to show up in. So you can have multiple banners for a single forum.

PPN:

I did notice though if you have more than one banner for a forum though it will create multiple of the banners. Say I put in banner1 and banner2 to show up in forum1. When I go back to the admin for the banners I will see three banner1s show up and 1 banner2. Now if I go back and delete the extra banner1s they will not show up again but when you first add them they are often times multiples.

Parker

Scott MacVicar 05-27-2002 12:28 PM

Will test it now, this shouldn't really happen as there is only one query. Does it appear 3 times when you add banner1 or does it only appear 3 times when you after you add banner2?

xiphoid: to exclude pages you have to start doing more checking, what files are you wanting to exclude? Tell me and i'll try and get the code done to do it.

Floris 05-27-2002 12:51 PM

showthread.php (maybe) We are still discussing this

but at least:
newthread.php
newreply.php
editpost.php
report.php
postings.php

Scott MacVicar 05-27-2002 01:19 PM

Not many files then ;)

You'll need to add this code below

PHP Code:

eval("\$advert = trim(\"".str_replace("\'""'"addslashes($advert['advert']))."\");"); 

PHP Code:

if (substr($PHP_SELF,-strlen('newthread.php'))=='newthread.php' or substr($PHP_SELF,-strlen('newreply.php'))=='newreply.php' or substr($PHP_SELF,-strlen('editpost.php'))=='editpost.php' or substr($PHP_SELF,-strlen('report.php'))=='report.php' or substr($PHP_SELF,-strlen('postings.php'))=='postings.php') {
  
$advert='';



Floris 05-27-2002 01:46 PM

You the man :)
(and firefly ofcourse)

I will tweak it now :) (global.php I assume)

[update]
Yep, global.php and it works perfectly !!

Sparkz 05-27-2002 02:43 PM

I am pretty sure I am a man too.
/me checks between his legs...

Yup, definitely a man...

Parker Clack 05-27-2002 04:53 PM

PPN:

It happens after I add the second banner. The first one will get tripled.

I also noticed that the move function doesn't work with having the $advert array in global.php. Somehow it messes with postings.php and the move function thinks that you are trying to move it back to the same forumid. If I put the code in forumdisplay.php and showthread.php it works as I want it.

Would putting the check that you have written above resolve the issue with postings.php?

Thanks,
Parker

Henry-RS 05-27-2002 06:19 PM

Ok, I installed this without a problem, but there doesn't seem to be a feature that rotates the banners if you add two different ones to one specific forum, using the one "$advert" variable.

How can I make them rotate, by picking random banners that were assigned to that area?

Parker Clack 05-27-2002 06:31 PM

Henry:

If you put more than one banner for a forum the script will randomly pick the banner to display out of the ones that you have assigned to that forum area. From what I have experienced they are about one a one to one footing. Your mileage may vary.

Parker


All times are GMT. The time now is 11:16 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.01121 seconds
  • Memory Usage 1,741KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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