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 Add-on Problem
 New Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

MaGraham
Senior Member

USA
1297 Posts

Posted - 01 July 2012 :  22:41:36  Show Profile  Reply with Quote


I can't seem to do anything right lately! After doing an "Avatar View Mod Add-on" so members could have the option to turn off the avatars, I now have TWO of the little "View avatar in posts" options in the profile area! And if I try to change anything in my profile, as soon as I click on the "submit" button I get this error below.

Any clues with this? Here's the error.



Microsoft VBScript runtime error '800a000d'

Type mismatch: 'cLng'

/tfp/pop_profile.asp, line 1394





I also did the "Avatar View Logout Mod" (another one of the 4-in-one avatar mods like the one above) by cripto9ts (3rd from the bottom here http://www.snitzbitz.com/mods/details.asp?Version=All&mid=52) in which the member's avatar is supposed to replace the logout button. I had a custom logout button and doing that mod merely changed my logout button back to the default logout button.

The only instructions for the "Avatar View Logout Mod" were in the inc_header.asp file as here below:




Find this code (about line 402):

if strAuthType = "db" then
Response.Write "<b>" & ChkString(strDBNTUserName, "display") & "</b></font></td>" & vbNewLine & _
" <td>"
if strGfxButtons = "1" then
Response.Write "<input src=""" & strImageUrl & "button_logout.gif"" type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1"">"
else
Response.Write "<input type=""submit"" value=""Logout"" id=""submit1"" name=""submit1"" tabindex=""-1"">"
end if
end if


_____________________________________________


Replace with this code:


if strAuthType = "db" then
Response.Write "<b>" & ChkString(strDBNTUserName, "display") & "</b></font></td>" & vbNewLine & _
" <td align=""center"">"
strSqL = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.M_AVATAR_URL"
strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS"
strSql = strSql & " Where " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'"

set rs = my_Conn.Execute (strSql)

if strGfxButtons = "1" and (chkString(rs("M_AVATAR_URL"),"sqlString") <> "noavatar.gif" and CanShowAvatar = 1) then
Response.Write "<input src=""" & chkString(rs("M_AVATAR_URL"),"display") & """ width=""" & intAvatarWidth & """ height=""" & intAvatarHeight & """ type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1""><br />" & vbNewLine & _
"<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strFooterFontSize & """>log-out</font><br />"
elseif strGfxButtons = "1" and strShowAvatar = 1 and CanShowAvatar = 1 and chkString(rs("M_AVATAR_URL"),"sqlString") = "noavatar.gif" then
Response.Write "<input src=""" & strImageUrl & "button_logout.gif"" type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1"">"
else
Response.Write "<input type=""submit"" value=""Logout"" id=""submit1"" name=""submit1"" tabindex=""-1"">"
end if
rs.close
set rs=nothing
end if


_____________________________________________



I am not sure if the "Avatar View Logout Mod" has anything to do with the pop_profile.asp error, but I am going to post my inc_header.asp in txt format and my pop_profile.asp in txt format and also my inc_avatar.asp in txt format, too.

pop_profile.asp in txt format

inc_header.asp in txt format

inc_avatar.asp in txt format



Any help will be Soooo greatly appreciated!!



FYI - I have started over so I could use the MySQL database instead of the MS SQL database so that's obviously the reason I am doing all of these mods again.





"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley

Edited by - MaGraham on 01 July 2012 23:25:28

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 01 July 2012 :  23:22:11  Show Profile
The view avatar bit is in "inc_avatar.asp".

Replace that line in "pop_profile.asp" with these:


         If Request.Form("ViewAvatar") > "" then
                 if isNumeric(Request.Form("ViewAvatar")) Then
                     strSql = strSql & ", M_VIEW_AVATAR = " & cLng(Request.Form("ViewAvatar"))
                 else
                     strSql = strSql & ", M_VIEW_AVATAR = 0"
                    
                 end if
         End If


Replace the code for "inc_header.asp" as follows:


		if strAuthType = "db" then 
			Response.Write	"<b>" & ChkString(strDBNTUserName, "display") & "</b></font></td>" & vbNewLine & _
				"                <td align=""center"">"
			strSqL = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " & strMemberTablePrefix & "MEMBERS.M_NAME, " & strMemberTablePrefix & "MEMBERS.M_AVATAR_URL"
			strSql = strSql & " FROM " & strMemberTablePrefix & "MEMBERS"
			strSql = strSql & " Where " & strMemberTablePrefix & "MEMBERS.M_NAME = '" & strDBNTUserName & "'" 
			set rs = my_Conn.Execute (strSql)
			if strGfxButtons = "1" and (rs("M_AVATAR_URL") <> "noavatar.gif" and strShowAvatar = 1) then 
				Response.Write  "<input src=""" & chkString(rs("M_AVATAR_URL"),"display") & """ width=""" & intAvatarWidth & """ height=""" & intAvatarHeight & """ type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1""><br />" & vbNewLine & _
					"<font face=""" & strDefaultFontFace & """ color=""" & strForumFontColor & """ size=""" & strFooterFontSize & """>log-out</font><br />"
			elseif strGfxButtons = "1" and (strShowAvatar = 0 or rs("M_AVATAR_URL") = "noavatar.gif") then
				Response.Write	"<input src=""" & strImageUrl & "button_logout.gif"" type=""image"" border=""0"" value=""Logout"" id=""submit1"" name=""Logout"" tabindex=""-1"">"
			else
				Response.Write	"<input type=""submit"" value=""Logout"" id=""submit1"" name=""submit1"" tabindex=""-1"">" 
			end if
			rs.close
			set rs=nothing
		end if

Edited by - Carefree on 01 July 2012 23:24:00
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 01 July 2012 :  23:28:14  Show Profile


Just added my inc_avatar.asp in txt format to my post above, Carefree.

I'll check these out in a few. . .

THANK YOU SO MUCH!




"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 01 July 2012 :  23:55:12  Show Profile
In "inc_avatar.asp", delete lines 149-162.
Go to Top of Page

MaGraham
Senior Member

USA
1297 Posts

Posted - 02 July 2012 :  03:58:39  Show Profile

OH MY!! You solved ALL of the problems, Carefree!!

Everything works PERFECT!!

You are Sooo INCREDIBLE!!

Thank you SO MUCH!!


God bless!



"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley
Go to Top of Page

Carefree
Advanced Member

Philippines
4222 Posts

Posted - 02 July 2012 :  08:51:02  Show Profile
You're welcome.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.36 seconds. Powered By: Snitz Forums 2000 Version 3.4.07