Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    Technical Support    Forum Support  ›  Small suggestion on the avatar code (address).
Users Browsing Forum
Googlebot and 1 Guests

Small suggestion on the avatar code (address).  This thread currently has 402 views. Print
1 Pages 1 Recommend Thread
spiffen
December 11, 2006, 7:15am Report to Moderator Report to Moderator
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
Logged Offline
Private Message Private message
spiffen
December 11, 2006, 7:16am Report to Moderator Report to Moderator
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 />!; }
Logged Offline
Private Message Private message Reply: 1 - 7
thomasinnv
December 11, 2006, 8:12am Report to Moderator Report to Moderator

E-Blah Member
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.






Logged Offline
Site Site Private Message Private message Reply: 2 - 7
spiffen
December 11, 2006, 1:54pm Report to Moderator Report to Moderator
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..
Logged Offline
Private Message Private message Reply: 3 - 7
thomasinnv
December 11, 2006, 8:24pm Report to Moderator Report to Moderator

E-Blah Member
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.






Logged Offline
Site Site Private Message Private message Reply: 4 - 7
Craig
December 13, 2006, 12:20pm Report to Moderator Report to Moderator

SQL Support Team
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.

Quoted from spiffen
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.
Logged Offline
Site Site Private Message Private message ICQ ICQ Reply: 5 - 7
Justin
December 13, 2006, 3:07pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
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
I'll see ...


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 6 - 7
Justin
December 23, 2006, 4:36pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
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
Done.  I had to modify it a little to be backwards compatible with the old stuff though.  


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  |  MinistryTalk.com  |  Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV

Logged Offline
Site Site Private Message Private message Reply: 7 - 7
1 Pages 1 Recommend Thread
Print

E-Blah Community    Technical Support    Forum Support  ›  Small suggestion on the avatar code (address).