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 Category Error
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

jc4bone
Starting Member

19 Posts

Posted - 27 August 2008 :  23:09:44  Show Profile
I added the avatar category add on mod. This works perfectly on all the admin pages. It also works perfectly when a user is logged in and tries to change their profile. However when a new user is registering and you click the gallery button it gives the following error:


Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
ODBC driver does not support the requested properties.

/forum/pop_avatar_gallery.asp, line 140



I will give you my first 140 lines of code, the final line will be 140:



<%
'#################################################################################
'## Avatar gallery MOD 1.1 Copyright (c) 2003, filo_2k
'#################################################################################
%>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin script
function CheckNav(Netscape, Explorer) {
if ((navigator.appVersion.substring(0,3) >= Netscape && navigator.appName == 'Netscape') ||
(navigator.appVersion.substring(0,3) >= Explorer && navigator.appName.substring(0,9) == 'Microsoft'))
return true;
else return false;
}
// End script -->
</SCRIPT>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_header_short.asp" -->
<!--#INCLUDE FILE="inc_func_common.asp" -->
<%
if Request.QueryString("mode") = "" then
response.redirect "default.asp"
end if


av_user = Request.Querystring("avatar")
currentCat = ""

if Trim(ChkString(av_user,"sqlstring")) <> "" Then
strSql = "SELECT A_CATID, A_URL FROM " & strTablePrefix & "AVATAR WHERE A_URL = '" & av_user & "'"

set rsAvatar = Server.CreateObject("ADODB.Recordset")
rsAvatar.open strSql, my_Conn, 3
if rsAvatar.EOF or rsAvatar.BOF Then
currentCat = ""
Else
currentCat = rsAvatar("A_CATID")
End If
rsAvatar.close
set rsAvatar = nothing
End If

if currentCat <> "" Then
sAvatarCatID = currentCat
Else
sAvatarCatID = Request("ACAT_ID")
currentCat = sAvatarCatID
End If
if currentCat = "" Then
strSQL = "SELECT AC_ID, AC_NAME FROM " & strTablePrefix & "AVATAR_CATS"
set rsfirstCat = my_Conn.Execute(strSql)
currentCat = rsFirstCat("AC_ID")
rsFirstCat.close
set rs=nothing
End If
strSql = "SELECT AC_ID, AC_NAME, AC_STATUS FROM " & strMemberTablePrefix & "AVATAR_CATS WHERE AC_NAME <> 'n/a' ORDER BY AC_NAME ASC;"
set rs = Server.CreateObject("ADODB.Recordset")
rs.open strSql, my_Conn, adOpenForwardOnly, adLockReadOnly, adCmdText

if rs.EOF then
recAvatarCategoryCount = ""
else

allAvatarCategoryData = rs.GetRows(adGetRowsRest)
recAvatarCategoryCount = UBound(allAvatarCategoryData,2)
cAC_ID = 0
cAC_NAME = 1
cAC_STATUS = 2
end if
firstAvatarCatID = allAvatarCategoryData(0, 0)

if sAvatarCatID = "" Then sAvatarCatID = firstAvatarCatID

