############################################################
# Avatar for Memberlist Hack v1.0 UBB 6.04c #
# #
############################################################
# #
# Required Hacks: #
# - avatar_hack_ubb6_v0.0007e #
# - memberlist_6.3.8 #
# NOTE: Only tested these version, maybe other version #
# will work too. #
# #
############################################################
# #
# Modified Files: #
# cp_memberlist.cgi (cgi), cp_vars_memberlist.pl #
# (template), public_memberlist.pl (template), #
# vars_wordlets_mods.cgi (cgi) #
# #
# Added Files: none #
# #
############################################################
# #
# Author: Zack #
# Co-Author: Goku #
# #
############################################################
# #
# Description: #
# This hack adds a users avatar to the memberlist as a #
# column. You can set this ON/OFF easily from the CP. #
# You can also change the title of the column if you like #
# in the CP. Enjoy! #
# #
############################################################
#### OPEN cp_memberlist.cgi (cgi-bin)
FIND:
-----------------------------------------------------------------------
print FILE qq!%vars_memberlist = (n!;
-----------------------------------------------------------------------
BELOW ADD:
-----------------------------------------------------------------------
print FILE qq!ML_switch_avatar => "$in{ML_switch_avatar}",n!;
print FILE qq!ML_switch_avatar_width => "$in{ML_switch_avatar_width}",n!;
-----------------------------------------------------------------------
### OPEN cp_vars_memberlist.pl (Templates)
FIND:
-----------------------------------------------------------------------
&RadioField ("AIM", "ML_switch_aim", "yes", "Turns the aim column on/off.", "$vars_memberlist{ML_switch_aim}", "ON|On%%OFF|Off");
-----------------------------------------------------------------------
ABOVE ADD:
-----------------------------------------------------------------------
&RadioField ("Avatar", "ML_switch_avatar", "yes", "Turns the avatar column on/off.", "$vars_memberlist{ML_switch_avatar}", "ON|On%%OFF|Off");
&RegField ("Width Avatar Column", "ML_switch_avatar_width", "yes", "2", "2", "Width?
If you don't no, check your avatar settings.
Example: 64", "$vars_memberlist{ML_switch_avatar_width}");
-----------------------------------------------------------------------
### OPEN public_memberlist.pl (Templates)
FIND:
-----------------------------------------------------------------------
$TBT
$vars_wordlets_mods{ML_col_pubname} |
MemberlistGuts
-----------------------------------------------------------------------
REPLACE THAT WITH:
-----------------------------------------------------------------------
$TBT
MemberlistGuts
if ($vars_memberlist{ML_switch_avatar} eq "ON") {
print "$vars_wordlets_mods{ML_col_avatar} | ";
}
print<
$vars_wordlets_mods{ML_col_pubname} |
MemberlistGuts
-----------------------------------------------------------------------
FIND:
-----------------------------------------------------------------------
chomp($user_profile[19]);
-----------------------------------------------------------------------
BELOW ADD:
-----------------------------------------------------------------------
chomp($user_profile[20]);
-----------------------------------------------------------------------
FIND:
-----------------------------------------------------------------------
if ($user_profile[15] ne "") {
print "";
print "$user_profile[15] | ";
}
else {
print "
";
print "$user_profile[0] | ";
}
-----------------------------------------------------------------------
REPLACE THAT WITH:
-----------------------------------------------------------------------
print "
";
if ($vars_memberlist{ML_switch_avatar} eq "ON") {
if ($user_profile[20] ne "") {
print " | ";
}
else {
print " | ";
}
}
if ($user_profile[15] ne "") {
print "$user_profile[15] | ";
}
else {
print "$user_profile[0] | ";
}
-----------------------------------------------------------------------
### OPEN vars_wordlets_mods.cgi (comes with the other hacks, in your cgi-bin)
FIND:
-----------------------------------------------------------------------
ML_col_joindate => q~Joined Date~,
-----------------------------------------------------------------------
BELOW ADD:
-----------------------------------------------------------------------
ML_col_avatar => q~Avatar~,
-----------------------------------------------------------------------
#########
##
## Now you'r done, so save your files and upload them! Hope y'all like it!
##
#################
or get this hack : http://www.sec5library.f2s.com/ubbhack/avatar_for_memberlist_hack_v1_0.txt