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)
 ADD-ON Avatar V2: Adding avatar easier.
 New Topic  Topic Locked
 Printer Friendly
Next Page
Author Previous Topic Topic Next Topic
Page: of 2

Aznknight
Senior Member

USA
1373 Posts

Posted - 03 April 2001 :  17:17:52  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
Title: Avatar Admin Add-on (for avatar mod version 2)
Description:
This mod uses the file system object to make it easier for admins to add avatars to their site.
Instead of manually entering the url of avatar image, the admin can just select the avatar from a select box.
The avatar will then just need to name the avatar image.
Once an avatar is added it will be moved to a different folder.
Download: http://www.calvsa.net/snitz/
Just click on the "Avatar Admin Add-on" link in the Downloads category.
Disclaimer:
Don't use thid add-on if your host does not support the file system object or changing directory permissions.
Demo: none as this is an admin only feature.
Here's what it will look like:


Instructions:
Make sure you have already installed Richard's Avatar Mod (Version 2)

1) Unzip the avatar_addon.zip to your forum directory.

2) Rename admin_add_avatar.asp to admin_add_avatar_backup.asp and then unzip the avatar_admin_addon.zip to your forum directory.

3) Add Two new directories/folders, "new_avatars" and "avatars" to your forum directory.

4) place your avatar images into the "new_avatars" folder.

5) log on as admin and goto admin_avatar_home section and you should be able to see the avatars that you have placed in "new_avatars" folder.

When you add the avatar, it will be moved from "new_avatars" to "avatars" folder so you don't see it again next time in the select list.


- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource

Edited by - aznknight on 06 April 2001 19:52:21

Martha2Mary
Junior Member

New Zealand
250 Posts

Posted - 03 April 2001 :  23:32:17  Show Profile  Visit Martha2Mary's Homepage  Send Martha2Mary an AOL message  Send Martha2Mary an ICQ Message  Send Martha2Mary a Yahoo! Message
Hi Aznknight,

I'm getting a 'Permission Denied' Error after uploading the new admin_add_avatar.asp, with the error occuring on line 109, which is:

fso.movefile objFile, server.MapPath("avatars/" & objFile.name)

Would this be because my Forum directory does not have Read & Write permissions set on it? I keep my Database in another directory that has read and write permissions, and would rather just keep it at one, so if this is the problem where would I need to edit the Avatar files so that it looks for and stores them in an alternative Directory that is not a sub-directory of the forum folder?

Thanks.

*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind *
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 04 April 2001 :  03:00:33  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
quote:

Hi Aznknight,

I'm getting a 'Permission Denied' Error after uploading the new admin_add_avatar.asp, with the error occuring on line 109, which is:

fso.movefile objFile, server.MapPath("avatars/" & objFile.name)

Would this be because my Forum directory does not have Read & Write permissions set on it? I keep my Database in another directory that has read and write permissions, and would rather just keep it at one, so if this is the problem where would I need to edit the Avatar files so that it looks for and stores them in an alternative Directory that is not a sub-directory of the forum folder?

Thanks.

*If Knowledge is Power, and Power Corrupts, what hope is there for Mankind *


HI martha2mary,

yeah, line 109 requires that you set write permissions to the "avatars" folder and delete permissions to "new_avatars". What it does is move the file from "new_avatars" to "avatars" so that it would not appear in the select box again.

As for changing it to another directory, it is hard coded as avatars and new_avatars. hmm..i dunno, you can play with changing the paths and stuff if you're up to the task. You can email me ( alan@iamviet.com ) how your directory structure is and I'll see what I can do.

But the best thing to do would be to add the permissions I talked about above. I'll add this part to the instructions to. Otherwise manually moving the images defeats half the purpose of this add-on.

- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

RichardKinser
Snitz Forums Admin

USA
16655 Posts

Posted - 04 April 2001 :  03:17:33  Show Profile
some hosts don't fully enable the use of the FileSystem.Object. They let you use some features but not others. And then others don't allow it at all.
Go to Top of Page

MisterVB
Junior Member

274 Posts

Posted - 04 April 2001 :  04:48:07  Show Profile  Visit MisterVB's Homepage
I don't know why but after i added 182 avatars it's not showing the other 50 i have to enter in. It's odd i had no problems with all the others.

Go to Top of Page

MisterVB
Junior Member

274 Posts

Posted - 04 April 2001 :  05:10:17  Show Profile  Visit MisterVB's Homepage
Think i figured it out.... Okay I had programmed myself a mass file renamer for instances such as this because I have 223 avatars and don't want to name them all seperate names so I named them avatar and my program increments the numbers, anyhow when i chose the gif extension i think this mod doesn't recognize the gif extension when capitolized. Can't think of anything else cause I reuploaded the older files with the GIF extension and they wouldn't appear only in lowercase form.

Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 06 April 2001 :  19:51:19  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
quote:

Think i figured it out.... Okay I had programmed myself a mass file renamer for instances such as this because I have 223 avatars and don't want to name them all seperate names so I named them avatar and my program increments the numbers, anyhow when i chose the gif extension i think this mod doesn't recognize the gif extension when capitolized. Can't think of anything else cause I reuploaded the older files with the GIF extension and they wouldn't appear only in lowercase form.




