MOD: Avatar Categories W/ Avatar Gallery

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/59564?pagenum=1
04 November 2025, 15:08

Topic


SiSL
MOD: Avatar Categories W/ Avatar Gallery
23 September 2005, 14:36


-----------------------------------------------------------
AVATAR CATEGORIES for Snitz 3.4 v1.0
Posted 9/23/2005 - SiSL
-----------------------------------------------------------

This mod allows you to edit / manage categories for your Avatar Mod also includes modified version of Avatar Gallery mod by filo_2k

This package includes following files and REQUIRES AVATAR MOD by Hamlin for 3.4 over Richard Kinser's..
Excuse if I missed any step (my first public mod) Hope that helps.
Download
UPDATE: DBS file change
<

 

Replies ...


Podge
23 September 2005, 15:35


Do you have a demo account and url ?<
SiSL
23 September 2005, 15:49


http://www.amedia.org/forum/

user: demo
pass: test

You can view from Profile, also admin sections having additions to add all avatars in category.
Admin Category Maintenance screen:



Admin Add Avatar Screen:




Admin Avatar Review / Edit Screen:



<
modifichicci
27 September 2005, 16:43


Good work, I see. I haven't tryed it, but I'll do soon. Only a question about the dbs:

these lines
[UPDATE] AVATAR
(AC_ID)#('1')
[END] AC_ID isn't in AVATAR, is it right? What update do they? <
SiSL
27 September 2005, 18:08


Originally posted by modifichicci
Good work, I see. I haven't tryed it, but I'll do soon. Only a question about the dbs:

these lines
[UPDATE] AVATAR
(AC_ID)#('1')
[END] AC_ID isn't in AVATAR, is it right? What update do they?

it is Avatar Category ID determining Avatar to be in which category and it is in AVATAR table.<
modifichicci
28 September 2005, 08:34


it is Avatar Category ID determining Avatar to be in which category and it is in AVATAR table.
This is the dbs file, but I don't see the command to create AC_ID in AVATAR, it is create in AVATARS_CATS. Where I am wrong?
[CREATE] AVATAR_CATS
AC_ID
AC_NAME#varchar (255)#NULL#
AC_STATUS#int#NULL#0
[END] [ALTER] AVATAR
ADD#A_CATID#int#NULL#1
[END] [INSERT] AVATAR_CATS
(AC_NAME,AC_STATUS)#('Misc','0')
[END] [UPDATE] AVATAR
(AC_ID)#('1')
[END]<
Shaggy
28 September 2005, 08:47


The last 4 lines of that dbs adds the AC_ID field to the AVATAR table.
<
modifichicci
28 September 2005, 11:48


Ok thank you!<
Shaggy
28 September 2005, 12:20


You're welcome smile
<
SiSL
28 September 2005, 17:18


Thank you, I'm kinda new on DBS file editing also having questions like that :(

http://forum.snitz.com/forum/topic.asp?TOPIC_ID=59629
<
modifichicci
28 September 2005, 17:25


ohhh so I was not wrong... Thank you again for my update knowledge!<
SiSL
28 September 2005, 21:07


You know whats funny?
I re-checked my codes now and you don't even need AC_ID in AVATAR table. Silly me, it was something I used in first tries and forgot to remove it and asking for your forgiveness. So I deleted this line, that's why it does not give error after installation. I use A_CATID for my variables, not AC_ID from AVATAR table :)

So I re-uploaded this mod to Snitzbitz, you can find download link at original post. <
Shaggy
29 September 2005, 06:26


Whoa! I must've been looking at that dbs completely wrong! blush
<
Gort
21 April 2006, 16:03


Great MOD!
But your text colors are off - you're defining <td> bgcolor as category background but you're not using category background font color.....
I fixed it by replacing strDefaultFontColor with strCategoryfontcolor where ever the the TD bgcolor was strCategoryCellColor<
Gort
21 April 2006, 19:13


I found another problem....my avatars aren't uploading correctly.
For some reason, the strCatID is not making its way into my sql statement. response.write on the statements gives the following:

INSERT INTO FORUM_AVATAR (A_URL, A_NAME, A_MEMBER_ID, A_CATID) VALUES ('avatars/batman1.jpg', 'batman1', 0, )
Microsoft JET Database Engine error '80040e14'
Syntax error in INSERT INTO statement.

/board/avatar_upload.asp, line 201


Does anyone have any ideas? <
shaggy073077
15 March 2013, 10:41


Can somebody tell me what I'm doing wrong.
Code:
Microsoft VBScript compilation error- Error '800a0409'

Unterminated string constant

/inc_avatar.asp, line 159

