***************************************************************************************** ***************************************************************************************** * Mod NAME: Avatars Hack (redoc'd for v5.46) * ***************************************************************************************** * DESCRIPTION: This mod places a user chosen icon under their name on their posts. * ***************************************************************************************** * CREATED BY: Mutt (Jeff Hey), AllenAyres and MasterMind * * DATE: 02/19/2000 * * VERSION: 3.0 * ***************************************************************************************** * MODIFIED BY: MasterMind (MasterMind@ubbdev.com) * * MODIFY DATE: 10/27/2000 * * VERSION: 5.45-5.47 (probably more) * * * * Credits: Dark_Wizard and AllenAyres - previous update 4-22-00 * * * ***************************************************************************************** * REQUIREMENTS: full version * * COMPATABILITY: 5.46 * ***************************************************************************************** * FILES ADDED: your uploaded avatars * * FILES MODIFIED: ubb_library.pl, ubb_library2.pl, Ultimate.cgi, ubbmisc.cgi, * * Register_lib.cgi, cpanel2.cgi, cpanel4.cgi * ***************************************************************************************** * DISCLAIMER: By using this hack, the user implicitly agrees that they * * are willingly modifying any and all files at their own * * risk. Should any errors occur either as a direct or * * indirect result of said modifications the user agrees not * * to hold Infopop Corporation or any of the individuals * * listed above accountable. * * * * * * IN OTHER WORDS: PLEASE MAKE BACKUP COPIES OF EVERY FILE YOU PLAN TO * * MODIFY PRIOR TO MODIFICATION!! * * * * * * FOR MORE TIPS AND TRICKS FOR USE WITH THE ULTIMATE BULLETIN BOARD * * PLEASE VISIT US AT: * * * * http://www.ubbdev.com * * * ***************************************************************************************** ***************************************************************************************** **IF YOU NEED HELP, ASK AT UBBDEV.COM!!!!** Make a dir called 'avatars' in your noncgi (/ubb/) dir. name your avatars and up them to that dir. (avatars can be .gif and .jpg files) if you'd like a space in the name use the '_' underscore character. make another dir inside the avatar dir called 'custom'. if you'd like a special avatar that only one person can use, name it UserName.gif (example: MasterMind.gif) and upload it to the custom dir. YOU MUST USE THE USERS USERNAME AND UPLOAD TO THE CUSTOM DIRECTORY FOR THAT TO ONLY BE VISABLE FOR THAT USER!!! modify the following files after the mods are finished, goto the cp general vars and set your avataer settings. allow avatars yes/no avatar height avatar width i suggest 32x32 or 64x64 What's New? - Allows JPG files and GIF files - Displays the avatar when you view a profile - Bug Fixes - Instead of using the users profile number, you can use the username of the user in the custom directory. - Redoced! - MORE Bug Fixes ############################# ubb_library.pl ############################# ## FIND: $maxmemfields = 14; ## INCREASE THIS 14 BY ONE, IF YOU HAVE PREVIOUSLY ADDED ADDITIONAL PROFILE FIELDS THE NUMBER WILL BE DIFFERENT. ############################# ubbmisc.cgi ############################# ## FIND: if ($Name eq "Location") { $Location = &CleanThis($Value); $Location = &PipeCleaner($Location); } ## PASTE THIS AFTER: if ($Name eq "Avatar") { $Avatar = &CleanThis($Value); $Avatar = &PipeCleaner($Avatar); } ## FIND: if ($in{'Password'} eq "$thisprofile[1]") { $pwmatch = "true"; $Password = $thisprofile[1]; $Email = $thisprofile[2]; $URL = $thisprofile[3]; $Occupation = $thisprofile[5]; $Location = $thisprofile[6]; $Interests = $thisprofile[9]; $Status = $thisprofile[8]; $TotalPosts = $thisprofile[7]; $Permissions = $thisprofile[4]; $DateRegistered = $thisprofile[10]; $EmailView = $thisprofile[11]; $Signature = $thisprofile[12]; $ICQnumber = $thisprofile[13]; $AllowMassMail = $thisprofile[14]; ## NOTE: (VERY IMPORTANT) ## look at the last $thisprofile item. in this block of code ## 14 is the last one. if you've already modified your code ## it might be different. use the next sequential number for this next part. ## in this case it's 15. you'll use this number for every $thisprofile[15] item ## in the rest of the mod. ## PASTE THIS AFTER: $Avatar = $thisprofile[15]; ## FIND: print MEMBERSHIP ("$Signature\n"); print MEMBERSHIP ("$in{'ICQnum'}\n"); print MEMBERSHIP ("$in{'AllowMassMail'}\n"); ## PASTE THIS AFTER: print MEMBERSHIP ("$in{'Avatar'}\n"); ## NOTE: (VERY IMPORTANT) ## if you've already added to the profile, this is where you'll ## screw it up. the print statements need to be in the same order ## as the thisprofile items were numbered. ## FIND: $SearchName = "$thisprofile[0]"; $SearchName = &HTMLIFY($SearchName); $SearchName =~ tr/ /+/; ## PASTE THIS AFTER: if ($AvatarAllow eq "YES") { if ($thisprofile[15] ne "") { if ($AvatarW ne "") {$AvatarW = qq(width="$AvatarW");} else { $AvatarW = ""; } if ($AvatarH ne "") {$AvatarH = qq(height="$AvatarH");} else { $AvatarH = ""; } $Avatar = qq(); } else { $Avatar = " "; } $AvatarLine = qq(
Avatar Optional image you may use to appear with each of your posts. |