Yeah this mod only recognizes the lower case forms.

The update for this is real easy.

in line 164 of this mod's admin_add_avatar.asp, change this line:
if instr(objFileItem.Name, ".gif") or instr(objFileItem.Name, ".jpg") then
to
if instr(objFileItem.Name), ".gif") or instr(objFileItem.Name, ".jpg") or instr(objFileItem.Name), ".GIF") or instr(objFileItem.Name, ".JPG") then

I could use the lcase function but I don't know how that will affect the .movefile function, so easiest thing to do was add in the two cases for capitol letters .
The other way to do it would have been:
if instr(lcase(objFileItem.Name), ".gif") or instr(lcase(objFileItem.Name), ".jpg") then



- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 06 April 2001 :  19:52:59  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
quote:

some hosts don't fully enable the use of the FileSystem.Object. They let you use some features but not others. And then others don't allow it at all.



Good point, Richard.

I'll add in a disclaimer.

- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

mark
Starting Member

46 Posts

Posted - 28 April 2001 :  09:54:31  Show Profile  Send mark an ICQ Message
is there's a script that every member could ccess the avatar setting?

Pls help


im the king of the world
Go to Top of Page

mneedham
New Member

United Kingdom
84 Posts

Posted - 24 June 2001 :  18:29:26  Show Profile
quote:

Make sure you have already installed Richard's Avatar Mod (Version 2)



Where can I get this from I can't seem to find it anywhere?

Go to Top of Page

davea
New Member

61 Posts

Posted - 26 June 2001 :  06:22:37  Show Profile
Download loaction here is dead, and I also cant find the original mod needed for this.

Go to Top of Page

Aznknight
Senior Member

USA
1373 Posts

Posted - 26 June 2001 :  14:35:34  Show Profile  Send Aznknight an AOL message  Send Aznknight an ICQ Message
hmm the snitz resource page is still up.

go here: http://www.calvsa.net/snitz/mods.asp

and click "Avatar Admin Mod".
Rate it or leave a comment about it if you want .

about the original avatar v2 mod by richard, just type up "avatar v2" in the search on here and you should find it. I've seen questions asking where it is several times and they have been answered as well.

- Alan
www.iamviet.com
www.calvsa.net
Snitz Resource
Go to Top of Page

Oudie
New Member

Taiwan
70 Posts

Posted - 27 June 2001 :  04:13:20  Show Profile  Visit Oudie's Homepage  Send Oudie an ICQ Message
Sorry, I have a question. If I want to make the memember can add their avatar not by admin.
What should I do?

¤d¨½¬î¤ô¤@Àþ¶¡,
¤Ñ¦a¿W§Ú¼Ö¯«¥P;
²ö°Ý¬õ¹Ð·Ð´o¨Æ,
³p»»¨«¹M¤Ñ¥~¤Ñ...
Go to Top of Page

maggiau
New Member

96 Posts

Posted - 27 June 2001 :  05:40:12  Show Profile  Visit maggiau's Homepage
Great mod ... but I added a lots of gif files in the newavatar directory. I would like to process them automatically, that means an option that will :
- read the newavatar directory
- get the names of all the gif files
- use the gif names without the extension as the description
- add all the names in the database
- move all the files to the avatars folder

and that's it ...

It will avoid a lot of admin tasks

I hope this will have some interests to others and that there is an easy way to do it.

THANK you in any case to the author of this mod

www.gitaum.com
Alex



Edited by - maggiau on 27 June 2001 05:41:55
Go to Top of Page

Rob Poretti
Junior Member

Canada
435 Posts

Posted - 18 August 2001 :  14:21:29  Show Profile  Visit Rob Poretti's Homepage
Hey Alan,

Server priviledges that are required in order to move files between directories can be a security risk -- escpecially with web sniffers that are looking for places to put potentially dangerous exe files.

Why not make your mod look at the contents of a directory and change the database parameters to "add" or "remove" avatars. (I'm not sure why "moving" files is neccessary.) In this way, security is not a compromised. Until then, I would suggest that users at least change the directory names to something other than "Avatars" and "New_Avatars". EVERYONE that reads about this mod can have access to these directories for any server that has implemented this mod! If you at least change the names, then someone has to go out of there way to hack in.

FOr sites hosted by NT Server, the other thing that you can do is to use code like this:

<%
If Request.ServerVariables("LOGON_USER")="" Then
Response.Status = "401 Access Denied"
end if
%>

This uses NT authentication before files are moved. This way permissions are kept and whatever you use for a password on your server allows you the access that you need. (You need Internet Explorer 5.5 or higher.) I put the above code at the top of the admin_add_avatar.asp, and it seems to work fine.

Great mod by the way... I think I said this before though!

Cheers!



Rob Poretti
Sascom Marketing Group ~ Toronto
vox.905.825.5373 fax.905.825.5960

Edited by - Rob Poretti on 18 August 2001 14:23:41
Go to Top of Page

samsudin
Starting Member

Singapore
31 Posts

Posted - 19 August 2001 :  04:03:12  Show Profile  Visit samsudin's Homepage
I love this MOD, makes the admin life easier. I 've apply this Mod without any problems.



Thanks a billion


Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
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.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07