Profile photo used as Avatar - why not use it? - Posted (2753 Views)
Average Member
Panhandler
Posts: 783
783
There's a thread in the archives:
http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=42690

Shaggy got a running start on a mod that uses the profile photo as an avatar. I think Shaggy's idea was good.
However, the thread died out and was archived.
I attempted to implement it and got the same error as another poster:
Error Type:
Microsoft VBScript runtime (0x800A0009)
Subscript out of range: '[number: 1]'
/forumtest/inc_iconfiles.asp, line 183

...and this is what I read on inc_iconfiles.asp, line 183,

quote:
--------------------------------------------------------------------------------
function getCurrentIcon(fIconName,fAltText,fOtherTags)
if fIconName = "" then exit function
if fOtherTags <> "" then fOtherTags = " " & fOtherTags
if Instr(fIconName,"http://") > 0 then strTempImageUrl = "" else strTempImageUrl = strImageUrl
tmpicons = split(fIconName,"|")
if tmpicons(1) <> "" then fWidth = " width=""" & tmpicons(1) & """" if tmpicons(2) <> "" then fHeight = " height=""" & tmpicons(2) & """"
getCurrentIcon = "<img src=""" & strTempImageUrl & tmpicons(0) & """" & fWidth & fHeight & " border=""0"" alt=""" & fAltText & """ title=""" & fAltText & """" & fOtherTags & " />"
end function
--------------------------------------------------------------------------------

The error appears in the box where the avatar would normally go. And the photo url is clean. . .no unusual marks. Any ideas on how to make this mod work?
<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Support Moderator
Shaggy
Posts: 6780
6780
Just assign the width [bold]or[/bold] the height rather than both, the other dimension will be set relative to the one you define. For example, if the image measures 100*200 and you set the width to 64, the height will be 128.
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Posted
New Member
radiodelicate
Posts: 53
53
thanks, but it still doesn't work in IE. argh... I'll keep on tweaking though, I suppose I'll get it right eventually.<
Posted
New Member
radiodelicate
Posts: 53
53
okay, I fixed it now. It was my use of both css and and set height/width that messed it up slightly. this is what I've got now anyway, if it would be of use for anybody else:

Code:
getCurrentIcon(trim(Reply_MemberPhoto)&"|100|", ChkString(Reply_MemberName,"display"), "class=""avatar""")
and then in inc_header.asp (around line 277. Among the rest of the css anyway.):

Code:
".avatar {margin-top: 5px; padding: 3px; background-color: #ececec; border: 1px solid #b7b7b7;}" & vbNewLine & _
<
Posted
Support Moderator
Shaggy
Posts: 6780
6780
Sorry, yes, shoul've pointed out that the height should be specified in the tag rather than the css.
<
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Posted
New Member
radiodelicate
Posts: 53
53
yes, and I kind of messed it up a bit before by putting the "class=""avatar""" in the wrong place, and therefore messing up the dimension proprieties. Hah I'm still really new to all this, but trial and error is my best friend. Been making lots of progress though, I'll post a link in Show-Off Your Forums once I'm happy enough with the whole thing :)<
You Must enter a message