vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Banners.. (https://vborg.vbsupport.ru/showthread.php?t=32064)

Insane2 11-03-2001 10:32 AM

I just started a small motorbike/car/speed related banner exchange and a couple of my users are running vbulletin 2.0.3. Now my question is, if they add the supplied code to the HTML header, in the VBulletin Admin CP, the page ID is not unique on each displayed page of the forum. Resulting in cached banners and missed credits. I was wondering is their a way to generate a random number in place of the page ID in the html header in admin CP??

I hope all that makes sense.

Thanks a ton in advance for any help you may be able to give.
Insane.

Scott MacVicar 11-03-2001 10:47 AM

Within the styles part of the admin panel, tell them to add this code to the Header Insert of the appropriate style.

PHP Code:

srand(time());
$pageid rand(); 

then wherever the page id is meant to go place $pageid

hope this helps.

Insane2 11-03-2001 02:14 PM

Thanks i passed on the info and was asked where to put the first bit :
srand(time());
$pageid = rand();

something about what part of styles?!? i think... :)

Edit: just got email... works a treat... THANKS HEAPS!! YOUR A CHAMPION :D

Mark Hensler 11-03-2001 10:24 PM

if you need a really good seed for srand(), use:
srand((double) microtime() * 1000000);


All times are GMT. The time now is 10:00 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.00954 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
  • (1)bbcode_php_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