Author |
Topic |
Therion93
Junior Member
USA
263 Posts |
Posted - 04 March 2001 : 13:56:41
|
quote:
Is it possible to make a personal Avatar? so other members can't use that persons avatar?
Rick
Rick,
One way to do this, though not for the faint of heart, is :
1) Don't ADD the "private" avatar to the database.
2) Modify the avatar entry directly in the database (it's a simple url) and change it to match the location of the "private" avatar.
I use Richards version that reads all available files in an avatars folder. So I placed my own avatar (that I don't want anyone else to be able to use) in a different folder, then modified my entry directly in the database. Works ok but can be a pain if you have a lot of "private" avatar users.
Did I make any sense? Hope I helped.
I suppose that a function to allow the admin to define avatar urls would be good, but not something I would suggest for use by all users.
Therion93 Because Legends Never Die! - Kiss-Forever.Net - HuwR's SR4 Release Mysteries & Magic - Mysteria Magicka - Richard Kinser's SR4 Release
Edited by - Therion93 on 04 March 2001 13:59:57 |
|
|
Therion93
Junior Member
USA
263 Posts |
Posted - 04 March 2001 : 14:03:46
|
quote: and I found this forum that uses a popup window to show the avatars how can I create something like that? or where can I find it for download? I'm not a coder
this would solve my issue with Netcrap not viewing the avatar with the Dynamic Image selector mod.
I'd be willing to bet that the code from the smilies mod that displays the smilies in a popup window could be easily modified to do this. But I'm not a coder either (yet )
Therion93 Because Legends Never Die! - Kiss-Forever.Net - HuwR's SR4 Release Mysteries & Magic - Mysteria Magicka - Richard Kinser's SR4 Release
Edited by - Therion93 on 04 March 2001 14:04:20 |
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 04 March 2001 : 14:40:35
|
Just a comment about Avatars...
I started looking on the web for a bunch of images (and there seems to be a whole world out there, full of Avatars for chat lines, (do a search with Alta Vista using "Chat line Avatars" as the keywords.)
One thing I learned is that there is a "loose" standard for Avatar sizes and that is 48 wide by 64 high (pixels). Most of the Avatars available from these sites use this format (althought there are other sizes.) This is a "portrait" type aspect ratio of 3:4.
I looked at the code on how the sizing stuff works (and is stored) and the simplest mod to accomodate the 3:4 aspect ration (for those interested), is the following:
<img src="<% =rs("M_AVATAR_URL") %>" align="absmiddle" width=<% =rsav("A_SIZE")*.75 %> height=<% =rsav("A_SIZE") %> border=<% =rsav("A_BORDER") %> hspace="0" ><% set rsav = nothing %><% end if %>
This is the display code in topic.asp -- so it appears twice -- once for the initial post, and the other for the replies. My line number mean nothing, so sorry for not being more explicit.
Cheers!
Rob
PS: Thanks Richard for an easy Mod to implement and very useful for many people....
Edited by - Rob Poretti on 04 March 2001 18:13:24 |
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 04 March 2001 : 21:30:59
|
quote:
Richard... Couple Questions.
Is it possible to make a personal Avatar? so other members can't use that persons avatar?
and I found this forum that uses a popup window to show the avatars how can I create something like that? or where can I find it for download? I'm not a coder this would solve my issue with Netcrap not viewing the avatar with the Dynamic Image selector mod.
http://www.larry.it/test/forum/register.asp?mode=Register
Thanks, Rick
Test Site www.eastpasco.com Running on HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser.
Hey Rick,
Yes, I think having unique avatars for a forum is a must -- otherwise, what's the point if one cannot quickly identify who's-who. In a large discussion group, you can't expect members to keep this straight for themselves -- escpecially if they can't post their own avatars. (Although, I'm glad the administrator has control over this! Thank-you Richard!)
I think I can enhance this mod to limit members to assign a unique avatar in the profile ONLY...
Testing it now...
Rob
|
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 04 March 2001 : 22:17:43
|
Rob,
You could probabaly just add anotherr field to FORUM_AVATAR to hold the member's ID for which the Avatar is for and then when the Avatar's are displayed for the users to pick from, have it check for that field and only show it if the user's ID matches. |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 04 March 2001 : 22:36:17
|
Perfect! That would fix my members Netcrap issue! how can I get that code?
quote:
something like this?: http://kinser.121host.net/oldbeta/register.asp?mode=Register (click on the )
Test Site www.eastpasco.com Running on HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser. |
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 04 March 2001 : 22:46:22
|
Ok, I think I've got... this isn't pretty, but it is simple...
Also, Richard, I'm sure you could do it a better way, if this was considered at the front end but, I really wanted to have this, so I took a stab at it...
BEFORE ANYONE ATTEMPTS THIS -- I'm using a heavy moded SR2. I don't think it matters from the stand point of the code that I've written but, the line numbers will not jive. Secondly, I'm not availalbe for a week, so I can't respond to any problems until next Saturday... sorry!
First we have to add a new field to the FORUM_AVATAR database. (At first, I thought of just adding a boolean to keep track of already asigned AVATARS. Instead I decide to use an integer field.)
I use SQL7 (sorry Access users): TABLE TO MODIFY: FORUMS_AVATAR ADD FIELD NAME: A_MEMBER_ID TYPE: INT SIZE: 4 ALLOW NULLS
Next, we have to make two entries in the pop_profile.asp file:
The first is in the Case "Edit" around line 1070, right after this code:
my_Conn.Execute(strSql) regHomepage = "" %>
Add this:
<% '## Forum_SQL - Update the AVATAR table Member ID...
' FIRST GET MEMBER ID!!! (It's not available in Case "EditIt" !) strSQLMEMBERID = "Select MEMBER_ID, M_AVATAR_URL FROM " & strMemberTablePrefix & "MEMBERS " strSQLMEMBERID = strSQLMEMBERID & "WHERE M_NAME = '" & Request.Form("Name") & "' " set rsMEMBERID = my_Conn.Execute(strSQLMEMBERID)
' THEN, CLEAR MEMBER_ID FOR OLD AVATAR - Whatever it happens to be (SET MEMBER_ID TO ZERO) strSQLAvatar = "UPDATE " & strMemberTablePrefix & "AVATAR " strSQLAvatar = strSQLAvatar & " SET A_MEMBER_ID = " & 0 & " " strSQLAvatar = strSQLAvatar & " WHERE A_MEMBER_ID = " & rsMEMBERID("MEMBER_ID") my_Conn.Execute(strSQLAvatar) ' THEN Update the correct AVATAR record with the MEMBER_ID ... strSQLAvatarDB = "UPDATE " & strMemberTablePrefix & "AVATAR " strSQLAvatarDB = strSQLAvatarDB & " SET A_MEMBER_ID = " & rsMEMBERID("MEMBER_ID") strSQLAvatarDB = strSQLAvatarDB & " WHERE A_URL = '" & ChkString(Request.Form("Avatar_URL"),"") & "'" my_Conn.Execute(strSQLAvatarDB) %>
The second spot is in Case "ModifyIt", around line 1280, right after this code:
strSql = strSql & " WHERE MEMBER_ID = " & Request.Form("MEMBER_ID")
my_Conn.Execute(strSql) %> Add this:
<% '## Forum_SQL - Update the AVATAR table Member ID...
' FIRST CLEAR MEMBER_ID FOR OLD AVATAR - Whatever it happens to be (SET MEMBER_ID TO ZERO) strSQLAvatar = "UPDATE " & strMemberTablePrefix & "AVATAR " strSQLAvatar = strSQLAvatar & " SET A_MEMBER_ID = " & 0 & " " strSQLAvatar = strSQLAvatar & " WHERE A_MEMBER_ID = " & Request.Form("MEMBER_ID") my_Conn.Execute(strSQLAvatar) ' THEN Update the correct AVATAR record with the MEMBER_ID ... strSQLAvatarDB = "UPDATE " & strMemberTablePrefix & "AVATAR " strSQLAvatarDB = strSQLAvatarDB & " SET A_MEMBER_ID = " & Request.Form("MEMBER_ID") strSQLAvatarDB = strSQLAvatarDB & " WHERE A_URL = '" & ChkString(Request.Form("Avatar_URL"),"") & "'" my_Conn.Execute(strSQLAvatarDB) %>
Finally, you have to modify the inc_avater.asp file to only display avatars in the list box that have NOT been taken! The recordset has to be created differently...
'## 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_MEMBER_ID" strSql = strSql & " FROM " & strTablePrefix & "AVATAR " strSql = strSql & " WHERE " & strTablePrefix & "AVATAR.A_MEMBER_ID =0" strSql = strSql & " OR " & strTablePrefix & "AVATAR.A_MEMBER_ID IS NULL" strSql = strSql & " OR " & strTablePrefix & "AVATAR.A_URL='" & RS("M_AVATAR_URL") & "'" strSql = strSql & " ORDER BY " & strTablePrefix & "AVATAR.A_ID ASC;"
It should be easy to notice the differences...
I use A_MEMBER_ID=0 or IS NULL as defining a not assigned AVATAR. The list box will only show AVATARS that have their A_MEMBER_ID set to NULL (default), set to zero, or is the currently assigned AVATAR. All other Avatars are not displayed -- so members cannot assign one that is already in use!
When an AVATAR is changed (or deassigned from a member), the pop_profile.asp sets the A_MEMBER_ID field to 0 (zero) so that it becomes available the next time a member updates their profile.
Works great over here! As you assign more AVATARS, the listbox int the pop_profile .asp page get shorter!
uh-oh...
Just realized I've not made any code to check for EOF if the listbox box rs is empty! Sorry... Until I fix this, make sure you have added more AVATARS than you have assigned to members!
Edited by - Rob Poretti on 04 March 2001 22:53:41 |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 04 March 2001 : 22:47:24
|
rick,
I'll have to modify it to work with this mod, I'll just e-mail it to you when I'm finished. |
|
|
Rob Poretti
Junior Member
Canada
435 Posts |
Posted - 04 March 2001 : 22:56:37
|
Hi Richard...
Could you post the pop-up so I can use it as well...that's perfect!
or email me: rob@sascom.com
Edited by - Rob Poretti on 04 March 2001 22:56:54 |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 04 March 2001 : 23:23:19
|
I e-mailed it to both of y'all
Edited by - Richard Kinser on 05 March 2001 00:46:38 |
|
|
Therion93
Junior Member
USA
263 Posts |
Posted - 05 March 2001 : 00:02:02
|
Richard, will this work with the version I'm using? It would be nice if users could see all available avatars and then scroll right to their choice instead of scrolling the list to see each one first.
uhhh nevermind, it's not what I thought is was
Therion93 Because Legends Never Die! - Kiss-Forever.Net - HuwR's SR4 Release Mysteries & Magic - Mysteria Magicka - Richard Kinser's SR4 Release
Edited by - Therion93 on 05 March 2001 00:03:10
Edited by - Therion93 on 05 March 2001 00:05:07 |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 05 March 2001 : 00:48:06
|
Therion93,
No, not the version I e-mailed to them. Actually the version that I modified it from would work with yours. I'll e-mail it to you and you can use it if you want to. |
|
|
rick7165
Senior Member
USA
1094 Posts |
Posted - 05 March 2001 : 00:51:15
|
Can someone help make a private avatar section? The one Rob did is for SQL and SR2
Thanks, Rick
Test Site www.eastpasco.com Running on HuwR's SR4 release. Colors and Graphic scheme done by Richard Kinser. |
|
|
RichardKinser
Snitz Forums Admin
USA
16655 Posts |
Posted - 05 March 2001 : 01:16:35
|
rick,
I don't see anything in Rob's code that would prevent it from working with Access. |
|
|
Topic |
|