MOD: Avatar Categories W/ Avatar Gallery - Posted (4095 Views)
Average Member
SiSL
Posts: 671
671
-----------------------------------------------------------
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
<
 Sort direction, for dates DESC means newest first  
 Page size 
Posted
Advanced Member
Carefree
Posts: 4224
4224
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
%>
You Must enter a message