############################## #simple custom avatar hack by ELY_M. # #it uses $misc1 profile map # # ####### to specifiy avatar size in the control panel do this hack FIRST !!! open setvariables.cgi find this Do you wish to enable avatars on this board?
Avatars are pictures that your members can use. They are displayed under their name when they make a post.
$tempoutput ADD THIS RIGHT AFTER ^^^^^^^ This is avatar size. just put in 32 or 64 or 80 80 is good. the results will by same as 80 by 80 ### open topic.cgi find number 32 replace 32 with this $avatar_size ## open register.cgi and profile.cgi find this width="64" height="64" replace BOTH 64 with this $avatar_size DO BOTH FILES register.cgi and profile.cgi :) ################################## do register.cgi find this ### Avatar stuff if ($avatars eq "on") { $dirtoopen = "$imagesdir" . "avatars"; opendir (DIR, "$dirtoopen") or die "This is not the correct directory ($dirtoopen) please check the \$imagesdir path in the Admin center \>\; Set-Variables"; @dirdata = readdir(DIR); closedir (DIR); @images = grep(/gif/,@dirdata); foreach (@images) { $cleanavatar = $_; $cleanavatar =~ s/.gif//i; # Skip, if it's an admin/moderator only avatar if ($cleanavatar =~ /admin_/) { next; } if ($cleanavatar eq "noavatar") { $selecthtml .= qq~\n~; $currentface = "$cleanavatar"; } else { $selecthtml .= qq~\n~; } } $avatarhtml = qq~ Avatar:
You may choose an avatar to be displayed under your chosen username when you make a post ####### add this right under ^^^^^ Avatar:
You may choose an avatar to be displayed under your chosen username when you make a post

Got your own avatar from a url ?

Be sure to include http://
example: http://www.geocities.com/username/myart.gif

pick "noavatar" (choice at bottom of the list)
If you want only one image from your url,
or you want nothing for an avatar.

*** MAKE SURE YOU PUT THIS BEFORE **** *************** Do EXACT SAME thing again for profile.cgi too as you did for register.cgi !!!! open profile.cgi and do SAME thing as ABOVE ^^^^^^^^^^^^^^^^ Or people cant update their profiles with their own avatars. *************** #################################################################################### ### in profile.cgi find this $inuseravatar = $query -> param('useravatar'); and add this right under ^^^^^^ $newimageurl = $query -> param('imageurl'); ### find this $inuseravatar = &cleaninput("$inuseravatar"); add this right under ^^^^^^^^ $newimageurl = &cleanarea("$newimageurl"); ### find $misc1 REPLACE this with $newimageurl ############################################################################ avatars in profile still profile.cgi find this ################ show profile subroutine then LOOK for this $output .= qq~ ADD THIS ABOVE / BEFORE !!! $output .= qq~ if ($misc1 eq "" ) { $misc1html = "";} else { $misc1html = qq~Own image from a url:   $misc1   click to see full image~; } if ($useravatar eq "" ) { $avatarhtml = "";} else { $avatarhtml = qq~from the choice:   ~; } then find this $joineddate add this right under ^^^^^^^ Avatar(s): $avatarhtml         $misc1html ########################################################################## open topic.cgi find this if (($avatars eq "on") && ($useravatar) && ($useravatar ne "noavatar")) { $useravatar = qq(
); } else { undef $useravatar; } ADD THIS under ^^^^ if ($misc1) { $imageurl = qq~$misc1~; } else { undef $imageurl; } #### find this
$useravatar add this
$imageurl RIGHT under
$useravatar like this
$useravatar
$imageurl ###done####