rs.close
set rs = nothing
Response.Write(" <form name=""ACategories" & fnum & """ action=""pop_avatar_gallery.asp"">" & vbNewLine)
Response.Write(" <input name=""mode"" type=""hidden"" value=""goEdit"">")
Response.Write(" <input name=""member"" type=""hidden"" value=""" & Request.QueryString("member") & """>")
' Response.Write(" <input name=""avatar"" type=""hidden"" value=""" & Request.QueryString("avatar") & """>")

Response.Write "<table border=""0"" cellpadding=""3"" cellspacing=""0"" align=""center"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strPopUpBorderColor & """>" & vbNewLine & _
" <table border=""0"" cellspacing=""1"" cellpadding=""4"">" & vbNewLine & _
" <tr>" & vbNewLine & _
" <td bgcolor=""" & strHeadCellColor & """ colspan=""2"" align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strHeadFontColor & """><b> AVATAR CATEGORIES</b></font></td>" & vbNewLine & _
" </tr>" & vbNewLine & _
" <tr><td bgcolor=""" & strCategoryCellColor & """><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>Pick a Category To view:</td>" & _
" <td bgcolor=""" & strCategoryCellColor & """>"

Response.Write(" <select name=""ACAT_ID"" onchange=""document.ACategories.submit();"">")
if recAvatarCategoryCount <> "" then
for iACat = 0 to recAvatarCategoryCount
Acat_ID = allAvatarCategoryData(cAC_ID, iACat)
Acat_Name = allAvatarCategoryData(cAC_NAME, iACat)
Response.Write " <option value=""" & Acat_ID & """ "
if Acat_ID = Int(sAvatarCatID) Then Response.Write "selected"
Response.Write ">" & ChkString(Acat_Name,"display") & "</option>" & vbNewline
next
end if

Response.Write " </select></td>" & _
" </tr>" & _
" </table></td></tr></table>"
Response.Write(" </form>" & vbNewLine)

strTempFont = "<font face=""" & strDefaultFontFace & """ size=" & strDefaultFontSize & ">"
response.write "<form name=""av_radio"">" & vbNewline
response.write "<table border=""0"" width=""95%"" cellspacing=""1"" cellpadding=""3"" bgcolor=""" & strTableBorderColor & """>" & vbNewline &_
" <tr bgcolor=""" & strHeadCellColor & """>" & vbNewline &_
" <td width=""50%"" align=""center""> </td>" & vbNewline &_
" <td width=""50%"" align=""center""> </td>" & vbNewline &_
" </tr>" & vbNewline





'##### Get Avatar's from DB
strSql = "SELECT AV.A_ID, "
strSql = strSql & "AV.A_URL, "
strSql = strSql & "AV.A_NAME, "
strSql = strSql & "AV.A_MEMBER_ID, "
strSql = strSql & "AV.A_CATID "
strSql = strSql & " FROM " & strTablePrefix & "AVATAR AV "
strSql = strSql & " WHERE "
if currentCat <> "" Then
strSql = strSql & " AV.A_CATID = " & currentCat & " AND "
end if
if Request.Querystring("mode") <> "Register" then strSql = strSql & " ("
strSql = strSql & "AV.A_MEMBER_ID = 0 "

if Request.Querystring("mode") <> "Register" then
strSql = strSql & " OR AV.A_MEMBER_ID = " & Request.Querystring("member") & ")"
end if

strSql = strSql & " ORDER BY AV.A_NAME ASC;"
'Response.Write strSql
'Response.End
set rsAvatar = Server.CreateObject("ADODB.Recordset")
rsAvatar.open strSql, my_Conn, 3






I have not modified this file in any way, any ideas?

jc4bone
Starting Member

19 Posts

Posted - 28 August 2008 :  00:03:41  Show Profile
Small update. This will open the first category that was created, Misc. when a new user is registering, but the error occurs when you try to change categories. But again, this works fine when changing a profile of a logged on user.<
Go to Top of Page

jc4bone
Starting Member

19 Posts

Posted - 28 August 2008 :  11:35:50  Show Profile
The readme installation instructions are below, is there anything missing? Because there is a 5. with nothing after it.

-------------------------------------------------------------
INSTALLATION (PLEASE READ CAREFULLY)
-------------------------------------------------------------


1. Assuming you have already installed Avatar Mod, first back up following files.

inc_avatar.asp
admin_avatar_home.asp
admin_add_avatar.asp
admin_review_avatar.asp
admin_edit_avatar.asp

2. Upload dbs_avatar_categories.asp to your server and run MOD SETUP

Mod Setup will create table for Avatar Categories and open a default category with
name "Misc" and modify all of your existing avatars to that category.

3. Copy above files to your directory. If you have modified your admin files for avatar mod I suggest you double check it.

4. Open inc_avatar.asp
---------------------
Find following line (around line 140):
--------------------

response.write " <img name=""URL"" src=""" & rs("M_AVATAR_URL") & """ width=""" & intAvatarWidth & """ height=""" & intAvatarHeight & """ border=""" & intAvatarBorder & """>"
end if



'--------------------
Then Add following directly below 'end if'
'--------------------

Response.Write "<br><p>" & vbNewLine & _
"<input value=""Galeri"" name=""gallery"" type=""button"" onclick=""openWindow3('pop_avatar_gallery.asp?mode=" & Request.Querystring("mode") & ""
if Request.Querystring("mode") <> "Register" then
Response.Write "&member=" & rs("Member_ID") & "&avatar=" & rs("M_AVATAR_URL") & "#" & rs("M_AVATAR_URL")
end if
Response.Write "')"">


5.<
Go to Top of Page

jc4bone
Starting Member

19 Posts

Posted - 28 August 2008 :  21:37:09  Show Profile
Fixed the problem. Here is what I did.

in pop_avatar_gallery.asp I edited the lines 76-80 to be the following:

if Request.Querystring("mode") = "Register" then
Response.Write(" <input name=""mode"" type=""hidden"" value=""Register"">")
else
Response.Write(" <input name=""mode"" type=""hidden"" value=""goEdit"">")
end if<
Go to Top of Page

Etymon
Advanced Member

United States
2396 Posts

Posted - 28 August 2008 :  22:07:28  Show Profile  Visit Etymon's Homepage
Thank you for the update jc! <
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 1.93 seconds. Powered By: Snitz Forums 2000 Version 3.4.07