vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   plotting April Fool's prank, how can I change all avatars? (https://vborg.vbsupport.ru/showthread.php?t=142188)

Soliloquy 03-16-2007 05:32 AM

plotting April Fool's prank, how can I change all avatars?
 
For April Fool's Day I've installed the Encheferizer mod on my forum, which will alter all the posts to make it look like they were written by the Swedish Chef. I'd also like to change everyone's avatar to different images the Swedish Chef (to make sure the pandemonium is complete);) but I'm not sure if that will be possible... can't change all 1200+ members manually, altering the template would just show one image for everyone which I think would ruin the effect, and I don't know how to get a random image to appear for each post. (Added complication: I'm also displaying the user avatar next to threads in forumdisplay.)

Any ideas how I can accomplish this? Too bad there's no mod for temporarily assigning avatars based on first letter of their name; that would be ideal. Any ideas how I can make it look like my forum is filled with Swedish Chefs?

nexialys 03-16-2007 10:09 AM

altering the template MAY be the solution, with random images...

just add something like $newavatar = mt_rand(1, 10); in postbit_display_start hook, (if you have 10 random avatars to display)

and the in the postbit, change the avatar to <img src="avatarlocation/image_$newavatar.gif">

all your avatars would have to be located in that structure to work...

SuperJETT 04-01-2007 12:38 PM

Quote:

Originally Posted by nexialys (Post 1204754)
altering the template MAY be the solution, with random images...

just add something like $newavatar = mt_rand(1, 10); in postbit_display_start hook, (if you have 10 random avatars to display)

and the in the postbit, change the avatar to <img src="avatarlocation/image_$newavatar.gif">

all your avatars would have to be located in that structure to work...

Thanks for that, perfect joke for today! http://www.x-h2o.com/showthread.php?t=15526


All times are GMT. The time now is 01:27 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.00981 seconds
  • Memory Usage 1,713KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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