Response.Write "')"">
---------------------^

The problem lies in inc_avatar.asp which the part of the inc_avatar.asp file it's talking about is:

Code:
<br>
<%
else
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>You must register first, login and then edit profile to select avatar.</font></p>" & vbNewline
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 "')"">
%>
<!--#INCLUDE file="inc_footer_short.asp" -->

Any help?
Carefree
15 March 2013, 10:45


Yes - line 159 needs a closing quotation mark, move the greater than symbol one space to the left like this:

Code:
Response.Write "')">"
shaggy073077
15 March 2013, 12:17


Ok now it kind of loads up. I see on the bottom of the screen this:

Code:
Microsoft VBScript runtime error- Error '800a000d'

Type mismatch: 'rs'

/inc_avatar.asp, line 157

I have changed to what you said and still can't pull up the gallery.
Originally posted by Carefree
Yes - line 159 needs a closing quotation mark, move the greater than symbol one space to the left like this:

Code:
Response.Write "')">"
shaggy073077
15 March 2013, 13:53


I just thought of a better idea.
inc_avatar.asp file it's to be rewritten and recoded I think completely.
Here's what I'd like:

1.) have this mod installed

2.) go into acp--->avatar home--->then click on review/edit avatar.
3.) there u go. That small window is what I'd like to show. the one on top that says "Avatar Catagories" and then right below that it says "Pick a catagory to view:<drop down menu>" That window right there.
I have noticed that with this mod inc_avatar.asp page seems to have all avatars running down in ascending order instead of above mentioned #3 and just that window there in inc_avatar.asp.
Is this possbile?
Carefree
15 March 2013, 16:03


Post a link to your "inc_avatar.asp" file in .txt format; I'll solve it for you.
shaggy073077
15 July 2013, 17:12


Originally posted by Carefree
Post a link to your "inc_avatar.asp" file in .txt format; I'll solve it for you.

Code:
<%
'#################################################################################
'## Copyright (C) 2000 Michael Anderson and Pierre Gorissen
'##
'## This program is free software; you can redistribute it and/or
'## modify it under the terms of the GNU General Public License
'## as published by the Free Software Foundation; either version 2
'## of the License, or any later version. '##
'## All copyright notices regarding Snitz Forums 2000
'## must remain intact in the scripts and in the outputted HTML
'## The "powered by" text/logo with a link back to
'## http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet. '##
'## This program is distributed in the hope that it will be useful,
'## but WITHOUT ANY WARRANTY; without even the implied warranty of
'## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
'## GNU General Public License for more details. '##
'## You should have received a copy of the GNU General Public License
'## along with this program; if not, write to the Free Software
'## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. '##
'## Support can be obtained from support forums at:
'## http://forum.snitz.com
'##
'## Correspondence and Marketing Questions can be sent to:
'## reinhold@bigfoot.com
'##
'## or
'##
'## Snitz Communications
'## C/O: Michael Anderson
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
'## Part of the Avatar Mod by: Richard Kinser ##
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE file="inc_header_short.asp" -->

<%
'###### Avatar addon #####
if strDBNTUserName <> "" then
'###### Avatar addon #####
%>

<script language="JavaScript">
function retinfo(V2,width,height)
{
window.opener.document.forms['Form1'].<%= Request.QueryString("box")%>.value=V2;
window.opener.document.forms['Form1'].AvatarW.value=width;
window.opener.document.forms['Form1'].AvatarH.value=height;
self.close();
}
</script>
<%
'###### Avatar addon #####
dim jj, bb
bb = 0
jj = Request.QueryString("mmmid")
if jj = "" then jj = 0
'###### Avatar addon #####

%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="top">
<tr>
<td bgcolor="<% =strTableBorderColor %>">
<table width="100%" align="center" border="0" cellspacing="1" cellpadding="4">
<tr>
<td align="left" bgcolor="<% =strHeadCellColor %>" colspan="2"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Our Avatars</font></b></td>
</tr>
<tr>
<td align="center" bgcolor="<% =strCategoryCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Preview</font></b></td>
<td align="center" bgcolor="<% =strCategoryCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Select This Avatar</font></b></td>
</tr>
<%
'## Forum_SQL - Get Avatar Settings from DB
strSql = "SELECT " & strTablePrefix & "AVATAR2.A_HSIZE"
strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_WSIZE"
strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_BORDER"
strSql = strSql & " FROM " & strTablePrefix & "AVATAR2"

set rsav = my_Conn.Execute (strSql)

