Author |
Topic |
|
HandAble.com
Starting Member
15 Posts |
Posted - 30 April 2002 : 22:58:41
|
Ok.. have patience with me.. this is my first attempt to post a mod I've made... I installed the Avatar 2.0 mod and loved it, but I wanted to see what avatars the members had selected.. so I modified my members.asp file to show the avatar there...
AS FAR AS I KNOW .. this requires the Avatar 2.0 MOD Also, I'm running the latest Snitz .. 3.3.03 You can see what this looks like at http://www.jti.net/khsalumni/members.asp
All of these changes are in members.asp ..
First, around line 85 is the first of two select statements:
'## BEG AVATAR MOD '## added the line below that adds M_AVATAR_URL to the select '## END AVATAR MOD
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " &_ strMemberTablePrefix & "MEMBERS.M_STATUS, " &_ strMemberTablePrefix & "MEMBERS.M_NAME, " &_ strMemberTablePrefix & "MEMBERS.M_LEVEL, " &_ strMemberTablePrefix & "MEMBERS.M_EMAIL, " &_ strMemberTablePrefix & "MEMBERS.M_COUNTRY, " &_ strMemberTablePrefix & "MEMBERS.M_HOMEPAGE, " &_ strMemberTablePrefix & "MEMBERS.M_ICQ, " &_ strMemberTablePrefix & "MEMBERS.M_YAHOO, " &_ strMemberTablePrefix & "MEMBERS.M_AIM, " &_ strMemberTablePrefix & "MEMBERS.M_TITLE, " &_ strMemberTablePrefix & "MEMBERS.M_POSTS, " &_ strMemberTablePrefix & "MEMBERS.M_LASTPOSTDATE, " &_ strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE, " &_
strMemberTablePrefix & "MEMBERS.M_AVATAR_URL, " &_
strMemberTablePrefix & "MEMBERS.M_DATE, " &_ strMemberTablePrefix & "MEMBERS.M_STATE " &_ " FROM " & strMemberTablePrefix & "MEMBERS " ' if Request.querystring("link") <> "sort" then
and the second one right below that...
'## Forum_SQL - Get all members
'## BEG AVATAR MOD '## added the line below that adds M_AVATAR_URL to the select '## END AVATAR MOD
strSql = "SELECT " & strMemberTablePrefix & "MEMBERS.MEMBER_ID, " &_ strMemberTablePrefix & "MEMBERS.M_STATUS, " &_ strMemberTablePrefix & "MEMBERS.M_NAME, " &_ strMemberTablePrefix & "MEMBERS.M_LEVEL, " &_ strMemberTablePrefix & "MEMBERS.M_EMAIL, " &_ strMemberTablePrefix & "MEMBERS.M_COUNTRY, " &_ strMemberTablePrefix & "MEMBERS.M_HOMEPAGE, " &_ strMemberTablePrefix & "MEMBERS.M_ICQ, " &_ strMemberTablePrefix & "MEMBERS.M_YAHOO, " &_ strMemberTablePrefix & "MEMBERS.M_AIM, " &_ strMemberTablePrefix & "MEMBERS.M_TITLE, " &_ strMemberTablePrefix & "MEMBERS.M_POSTS, " &_ strMemberTablePrefix & "MEMBERS.M_LASTPOSTDATE, " &_ strMemberTablePrefix & "MEMBERS.M_LASTHEREDATE, " &_
strMemberTablePrefix & "MEMBERS.M_AVATAR_URL, " &_
strMemberTablePrefix & "MEMBERS.M_DATE " &_ " FROM " & strMemberTablePrefix & "MEMBERS " if mlev = 4 then
Next, we have to make space in the "heading" for our extra column.. so down around line 337, there is another change..
<% strNames = "UserName=" & srchUName &_ "&FirstName=" & srchFName &_ "&LastName=" & srchLName &_ "&INITIAL=" &srchInitial & "&" %>
<td align="center" bgcolor="<% =strHeadCellColor %>"> </td>
<% '## BEG AVATAR MOD %> <td align="center" bgcolor="<% =strHeadCellColor %>"> </td> <% '## END AVATAR MOD %>
<td align="center" bgcolor="<% =strHeadCellColor %>"><a href="members.asp?<% =strNames %>link=sort&mode=search&M_NAME=<%=SearchName %>&method=<% if Request.QueryString("method") = "nameasc" then Response.Write("namedesc") else Response.Write("nameasc") end if %>"><b><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>" color="<% =strHeadFontColor %>">Member Name</font></b></a></td>
Then if you scroll down and look for AIM...
<% if strAIM = "1" and Trim(rs("M_AIM")) <> "" then %> <a href="JavaScript:openWindow('pop_messengers.asp?mode=AIM&AIM=<% =ChkString(rs("M_AIM"), "JSurlpath") %>&M_NAME=<% =ChkString(rs("M_NAME"),"JSurlpath") %>')"><img src="<%=strImageURL %>icon_aim.gif" height=15 width=15 alt="Send <% =ChkString(rs("M_NAME"),"display") %> an instant message" border="0" align="absmiddle" hspace="0"></a> <% end if %> </td>
<% '## BEG AVATAR MOD %> <td bgcolor="<% =CColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"> <% if Trim(rs("M_AVATAR_URL")) <> "" and lcase(rs("M_AVATAR_URL")) <> "noavatar.gif" and (IsNull(rs("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="<% =rs("M_AVATAR_URL") %>" align="absmiddle" width=<% =rsav("A_WSIZE") %> height=<% =rsav("A_HSIZE") %> border=<% =rsav("A_BORDER") %> hspace="0" ><% set rsav = nothing %><% end if %> </td> <% '## END AVATAR MOD %>
<td bgcolor="<% =CColor %>"><font face="<% =strDefaultFontFace %>" size="<% =strDefaultFontSize %>"> <% if strUseExtendedProfile then %>
That should be it... the author of the excellent AVATAR Mod is, of course, welcome to include this in their next version of that mod without any direct permission.
|
|
mortioli
Average Member
United Kingdom
898 Posts |
Posted - 01 May 2002 : 05:14:56
|
Very nice MOD, but is there anyway of making the avatar show up a bit smaller? For example, half the avatar height and width?
I think this would be better (on mine anyway), as I have more than the normal columns in the members page.
I know it would be easy to say height=x width=x but would it be possible for it to read the avatar height/width (set by the admin - 32x32, 48x48 etc), then halve it?
Oli
MortiOli Site | MortiOli Forum |
|
|
vesse
New Member
United Kingdom
69 Posts |
|
crash
Advanced Member
Netherlands
2064 Posts |
Posted - 02 May 2002 : 10:16:16
|
i believe this has already been done...
Crash's Site | Crash is from
|
|
|
mortioli
Average Member
United Kingdom
898 Posts |
|
nineu
Starting Member
Spain
45 Posts |
Posted - 16 July 2002 : 03:40:27
|
Perfect!!! It works!!!
|
|
|
dayve
Forum Moderator
USA
5820 Posts |
Posted - 16 July 2002 : 10:43:39
|
quote:
i believe this has already been done...
Crash's Site | Crash is from
yeah I did one for 3.1SR4 but decided on change it in 3.3 to just show the Top 20 Avatars. I know your site is doing this crash.
however I can't find the thread so kudos to HandAble.com for participating here at Snitz, after all, that's what this community is about.
http://www.nineinchnailz.com
Edited by - dayve on 16 July 2002 10:44:38 |
|
|
Etymon
Advanced Member
United States
2385 Posts |
Posted - 16 July 2002 : 13:56:58
|
Yes, yes! Very nice. Thanks a lot!
I enjoy seeing how different people do things differently and come up with similar results. Will be using this MOD too!
For us Netscape users, try to throw in some transparent gifs or non-breaking spaces in the table data cells. Otherwise, looks very useful.
Cheers,
Etymon
Edited by - Etymon on 16 July 2002 13:59:21 |
|
|
|
Topic |
|
|
|