ImgSize SP1/1.1
1.3
Features:
This mod let users apply width and height of their own picture in profile and then resizes it to max. height or width without stretching.
Admin set max. width and heigth for userpicture in profile and max. width and heigth for userpicture in posts from AdminCenter.
Centers the userpicture in posts.
Admin can disable members own pictures to be shown in posts from Admin-center.
Instructions:
Apply mod.
Upload english.lng, Admin.pl, AdminEdit.pl, Display.pl, Load.pl, Profile.pl and Subs.pl
REMEMBER: AFTER APPLYING AND UPLOADING THE MOD - GO TO ADMINCENTER AND SET MAX. HEIGHT AND WIDTH FOR PICTURES IN POSTS.
Carsten
http://www.langaa-net.dk/forum
english.lng
$txt{'476'} = "Userpic Width (0 = disable limit)";
$txt{'476'} = "Max. Userpic size in Profile (0 = disable limit)";
$txt{'796'} = "Your Instant Messages:";
$siztxt{'01'} = "Userpic Width x Height";
$siztxt{'02'} = "The Userpic Width box can only contain digits.";
$siztxt{'03'} = "The Userpic Height box can only contain digits.";
$siztxt{'04'} = "Max. Userpic size in Posts (0 = disable limit)";
$siztxt{'05'} = "Width:";
$siztxt{'06'} = "Height:";
$siztxt{'07'} = "Allow only Admins own Picture in Posts:";
Sources/Admin.pl
unlink("$memberdir/$currentmem.imconfig");
if (-e "$memberdir/$currentmem.siz") { unlink("$memberdir/$currentmem.siz"); }
Sources/AdminEdit.pl
my($snfchecked, $fls1, $fls2, $fls3, $utfchecked, $truncchecked, $mts1, $mts2, $mts3, $tsl6, $tsl5, $tsl4, $tsl3, $tsl2, $tsl1);
my($sonly_adminpic);
if ($timeselected == 6) { $tsl6 = " selected" } elsif ($timeselected == 5) { $tsl5 = " selected" } elsif ($timeselected == 4) { $tsl4 = " selected" } elsif ($timeselected == 3) { $tsl3 = " selected" } elsif ($timeselected == 2) { $tsl2 = " selected" } else { $tsl1 = " selected" }
if ($only_adminpic) { $sonly_adminpic = 'checked' }
$txt{'476'}
$txt{'477'}
$siztxt{'07'}
$txt{'476'}
$siztxt{'05'}
$siztxt{'06'}
$siztxt{'04'}
$siztxt{'05'}
$siztxt{'06'}
# Set as 0 or 1 if box was checked or not
my $fi;
map { $fi = lc $_; ${$_} = $FORM{$fi} eq 'on' ? 1 : 0; } @onoff;
$guestaccess = $guestaccess ? 0 : 1;
push(@onoff, "only_adminpic");
if ($FORM{'userpic_height'} =~ /\d+/) { $userpic_height = $FORM{'userpic_height'}; }
else { $userpic_height = 65; }
if ($FORM{'postuserpic_width'} =~ /\d+/) { $postuserpic_width = $FORM{'postuserpic_width'}; }
else { $postuserpic_width = 65; }
if ($FORM{'postuserpic_height'} =~ /\d+/) { $postuserpic_height = $FORM{'postuserpic_height'}; }
else { $postuserpic_height = 65; }
\$userpic_height = $userpic_height; # Set pixel size to which the selfselected userpics are resized, 0 disables this limit
\$postuserpic_width = $postuserpic_width; # Set pixel size to which the selfselected userpics in posts are resized, 0 disables this limit
\$postuserpic_height = $postuserpic_height; # Set pixel size to which the selfselected userpics in posts are resized, 0 disables this limit
\$allow_hide_email = $allow_hide_email; # Allow users to hide their email from public. Set 0 to disable
\$only_adminpic = $only_adminpic; # Set to 0 to allow others than Admin to show own Picture in Posts and Profile
Sources/Display.pl
$userprofile[13]$userprofile[12]