'## Forum_SQL - Get Avatars from DB
strSql = "SELECT " & strTablePrefix & "AVATAR.A_ID"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_URL"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_NAME"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_WIDTH"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_HEIGHT"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_MEMBER_ID"
strSql = strSql & " FROM " & strTablePrefix & "AVATAR "
'###### Avatar addon #####
strSql = strSql & " WHERE " & strTablePrefix & "AVATAR.A_MEMBER_ID = " &jj
strSql = strSql & " OR " & strTablePrefix & "AVATAR.A_MEMBER_ID = " &bb
strSql = strSql & " ORDER BY " & strTablePrefix & "AVATAR.A_ID ASC;"
'###### Avatar addon #####

set rs = Server.CreateObject("ADODB.Recordset")
rs.cachesize = 20
rs.open strSql, my_Conn, 3

if rs.EOF or rs.BOF then '## No replies found in DB
%>
<tr>
<td bgcolor="<% =strForumFirstCellColor %>" colspan="2"><font face="<% =strDefaultFontFace %>" color="<% =strForumFontColor %>" size="<% =strDefaultFontSize %>" valign="top"><b>No Avatars Found</b></font></td>
</tr>
<%
else
rs.movefirst
rs.pagesize = strPageSize
maxpages = cint(rs.pagecount)
intI = 0
howmanyrecs = 0
rec = 1

do until rs.EOF '**
if intI = 0 then
CColor = strForumFirstCellColor
else
CColor = strAltForumCellColor
end if
%>
<tr>
<td bgcolor="<% =CColor %>" valign="center" align="center" nowrap><img src="<% =rs("A_URL") %>" width=<% =rs("A_WIDTH") %> height=<% =rs("A_HEIGHT") %> border=<% =rsav("A_BORDER") %> hspace=0 alt="<% =rs("A_NAME") %>"></td>
<td bgcolor="<% =CColor %>" valign="center" align="center"><p><form>
<font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><input class=buttons type="button" onClick="JavaScript:retinfo('<% =rs("A_URL") %>','<% =rs("A_WIDTH") %>','<% =rs("A_HEIGHT") %>')" value="Use This Avatar"></font></form></p>
<font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Avatar Name:</b><br><% =rs("A_NAME") %></font></td>
</tr>
<%
rs.MoveNext
intI = intI + 1
if intI = 2 then
intI = 0
end if
rec = rec + 1
loop
end if
rs.close
set rs = nothing
set rsav = nothing
%>
</table></td>
</tr>
</table>
<br>
<%
else
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>You must register first, login and then edit profile to select avatar.</font></p>" & vbNewline
end if
Response.Write "<br><p>" & vbNewLine & _
"<input value=""Gallery"" 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 "')">""
%>
<!--#INCLUDE file="inc_footer_short.asp" -->

