Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 MOD for the AVATAR 2.0 MOD [:)]
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

HandAble.com
Starting Member

15 Posts

Posted - 30 April 2002 :  22:58:41  Show Profile  Visit HandAble.com's Homepage
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  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
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
Go to Top of Page

vesse
New Member

United Kingdom
69 Posts

Posted - 02 May 2002 :  09:09:27  Show Profile  Visit vesse's Homepage  Send vesse an AOL message  Send vesse an ICQ Message
Surely you can just use a bit of simple maths?

Get the information from the AVATAR2 table and then have lines like this:

strAvatarWidth = rs("A_WIDTH")/2
strAvatarHeight = rs("A_HEIGHT")/2

I'm not sure if those are the corrent fields from the avatar table but you get the idea.

Building Web Systems for a new Generation @ http://www.vdesign-studios.com
webmaster@vdesign-studios.com
rvesse@hotmail.com
rvesse@dhtmlshock.com
Go to Top of Page

crash
Advanced Member

Netherlands
2064 Posts

Posted - 02 May 2002 :  10:16:16  Show Profile  Visit crash's Homepage
i believe this has already been done...



Crash's Site | Crash is from
Go to Top of Page

mortioli
Average Member

United Kingdom
898 Posts

Posted - 02 May 2002 :  10:52:10  Show Profile  Visit mortioli's Homepage  Send mortioli an AOL message  Send mortioli a Yahoo! Message
I didn't know you could do that.

Cheers!

Oli

MortiOli Site | MortiOli Forum
Go to Top of Page

nineu
Starting Member

Spain
45 Posts

Posted - 16 July 2002 :  03:40:27  Show Profile
Perfect!!! It works!!!

Go to Top of Page

dayve
Forum Moderator

USA
5820 Posts

Posted - 16 July 2002 :  10:43:39  Show Profile  Visit dayve's Homepage
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
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 16 July 2002 :  13:56:58  Show Profile  Visit Etymon's Homepage
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
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 0.23 seconds. Powered By: Snitz Forums 2000 Version 3.4.07