|
|
spiffen |
| December 11, 2006, 7:15am |
|
E-Blah Member  
Posts: 19
Posts Per Day: 0.02
Time Online: 5 hours 10 minutes
|
Hi. I have a small suggestion to the avatar code in the forum. If you look in the HTML source of a board message the url for the avatars IMG tag looks like this:
|
Code
<img src="/blahdocs/uploads/fssava3ls_8270.gif" width="170" height="170" alt="" /> |
|
It seems like the forum takes the current address of the uploaded avatars and appends it in front of the file name and then saves it in the users profile. This is not good if you want to move you upload directory to another place, then all these avatar links will point on the wrong place. Would it not be better if you only save the file name and then append the current upload directory everytime you display the avatar. In this case, moving or changing the name on the upload dir, will not make any impact on the actual forum. /Emil |
|
|
|
|
|
spiffen |
| December 11, 2006, 7:16am |
|
E-Blah Member  
Posts: 19
Posts Per Day: 0.02
Time Online: 5 hours 10 minutes
|
This was what I did to fix it on my forum: In Load.pl
|
Code
#if($memberid{$user}{'avatar'} =~ /http:/ || $memberid{$user}{'avatarupload'}) { $avatar{$user} = qq~<img src="$memberid{$user}{'avatar'}" width="$width" height="$height" alt="" /><br />~; }
# else { $avatar{$user} = qq~<img src="$avsurl/$memberid{$user}{'avatar'}" alt="" /><br />~; }
if($memberid{$user}{'avatar'} =~ /http:/) { $avatar{$user} = qq~<img src="$memberid{$user}{'avatar'}" width="$width" height="$height" alt="" /><br />~; }
elsif($memberid{$user}{'avatarupload'}) { $avatar{$user} = qq~<img src="$uploadurl/$memberid{$user}{'avatar'}" width="$width" height="$height" alt="" /><br />~; }
else { $avatar{$user} = qq~<img src="$avsurl/$memberid{$user}{'avatar'}" alt="" /><br />~; } |
|
In ProfileEdit.pl
|
Code
#$addtoID{'avatar'} = "$uploadurl/$atturl";
$addtoID{'avatar'} = "$atturl"; |
|
In MemberPanel.pl Changed FROM:
|
Code
if($memberid{$URL{'u'}}{'avatar'} =~ /http:/ || $memberid{$URL{'u'}}{'avatarupload'}) { $perpic = qq~<img src="$pic" width="$width" height="$height" alt="" /><br />~; }
else { $perpic = qq!<img src="$avsurl/$memberid{$URL{'u'}}{'avatar'}" alt="" /><br />!; } |
|
Changed TO:
|
Code
if($memberid{$URL{'u'}}{'avatar'} =~ /http:/) { $perpic = qq~<img src="$pic" width="$width" height="$height" alt="" /><br />~; }
elsif($memberid{$URL{'u'}}{'avatarupload'}) { $perpic = qq~<img src="$uploadurl/$memberid{$URL{'u'}}{'avatar'}" width="$width" height="$height" alt="" /><br />~; }
else { $perpic = qq!<img src="$avsurl/$memberid{$URL{'u'}}{'avatar'}" alt="" /><br />!; } |
|
|
|
|
|
|
|
thomasinnv |
| December 11, 2006, 8:12am |
|
|
Posts: 306
Gender:  Male
Posts Per Day: 0.36
Reputation: 100.00%
Reputation Score: +1 / -0
Time Online: 14 days 19 hours 11 minutes
Location: Fernley, NV
Age: 38
|
i could be wrong, but to change your avatar directory, all you need to do is change the path in admin/board settings to point to the new location and all is well. |
| |
|
|
|
|
|
spiffen |
| December 11, 2006, 1:54pm |
|
E-Blah Member  
Posts: 19
Posts Per Day: 0.02
Time Online: 5 hours 10 minutes
|
Yes, but it didn't work with uploaded avatars.. |
|
|
|
|
|
thomasinnv |
| December 11, 2006, 8:24pm |
|
|
Posts: 306
Gender:  Male
Posts Per Day: 0.36
Reputation: 100.00%
Reputation Score: +1 / -0
Time Online: 14 days 19 hours 11 minutes
Location: Fernley, NV
Age: 38
|
ahh, i understand. call me thick. |
| |
|
|
|
|
|
Craig |
| December 13, 2006, 12:20pm |
|
|
Posts: 3,619
Gender:  Male
Posts Per Day: 2.07
Reputation: 97.73%
Reputation Score: +215 / -5
Time Online: 14 days 15 hours 11 minutes
Location: Germany
Age: 38
|
You should create a mod to do this and post it on the mod's board...that is unless Justin is going to add it to the core code. Nice job by the way. -Craig.
This was what I did to fix it on my forum: In Load.pl
|
Code
#if($memberid{$user}{'avatar'} =~ /http:/ || $memberid{$user}{'avatarupload'}) { $avatar{$user} = qq~<img src="$memberid{$user}{'avatar'}" width="$width" height="$height" alt="" /><br />~; }
# else { $avatar{$user} = qq~<img src="$avsurl/$memberid{$user}{'avatar'}" alt="" /><br />~; }
if($memberid{$user}{'avatar'} =~ /http:/) { $avatar{$user} = qq~<img src="$memberid{$user}{'avatar'}" width="$width" height="$height" alt="" /><br />~; }
elsif($memberid{$user}{'avatarupload'}) { $avatar{$user} = qq~<img src="$uploadurl/$memberid{$user}{'avatar'}" width="$width" height="$height" alt="" /><br />~; }
else { $avatar{$user} = qq~<img src="$avsurl/$memberid{$user}{'avatar'}" alt="" /><br />~; } |
|
In ProfileEdit.pl
|
Code
#$addtoID{'avatar'} = "$uploadurl/$atturl";
$addtoID{'avatar'} = "$atturl"; |
|
In MemberPanel.pl Changed FROM:
|
Code
if($memberid{$URL{'u'}}{'avatar'} =~ /http:/ || $memberid{$URL{'u'}}{'avatarupload'}) { $perpic = qq~<img src="$pic" width="$width" height="$height" alt="" /><br />~; }
else { $perpic = qq!<img src="$avsurl/$memberid{$URL{'u'}}{'avatar'}" alt="" /><br />!; } |
|
Changed TO:
|
Code
if($memberid{$URL{'u'}}{'avatar'} =~ /http:/) { $perpic = qq~<img src="$pic" width="$width" height="$height" alt="" /><br />~; }
elsif($memberid{$URL{'u'}}{'avatarupload'}) { $perpic = qq~<img src="$uploadurl/$memberid{$URL{'u'}}{'avatar'}" width="$width" height="$height" alt="" /><br />~; }
else { $perpic = qq!<img src="$avsurl/$memberid{$URL{'u'}}{'avatar'}" alt="" /><br />!; } |
|
|
| Don't just ask a question. Instead ask a question, give us a screen shot and post a link to your forum. Help us help you make your forum better!If I helped...increase my Reputation by clicking here. |
|
|
|
|
|
Justin |
| December 13, 2006, 3:07pm |
|
|
Posts: 15,080
Gender:  Male
Posts Per Day: 6.42
Reputation: 93.42%
Reputation Score: +298 / -21
Time Online: 37 days 1 hours 13 minutes
Location: Tallassee, AL
Age: 22
|
|
|
|
|
|
Justin |
| December 23, 2006, 4:36pm |
|
|
Posts: 15,080
Gender:  Male
Posts Per Day: 6.42
Reputation: 93.42%
Reputation Score: +298 / -21
Time Online: 37 days 1 hours 13 minutes
Location: Tallassee, AL
Age: 22
|
|
|
|
|
|
|