vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Random Avatar with per post 0.2 (https://vborg.vbsupport.ru/showthread.php?t=44749)

Gaffer 10-18-2002 10:00 PM

Random Avatar with per post 0.2
 
hi this is my first hack ever that i have released and cause i think these instructions are a little hard to understand and i'm not 100% sure if they will work right, i'm putting it here in beta hacks for a week or so..... till all the bugs in my writing is ripped out

what this hack does- this hack lets you have a totally random avatar at every post. (not thread but each post)
the below instructions are to add another one avatar but there is an addon at the bottom that explains how to add more. this is set so only admins can set these as rewards to members and such. mainly so people on my site don't put huge images in instead of the 170X170 max set currently.

i hope to release more versions of this as well each better and better i hope to have it so you have screens like vb has now for avatars one day.

for a demo go here

demo not working right now

i will try and support people that have problems but i won't promise anything but i have installed it on 2 boards that we're running 2.2.6 and it is working fine and i have also installed it on a 2.2.8 board that i'm hacking getting ready to install over the other 2 and all 3 are working

this code really needs cleaning up as well. as i'm someone that normally just edits other hacks to suit what i need but this one i wrote almost all by myself except for the Java which i found in a txt file on my computer that from the date says that it has been there for 8 months unopened... so i have no idea where it's from

Neo 10-19-2002 10:48 AM

Is that you in the avatar?

and does this use the upload system VB has?

Gaffer 10-19-2002 10:53 AM

i wish that was me

or more important i wish that was my girlfriend but no thats mandy moore

and i hope to have something like that done next an upload script but not one that puts them in the database

this links to avatars that are on external sites for now

Chris M 10-19-2002 04:29 PM

Wow...Looks very nice:)

Satan

LangTuDaTinh 10-19-2002 09:02 PM

cool...installing this

LangTuDaTinh 10-19-2002 09:27 PM

i have problem /w setting up template #2

<SCRIPT LANGUAGE="JavaScript"><!-- Beginvar theImages = new Array() // do not change this// To add more image files, continue with the// pattern below, adding to the array.theImages[0] = '<img src="$avatarurl">'theImages[1] = '<img src="$post[field6]">'// line remarked to show pattern
// theimages[2] = '<img src="$post[field7]">'
// do not edit anything below this linevar j = 0var p = theImages.length;var preBuffer = new Array()for (i = 0; i < p; i++){ preBuffer[i] = new Image() preBuffer[i].src = theImages[i]}var whichImage = Math.round(Math.random()*(p-1));function avatar(){document.write(''+theImages[whichImage]+'');}avatar();// End --></script>

it seems the code is mixed...
what is that...if i set 2 more random avatar (total 3 ..include the default one)...what is i do with this second template...thanks

Gaffer 10-19-2002 09:57 PM

Quote:

Originally posted by LangTuDaTinh
i have problem /w setting up template #2

<SCRIPT LANGUAGE="JavaScript"><!-- Beginvar theImages = new Array() // do not change this// To add more image files, continue with the// pattern below, adding to the array.theImages[0] = '<img src="$avatarurl">'theImages[1] = '<img src="$post[field6]">'// line remarked to show pattern
// theimages[2] = '<img src="$post[field7]">'
// do not edit anything below this linevar j = 0var p = theImages.length;var preBuffer = new Array()for (i = 0; i < p; i++){ preBuffer[i] = new Image() preBuffer[i].src = theImages[i]}var whichImage = Math.round(Math.random()*(p-1));function avatar(){document.write(''+theImages[whichImage]+'');}avatar();// End --></script>

it seems the code is mixed...
what is that...if i set 2 more random avatar (total 3 ..include the default one)...what is i do with this second template...thanks

ooooops

i checked it before i put it up but for some reason it removed all the breaks

i've updated the link at the top with the right layout

LangTuDaTinh 10-19-2002 10:41 PM

THANKS YOU SO MUCH...I GOT IT WORKING /w 5 more avatar on vb 2.2.7.

Gaffer 10-20-2002 02:50 AM

ok so my instrucions we're not that hard to follow then

Dean C 10-20-2002 08:37 AM

not bad... ill give this a try on my testboard when i have the time :D

- miSt


All times are GMT. The time now is 06: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.01138 seconds
  • Memory Usage 1,736KB
  • 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)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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