Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Help Groups for Snitz Forums 2000 Users
 Help: MOD Implementation
 Avatar mod problem (viewing profile returns error)
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

redharmonic
Starting Member

Canada
3 Posts

Posted - 22 June 2003 :  23:16:14  Show Profile  Visit redharmonic's Homepage
I recently implemented the avatar mod into my forums. now, when I try to view or edit my profile (or that of another member), I get a "The page cannot be displayed" error. I've checked over my pop_profile.asp and topic.asp files a number of times for mistakes in the code, and haven't found any (same deal with the other modified files).

here they are in text format:
http://da4.figaming.com/ryanm/topic.asp
http://da4.figaming.com/ryanm/pop_profile.asp

and here is a link to the temporary home of my forums:
http://www28.brinkster.com/hubofexponents/forum/default.asp

I'm using Snitz version 3.4.03

any help would be really appreciated!

--Ryan

Francodepaw
Junior Member

USA
111 Posts

Posted - 23 June 2003 :  01:54:37  Show Profile
Is your database MySql? Check the values of the fields in the Avatar table. Two fixes here the second sounds like what you are experiencing.

This I posted on Server Hackers Forum.

The first issue I had was a result of converting from Access to MySql (use MySql Front) M_AVATAR in the MEMBERS database was Created as a Text Field. Everytime someone would delete thier avatar and leave the field blank when any tried to view thier profile it would error out with the following error.

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E21)
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.

Changed M_AVATAR from text field to varchar field with a length of 255 and that fixed that one.


The second issue I ran across was when someone deleted thier Quote, News or Bio it would result in the same error as above.

I found on Snitz.net that in Sql Queries the blob fields must be in the correct order as they are read into the string.

I found M_NEWS to be in the wrong location.

My pop_profile.asp ended up looking like this:

strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_HOBBIES"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_LNEWS"
strsql = strsql & ", " & strMemberTablePrefix & "MEMBERS.M_QUOTE"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_BIO"
'#########Avatar Start###########
if StrShowAvatar = "1" then
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_WIDTH"
strSql = strSql & ", " & strMemberTablePrefix & "MEMBERS.M_AVATAR_HEIGHT"
end if
'#########Avatar End#############
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS "
strSql = strSql & " WHERE MEMBER_ID=" & ppMember_ID

And a little further down I moved strMyLNews above Myquote just to keep it fluid.

strMyHobbies = rs("M_HOBBIES")
strMyLNews = rs("M_LNEWS")
strMyQuote = rs("M_QUOTE")
strMyBio = rs("M_BIO")

Worked for me


Edited by - Francodepaw on 23 June 2003 01:55:18
Go to Top of Page

DoraMoon
Average Member

Taiwan
661 Posts

Posted - 23 June 2003 :  09:31:40  Show Profile
hi~ Ryan,

there are 2 lines missing on your pop_profile.asp modified code..
at line.308
end if ' strPicture
If strShowAvatar = "1" then
if IsNull(rs("M_AVATAR_URL")) or rs("M_AVATAR_URL") = "" or rs("M_AVATAR_URL") = " " or rs("M_AVATAR_URL") = "noavatar.gif" then

Response.write " <tr>" & vbNewLine & _

try correcting it and see if this can solve your problem.

and another thing.. if you hav'nt turned off the "friendly error message" on your IE setting yet.
i'll suggest that you just do it now.
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=27452&SearchTerms=friendly,error,ie
then you'll know the detail error message and line number easily when got problem with your modded code next time.
Go to Top of Page

redharmonic
Starting Member

Canada
3 Posts

Posted - 23 June 2003 :  19:28:46  Show Profile  Visit redharmonic's Homepage
wow. you people are amazing. thanks a bunch for your efforts. it's all working properly now.

Francodepaw-> I'm on the free brinkster server, which is using Access. However, I'll be changing servers soon, and your reply may come in handy.

thanks again. :D

--Ryan
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07