There u go. Sorry for the delay been on vacation. It seems like there's no such thing as vacation cuz u work and there's pretty much no R&R. I went camping. So there was pretty much not really R&R. I went July 1st and 2nd and threw in the towel the morning of the second. My knee caps (both of'em at the same time) and allergies. I said see'ya I'll be back. Been working 100 mph since. Sorry for the delay in response
Carefree
15 July 2013, 18:33


I didn't code your select option, but this should fix your previous issue.
Code:

<%
'###############################################################################
'##
'## Snitz Forums 2000 v3.4.07
'##
'###############################################################################
'##
'## Copyright © 2000-09 Michael Anderson, Pierre Gorissen,
'## Huw Reddick and Richard Kinser
'##
'## This program is free. You can redistribute and/or modify it under the
'## terms of the GNU General Public License as published by the Free Software
'## Foundation; either version 2 or (at your option) any later version. '##
'## All copyright notices regarding Snitz Forums 2000 must remain intact in
'## the scripts and in the HTML output. The "powered by" text/logo with a
'## link back to http://forum.snitz.com in the footer of the pages MUST
'## remain visible when the pages are viewed on the internet or intranet. '##
'## This program is distributed in the hope that it will be useful but
'## WITHOUT ANY WARRANTY; without even an implied warranty of MERCHANTABILITY
'## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
'## for more details. '##
'## You should have received a copy of the GNU General Public License along
'## with this program; If not, write to:
'##
'## Free Software Foundation, Inc. '## 59 Temple Place, Suite 330
'## Boston, MA 02111-1307
'##
'## Support can be obtained from our support forums at:
'##
'## http://forum.snitz.com
'##
'## Correspondence and marketing questions can be sent to:
'##
'## manderson@snitz.com
'##
'###############################################################################
'## Part of the Avatar Mod by: Richard Kinser ##
'###############################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE file="inc_header_short.asp" -->
<%
If strDBNTUserName <> "" Then
%>
<script language="JavaScript">
function retinfo(V2,width,height){
window.opener.document.forms['Form1'].<%= Request.QueryString("box")%>.value=V2;
window.opener.document.forms['Form1'].AvatarW.value=width;
window.opener.document.forms['Form1'].AvatarH.value=height;
self.close();
}
</script>
<%
dim jj, bb
bb = 0
jj = Request.QueryString("mmmid")
If jj = "" Then jj = 0
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="top">
<tr>
<td bgcolor="<% =strTableBorderColor %>">
<table width="100%" align="center" border="0" cellspacing="1" cellpadding="4">
<tr>
<td align="left" bgcolor="<% =strHeadCellColor %>" colspan="2"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Our Avatars</font></b></td>
</tr>
<tr>
<td align="center" bgcolor="<% =strCategoryCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Preview</font></b></td>
<td align="center" bgcolor="<% =strCategoryCellColor %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Select This Avatar</font></b></td>
</tr>
<%
strSql = "SELECT " & strTablePrefix & "AVATAR2.A_HSIZE"
strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_WSIZE"
strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_BORDER"
strSql = strSql & " FROM " & strTablePrefix & "AVATAR2"
Set rsAv = my_Conn.Execute(strSql)
If not rsAv.EOF Then
intHS=rsAv("AVATAR2.A_HSIZE")
intWS=rsAv("AVATAR2.A_WSIZE")
intAB=rsAv("AVATAR2.A_BORDER")
rsAv.Close
End If
Set rsAv=Nothing
strSql = "SELECT " & strTablePrefix & "AVATAR.A_ID"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_URL"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_NAME"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_WIDTH"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_HEIGHT"
strSql = strSql & ", " & strTablePrefix & "AVATAR.A_MEMBER_ID"
strSql = strSql & " FROM " & strTablePrefix & "AVATAR "
strSql = strSql & " WHERE " & strTablePrefix & "AVATAR.A_MEMBER_ID = " &jj
strSql = strSql & " OR " & strTablePrefix & "AVATAR.A_MEMBER_ID = " &bb
strSql = strSql & " ORDER BY " & strTablePrefix & "AVATAR.A_ID ASC"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.cachesize = 20
rs.Open(strSql, my_Conn, 3)
If rs.EOF or rs.BOF Then
%>
<tr>
<td bgcolor="<% =strForumFirstCellColor %>" colspan="2"><font face="<% =strDefaultFontFace %>" color="<% =strForumFontColor %>" size="<% =strDefaultFontSize %>" valign="top"><b>No Avatars Found</b></font></td>
</tr>
<%
Else
rs.MoveFirst
rs.pagesize = strPageSize
maxpages = cInt(rs.pagecount)
intI = 0
howmanyrecs = 0
rec = 1
Do until rs.EOF
If intI = 0 Then
CColor = strForumFirstCellColor
Else
CColor = strAltForumCellColor
End If
intRSID=rs("MEMBER_ID")
strAvatar=rs("M_AVATAR_url")
%>
<tr>
<td bgcolor="<% =CColor %>" valign="center" align="center" nowrap><img src="<% =rs("A_URL") %>" width=<% =rs("A_WIDTH") %> height=<% =rs("A_HEIGHT") %> border=<% =rsAv("A_BORDER") %> hspace=0 alt="<% =rs("A_NAME") %>"></td>
<td bgcolor="<% =CColor %>" valign="center" align="center"><p><form>
<font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><input class=buttons type="button" onClick="JavaScript:retinfo('<% =rs("A_URL") %>','<% =rs("A_WIDTH") %>','<% =rs("A_HEIGHT") %>')" value="Use This Avatar"></font></form></p>
<font color="<% =strForumFontColor %>" face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"><b>Avatar Name:</b><br><% =rs("A_NAME") %></font></td>
</tr>
<%
rs.MoveNext
intI = 1 - intI
rec = rec + 1
Loop
rs.Close
End If
Set rs = Nothing
%>
</table>
</td>
</tr>
</table><br />
<%
Else
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """>You must register first, login and Then edit profile to select avatar.</font></p>" & vbNewline
End If
Response.Write "<br><p>" & vbNewLine & _
"<input value=""Gallery"" name=""gallery"" type=""button"" onclick=""openWindow3('pop_avatar_gallery.asp?mode=" & Request.Querystring("mode") & ""
If Request.QueryString("mode") <> "Register" Then
Response.Write "&member=" & intRSID & "&avatar=" & strAvatar & "#" & strAvatar
End If
Response.Write "')">"
WriteFooterShort
%>
© 2000-2021 Snitz™ Communications