![]() |
April Fools Joke
Would this coding still work in vb 3.8.x?
Code:
just add something like $newavatar = mt_rand(1, 10); in postbit_display_start hook, (if you have 10 random avatars to display) |
This would be kinda kewl. Subscribing...
|
Quote:
|
That's what I did last year.
In a hugely replublican/conservative forum, I replaced user avatars, with democrat/liberal politicians and celebrities, with some funny messages as user ranks. It proved to be a great prank. |
No need to do any template edits. Just do it all in a plugin:
PHP Code:
|
Would this work with 4.1.2?
|
Quote:
it's a plugin, right? What Hook Location I must select? //edit: Nevermind, is something like this for vb 4??? |
Just use postbit_display_complete.
It's just php, so it works with 3.x and 4.x |
Thanks <3
|
How do you make a plugin?
|
Quote:
Product = vBulletin Hook Location = postbit_display_complete Title = Random Avatar Execution Order = 5 Plugin PHP Code = PHP Code:
avatarlocation is replaced with the path of your avatars. I uploaded a bunch of avatars to a directory called funavatars. Each avatar needs to begin with a number. In this example, 1-20. image_x (x is the random number) |
StevenS beat me to the reply.
|
Quote:
I actually did a variation on this. PHP Code:
funavatars ..1 ..2 ..3 ..4 Now I only wish I could add a conditional so it starts at midnight and ends at 11:59PM the user's time. |
Awesome.
Did you have to resize all the images or will it do it auto? |
Quote:
|
Im missing something, no avatar is showing when i activate plugin.
images are in forums/customavatars/rice/ images are named 1_image_newavatar.jpg plugin code is: Code:
$newavatar = rand(1,32); |
Quote:
|
Quote:
--------------- Added [DATE]1301629440[/DATE] at [TIME]1301629440[/TIME] --------------- Issue was it needs to read: Code:
$newavatar = rand(1,32); |
thanks!!!
|
Some people don't have avatars, so it's not quite as funny as I'd hope.
But a serious bunch of guys with care bear avatars is funny stuff! |
Quote:
I've got random avatars and signatures on my site. The users are finding it pretty funny. |
Lynnes plugin worked perfectly :P http://www.erodov.com/forums/whats-u...ars/41140.html
thanks Lynne. ;) |
Okay, so how does this need to be written to pull random avatars from avatars already in the database?
--------------- Added [DATE]1301686409[/DATE] at [TIME]1301686409[/TIME] --------------- I'd also would love a way to flip usernames upside down. |
My members didn't say anything until I mentioned it.
Now they like it. I may not remove it. It may actually bring people back to see who their avatar is going to be next. :) |
All times are GMT. The time now is 05:49 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|