Here is an excerp from the readme files with the nessisary changes to display flash avtars.
*******************************
In the file: TOPIC.ASP *
*******************************
look for this code: (around line #383)
-------------------------------------------
<br><% if Trim(rsReplies("M_AVATAR_URL")) <> "" and lcase(rsReplies("M_AVATAR_URL")) <> "noavatar.gif" and (IsNull(rsReplies("M_AVATAR_URL")) = false) then %>
<% '## Forum_SQL - Get Avatar Settings from DB
strSql = "SELECT " & strTablePrefix & "AVATAR2.A_WSIZE"
strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_HSIZE"
strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_BORDER"
strSql = strSql & " FROM " & strTablePrefix & "AVATAR2"
set rsav = my_Conn.Execute (strSql) %>
<img src="<% =rsReplies("M_AVATAR_URL") %>" align="absmiddle" width=<% =rsav("A_WSIZE") %> height=<% =rsav("A_HSIZE") %> border=<% =rsav("A_BORDER") %> hspace="0" ><% set rsav = nothing %><% end if %>
replace the line that has just the <br> on it with this:
<br><% = getStar_Level(rsReplies("M_LEVEL"), rsReplies("M_POSTS")) %>
<% end if %>
<% if Trim(rsReplies("M_AVATAR_URL")) <> "" and lcase(rsReplies("M_AVATAR_URL")) <> "noavatar.gif" and (IsNull(rsReplies("M_AVATAR_URL")) = false) then
'## Forum_SQL - Get Avatar Settings from DB
strSql = "SELECT " & strTablePrefix & "AVATAR2.A_WSIZE"
strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_HSIZE"
strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_BORDER"
strSql = strSql & " FROM " & strTablePrefix & "AVATAR2"
set rsav = my_Conn.Execute (strSql)
strExtension = Mid(rsReplies("M_AVATAR_URL"), InstrRev(rsReplies("M_AVATAR_URL"), "."))
if strExtension = ".swf" then
response.write "<embed src=""" & rsReplies("M_AVATAR_URL") & """ align=""absmiddle"" width=""" & rsav("A_WSIZE") & """ height=""" & rsav("A_HSIZE") & """ border=""" & rsav("A_BORDER") & """ hspace=""0"" ></embed>" & VBNewLine
else
response.write "<img src=""" & rsReplies("M_AVATAR_URL") & """ align=""absmiddle"" width=""" & rsav("A_WSIZE") & """ height=""" & rsav("A_HSIZE") & """ border=""" & rsav("A_BORDER") & """ hspace=""0"" >" & VBNewLine
end if
set rsav = nothing
end if %>
look for this code: (around line #539)
-------------------------------------------
<br><% if Trim(rsTopic("M_AVATAR_URL")) <> "" and lcase(rsTopic("M_AVATAR_URL")) <> "noavatar.gif" and (IsNull(rsTopic("M_AVATAR_URL")) = false) then %>
<% '## Forum_SQL - Get Avatar Settings from DB
strSql = "SELECT " & strTablePrefix & "AVATAR2.A_WSIZE"
strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_HSIZE"
strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_BORDER"
strSql = strSql & " FROM " & strTablePrefix & "AVATAR2"
set rsav = my_Conn.Execute (strSql) %>
<img src="<% =rsTopic("M_AVATAR_URL") %>" align="absmiddle" width=<% =rsav("A_WSIZE") %> height=<% =rsav("A_HSIZE") %> border=<% =rsav("A_BORDER") %> hspace="0" ><% set rsav = nothing %><% end if %>
replace the line that has just the <br> on it with this:
<br>
<% if Trim(rsTopic("M_AVATAR_URL")) <> "" and lcase(rsTopic("M_AVATAR_URL")) <> "noavatar.gif" and (IsNull(rsTopic("M_AVATAR_URL")) = false) then
'## Forum_SQL - Get Avatar Settings from DB
strSql = "SELECT " & strTablePrefix & "AVATAR2.A_WSIZE"
strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_HSIZE"
strSql = strSql & ", " & strTablePrefix & "AVATAR2.A_BORDER"
strSql = strSql & " FROM " & strTablePrefix & "AVATAR2"
set rsav = my_Conn.Execute (strSql)
strExtension = Mid(rsTopic("M_AVATAR_URL"), InstrRev(rsTopic("M_AVATAR_URL"), "."))
if strExtension = ".swf" then
response.write "<embed src=""" & rsTopic("M_AVATAR_URL") & """ align=""absmiddle"" width=""" & rsav("A_WSIZE") & """ height=""" & rsav("A_HSIZE") & """ border=""" & rsav("A_BORDER") & """ hspace=""0"" ></embed>" & VBNewLine
else
response.write "<img src=""" & rsTopic("M_AVATAR_URL") & """ align=""absmiddle"" width=""" & rsav("A_WSIZE") & """ height=""" & rsav("A_HSIZE") & """ border=""" & rsav("A_BORDER") & """ hspace=""0"" >" & VBNewLine
end if
set rsav = nothing
end if %>
*********************************************
In the file: ADMIN_REVIEW_AVATAR.ASP *
*********************************************
look for this code: (around line #539)
-------------------------------------------
<td bgcolor="<% =CColor %>" valign="center" align="center" nowrap><img src="<% =rs("A_URL") %>" height=<% =rsav("A_HSIZE") %> width=<% =rsav("A_WSIZE") %> border=<% =rsav("A_BORDER") %> hspace=0 alt="<% =rs("A_NAME") %>"> </td>
replace it with this
<td bgcolor="<% =CColor %>" valign="center" align="center" nowrap><%
strExtension = Mid(rs("A_URL"), InstrRev(rs("A_URL"), "."))
if strExtension = ".swf" then
%><embed src="<% =rs("A_URL") %>" height=<% =rsav("A_HSIZE") %> width=<% =rsav("A_WSIZE") %>></embed><%
else
%><img src="<% =rs("A_URL") %>" height=<% =rsav("A_HSIZE") %> width=<% =rsav("A_WSIZE") %> border=<% =rsav("A_BORDER") %> hspace=0 alt="<% =rs("A_NAME") %>"><%
end if%>
</td>
Some notes on this - FLASH AVATARS DO NOT SHOW IN PREVIEW ON REGISTER OR PROFILE.ASP!!!
I decided that this was acceptable because To make it work I would have had to re-design the mod a wee bit (to base it around A_ID instead of A_URL) and I didn't want people to have to reinstall an entire new version of the mod. Besides, its not my mod and I dont want to step on anyones toes
Nathan Bales - Romans 15:13
----------------------------------
Snitz Exchange | Do's and Dont's
Edited by - Nathan on 01 April 2002 01:31:55