vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   random style each visit (https://vborg.vbsupport.ru/showthread.php?t=115256)

DJDarknez 05-10-2006 08:00 PM

random style each visit
 
I'm looking for a hack / mod / plugin that would allow a random style to be displayed each time a user visits the page. I have several logos that I want to use, but i want the rest of the forum (including mkportal, which pulls the color from the forum) to match the primary color of the logo.

I saw the random logo thing, but I want the entire style to be random.

Hope that makes sense.

MimeSong Erk 05-13-2006 03:39 PM

I'm kinda looking for this too. It should be easy to do, based on the random logo thing. I'll see if I can figure it out myself, and reply back here if I do.

ArchangelX 04-01-2007 06:26 PM

Anyone know of anything like this? I'd be interested in it, too!

ArchangelX 08-22-2007 10:16 PM

Nothin' huh?

MeNeedHelp 08-23-2007 03:53 AM

You could insert this in the global.php file.
($hook = vBulletinHook::fetch_hook('style_fetch')) ? eval($hook) : false;

$numstyles = 3; // however many styles you have
$randstyle = rand(0, $numstyles * 1000);

if ($randstyle < 1000)
{
$vbulletin->userinfo['styleid'] = 1;
$styleid = 1;
}
else if ($randstyle < 2000)
{
$vbulletin->userinfo['styleid'] = 2;
$styleid = 2;
}
else if ($randstyle < 3000)
{
$vbulletin->userinfo['styleid'] = 3;
$styleid = 3;
}

ArchangelX 08-23-2007 05:43 AM

Oooh..great! Thanks for the help. I have 3.5 but I'll try this out pronto!


All times are GMT. The time now is 02:25 PM.

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.00946 seconds
  • Memory Usage 1,709KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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