Author |
Topic |
|
Darkness
Junior Member
Italy
145 Posts |
Posted - 18 March 2003 : 18:27:55
|
How can i put the image in the profile just under the name of a poster in a thread (just as if it is a kind of avatar). |
Edited by - ruirib on 18 March 2003 23:19:43 |
|
Darkness
Junior Member
Italy
145 Posts |
Posted - 19 March 2003 : 03:14:39
|
I suppose I have to work on topic.asp ... but ... do not work my code...
Can you help me? |
|
|
cripto9t
Average Member
USA
881 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 19 March 2003 : 08:46:26
|
Haven't had a chance to test this yet but I've already implemented with a user's gender so there shouldn't be any problems. All line references below are for a fresh 3.4.03 copy of topic.asp, just add the parts in green.
Lines 96 - 99'## Forum_SQL - Get original topic and check for the Category, Forum or Topic Status and existence
strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO" & _
", M.M_TITLE, M.M_HOMEPAGE, M.MEMBER_ID, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY, M.M_PHOTO_URL" & _
", T.T_DATE, T.T_SUBJECT, T.T_AUTHOR, T.TOPIC_ID, T.T_STATUS, T.T_LAST_EDIT" & _ Lines 131 - 132 Member_Country = rsTopic("M_COUNTRY")
Member_Photo = rsTopic("M_PHOTO_URL")
Topic_Date = rsTopic("T_DATE") Lines 309 - 312 '## Forum_SQL
strSql = "SELECT M.M_NAME, M.M_RECEIVE_EMAIL, M.M_AIM, M.M_ICQ, M.M_MSN, M.M_YAHOO"
strSql = strSql & ", M.M_TITLE, M.MEMBER_ID, M.M_HOMEPAGE, M.M_LEVEL, M.M_POSTS, M.M_COUNTRY, M.M_PHOTO_URL"
strSql = strSql & ", R.REPLY_ID, R.FORUM_ID, R.R_AUTHOR, R.TOPIC_ID, R.R_MESSAGE, R.R_LAST_EDIT" Lines 523 - 536 (be sure to update the numbers in red) rM_COUNTRY = 11
rM_PHOTO = 12
rREPLY_ID = 13
rFORUM_ID = 14
rR_AUTHOR = 15
rTOPIC_ID = 16
rR_MESSAGE = 17
rR_LAST_EDIT = 18
rR_LAST_EDITBY = 19
rR_SIG = 20
rR_STATUS = 21
rR_DATE = 22
if CanShowSignature = 1 then
rM_SIG = 23
end if Lines 552 - 553 Reply_MemberCountry = arrReplyData(rM_COUNTRY, iForum)
Reply_MemberPhoto = arrReplyData(rM_PHOTO, iForum)
Reply_ReplyID = arrReplyData(rREPLY_ID, iForum) Lines 582 - 585 if strShowRank = 2 or strShowRank = 3 then
Response.Write " " & getStar_Level(Reply_MemberLevel, Reply_MemberPosts) & "<br />" & vbNewLine
end if
if strPicture = 1 and trim(Reply_MemberPhoto) <> "" then
Response.Write " " & getCurrentIcon(trim(Reply_MemberPhoto), ChkString(Reply_MemberName,"display"), " width=""64"" height=""64""") & "<br />" & vbNewLine
end if
Response.Write " </p>" & vbNewLine & _ Lines 790 - 793 if strShowRank = 2 or strShowRank = 3 then
Response.Write " " & getStar_Level(Member_Level, Member_Posts) & "<br />" & vbNewLine
end if
if strPicture = 1 and trim(Member_Photo) <> "" then
Response.Write " " & getCurrentIcon(trim(Member_Photo), ChkString(Member_Name,"display"), " width=""64"" height=""64""") & "<br />" & vbNewLine
end if
Response.Write " </p>" & vbNewLine & _
And that should be it!
Note: I've constrained the photos to 64x64 pixels, but you can alter this by changing the four underlined occurences of 64 in the snippets above.
|
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.” |
|
|
Darkness
Junior Member
Italy
145 Posts |
Posted - 19 March 2003 : 14:07:38
|
Do nopt Work. I have this:
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: ""]'
/forum/inc_func_common.asp, line 630
|
|
|
Gonzbert
Starting Member
30 Posts |
Posted - 19 March 2003 : 15:43:39
|
I have released such a mod some time ago (maybe a year), but the archiv seems to have eaten that topic...
but MeTVs code should surely work fine! |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 20 March 2003 : 04:37:47
|
Hmm, that's strange. What function in your inc_func_common.asp is line 630 in? Have you made any changes to it? Can you post that line of code? The only function I've used from inc_func_common.asp is ChkString, you could try removing it from my changes, see if that would work.
|
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.” |
|
|
Hamlin
Advanced Member
United Kingdom
2386 Posts |
Posted - 20 March 2003 : 05:22:40
|
quote: Originally posted by Darkness
Do nopt Work. I have this:
Microsoft VBScript runtime error '800a000d'
Type mismatch: '[string: ""]'
/forum/inc_func_common.asp, line 630
You see this sort of error a lot in the mod forums when people have not edited the numbers correctly.
quote:
rM_COUNTRY = 11 rM_PHOTO = 12 rREPLY_ID = 13 rFORUM_ID = 14 rR_AUTHOR = 15 rTOPIC_ID = 16 rR_MESSAGE = 17 rR_LAST_EDIT = 18 rR_LAST_EDITBY = 19 rR_SIG = 20 rR_STATUS = 21 rR_DATE = 22 if CanShowSignature = 1 then rM_SIG = 23 end if
|
Edited by - Hamlin on 20 March 2003 05:23:07 |
|
|
Darkness
Junior Member
Italy
145 Posts |
Posted - 20 March 2003 : 07:55:38
|
Changing around line 589 to this:
if strPicture = 1 and trim(Reply_MemberPhoto) <> "" and trim(Reply_MemberPhoto) <> "http://www.xxx.com/noimage.gif" then Response.Write "<img src=" & (Reply_MemberPhoto) & ">" & vbNewLine end if
It works perfectly.
|
Edited by - Darkness on 20 March 2003 07:56:39 |
|
|
jfitz
Junior Member
USA
345 Posts |
Posted - 14 April 2003 : 22:08:23
|
We did exactly that on our forum, but we also host the images. Once someone has received one star (25 posts in our forum) they are eligible to submit their photo for posting. We resize it to 80 x 100 and host the photo ourselves. We added a few fields to the FORUM_MEMBERS table to account for the photo name, and whether it's activated (sometimes, a member will want to have their photo removed), and then added code to topic.asp to show the photo. We also added an admin capability to specify the photo name for a given member. Finally, we modified the member profile to include the same photo.
I can send you our code changes if you are interested. |
--Jördan It's a wasted day if you don't spend at least part of it flying upside down. |
|
|
brduran
New Member
Canada
98 Posts |
Posted - 16 June 2003 : 14:40:29
|
I just implemented the changes as described by MeTV, but it returns the following error message when viewing a post,
quote: 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
Any ideas
|
Bernardo Duran www.teknician.com
|
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 17 June 2003 : 04:57:40
|
Is this happening for all member photos or is it just occurring for a handful? If the latter is the case, try and figure out what they all have in common (e.g., no photos in their profile, non-alphanumeric characters in the URI of their photo), it'd make this a bit easier to solve. The only thing I can think of at the momeny is that certain members have a | in their photo URI which would mess things up a bit.
|
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.” |
|
|
Hamlin
Advanced Member
United Kingdom
2386 Posts |
Posted - 17 June 2003 : 05:51:25
|
brduran can you post a link to a text version of your topic.asp file? |
|
|
brduran
New Member
Canada
98 Posts |
Posted - 17 June 2003 : 17:15:10
|
Thank you guys for your response. Here's a link to topic.txt
http://24.85.24.93/forumtest/text/topic.txt
Thank you! |
Bernardo Duran www.teknician.com
|
Edited by - brduran on 17 June 2003 17:16:15 |
|
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 18 June 2003 : 04:44:19
|
One thing I see is that, strarting on line 678 with "rM_TITLE = 6", you need to increment all the values by one up to and including rM_SIG. So rM_TITLE = 7, rMEMBER_ID = 8, and so on.
|
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.” |
|
|
brduran
New Member
Canada
98 Posts |
Posted - 18 June 2003 : 10:27:59
|
Good catch, I didn't see that one, thanks. The not_so_good news is that it didn't make a difference. But, who knows what else could've given me headaches in the future because of it, thank you!
I posted the changes to "topic.txt" http://24.85.24.93/forumtest/text/topic.txt
Any Ideas
|
Bernardo Duran www.teknician.com
|
Edited by - brduran on 19 June 2003 23:15:59 |
|
|
|
Topic |
|