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: Avatar MOD (version 1.0)
 New Topic  Topic Locked
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 7

Therion93
Junior Member

USA
263 Posts

Posted - 04 March 2001 :  13:56:41  Show Profile  Send Therion93 an ICQ Message
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
Go to Top of Page

Therion93
Junior Member

USA
263 Posts

Posted - 04 March 2001 :  14:03:46  Show Profile  Send Therion93 an ICQ Message
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
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 04 March 2001 :  14:40:35  Show Profile  Visit Rob Poretti's Homepage
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
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 04 March 2001 :  21:30:59  Show Profile  Visit Rob Poretti's Homepage
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

Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 04 March 2001 :  22:17:43  Show Profile
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.
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 04 March 2001 :  22:21:25  Show Profile
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




something like this?: http://kinser.121host.net/oldbeta/register.asp?mode=Register
(click on the )
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 04 March 2001 :  22:36:17  Show Profile  Visit rick7165's Homepage
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.
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 04 March 2001 :  22:46:22  Show Profile  Visit Rob Poretti's Homepage
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
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 04 March 2001 :  22:47:24  Show Profile
rick,

I'll have to modify it to work with this mod, I'll just e-mail it to you when I'm finished.
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 04 March 2001 :  22:56:37  Show Profile  Visit Rob Poretti's Homepage
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
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 04 March 2001 :  23:23:19  Show Profile
I e-mailed it to both of y'all

Edited by - Richard Kinser on 05 March 2001 00:46:38
Go to Top of Page

Therion93
Junior Member

USA
263 Posts

Posted - 05 March 2001 :  00:02:02  Show Profile  Send Therion93 an ICQ Message
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
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 05 March 2001 :  00:48:06  Show Profile
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.
Go to Top of Page

rick7165
Senior Member

USA
1094 Posts

Posted - 05 March 2001 :  00:51:15  Show Profile  Visit rick7165's Homepage
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.
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 05 March 2001 :  01:16:35  Show Profile
rick,

I don't see anything in Rob's code that would prevent it from working with Access.
Go to Top of Page
Page: of 7 Previous Topic Topic Next Topic  
Previous Page | Next Page
 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.21 seconds. Powered By: Snitz Forums 2000 Version 3.4.07