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)
 Symbols >.& in User names & Proder's File
 New Topic  Topic Locked
 Printer Friendly
Author  Topic Next Topic  

Panhandler
Average Member

USA
783 Posts

Posted - 13 July 2005 :  19:21:35  Show Profile  Visit Panhandler's Homepage
I'm not sure where to post this question, but this is my best guess.

Proeder's File Attachment is installed and working on my forum.
But today, a user name of E.J. uploaded a file.

This of course created a website subdirectory folder called E.J.
(which is where user E.J.'s photos get stored).

The photo was uploaded okay, but it couldn't be downloaded.
So I changed the website directory name from E.J. to EJ and modified the link to it to EJ

Do I have to have the user change his user name?
Or, is there a code modification I can make to accomodate his username with the "." in it?



"5-in-1 Snitz Common Expansion Pack" - five popular mods packaged for easy install
". . .on a mote of dust, suspended in a sunbeam. . ."
HarborClassifieds
Support Snitz Forums


muzishun
Senior Member

United States
1079 Posts

Posted - 13 July 2005 :  20:55:12  Show Profile  Visit muzishun's Homepage
This is totally untested, but I'd suggest a way to simply filter the "." out of the username. Looking at a freshly downloaded version of the MOD, try the following changes.

outputFile.asp (line 74)
membername = Replace(UploadRequest.Item("memberName").Item("Value"),".","")


myfiles.asp (line 144)
			   FileNamePath = Left(Server.mappath(Request.ServerVariables("PATH_INFO")),pathEnd) & "\" & strUploadUrl & "\" & Replace(strDBNTUserName,".","") & "\" & Name


myfiles.asp (line 169)
			   FileNamePath = strForumUrl & strUploadUrl & "/" & Replace(strDBNTUserName,".","") & "/" & Name


myfiles.asp (line 218)
			   Path = Left(Server.mappath(Request.ServerVariables("PATH_INFO")),pathEnd) & strUploadUrl & "\" & Replace(strDBNTUserName,".","") & "\"


Do the same with the Select Case for extensions from lines 315-422.

I think those are all the changes you'd need to make. You might have to tweak it a bit, since I threw this together in about ten minutes, but it should at least get you going.

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 14 July 2005 :  03:37:19  Show Profile  Visit MarcelG's Homepage
Okay...tip numero uno ; do NOT use a username as 'unique' identifier.
As soon as the user requests a username change, you will get into trouble. But also when the user has a space in the username, you get those ugly %20 links, and all the problems you state above with users like john.doe\../
Therefore, do not use the username, but use the member_id instead. This gives a short number, that never has any strange chars in it, and that stays the same number as long as the member exists.

Ran in to a similar problem some time ago, and completely rebuild the upload mod (and avatar mod) to use the member_id instead of the username.

portfolio - linkshrinker - oxle - twitter

Edited by - MarcelG on 14 July 2005 03:38:58
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 14 July 2005 :  04:45:41  Show Profile
I'll second what Marcel said above, I've never understood the logic of tying the folder name to something which is guranteed to be constant such as a member's username.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Panhandler
Average Member

USA
783 Posts

Posted - 14 July 2005 :  09:43:24  Show Profile  Visit Panhandler's Homepage
quote:
Originally posted by marcelgoertz

Okay...tip numero uno ; do NOT use a username as 'unique' identifier.
As soon as the user requests a username change, you will get into trouble. But also when the user has a space in the username, you get those ugly %20 links, and all the problems you state above with users like john.doe\../
Therefore, do not use the username, but use the member_id instead. This gives a short number, that never has any strange chars in it, and that stays the same number as long as the member exists. . .


quote:
Originally posted by Shaggy

I'll second what Marcel said above, I've never understood the logic of tying the folder name to something which is guranteed to be constant such as a member's username.




As a user, I lack the knowledge of how to create the required repair to the mod.
Therefore I must consider Mike's / Proder's File Attachment mod as moderately flawed.

I could implement the repair to the mod if someone could provide the code changes. (Its something I think I would upload to the Snitzbitz library too if you all don't mind.)



"5-in-1 Snitz Common Expansion Pack" - five popular mods packaged for easy install
". . .on a mote of dust, suspended in a sunbeam. . ."
HarborClassifieds
Support Snitz Forums


Go to Top of Page

MarcelG
Retired Support Moderator

Netherlands
2625 Posts

Posted - 14 July 2005 :  17:44:21  Show Profile  Visit MarcelG's Homepage
Panhandler ; if you want to I can mod the original mod. Just drop me an e-mail with a download link of the original mod, and I'll see what I can do the next couple of days.

portfolio - linkshrinker - oxle - twitter
Go to Top of Page

Panhandler
Average Member

USA
783 Posts

Posted - 14 July 2005 :  20:44:52  Show Profile  Visit Panhandler's Homepage
quote:
Originally posted by marcelgoertz

Panhandler ; if you want to I can mod the original mod. Just drop me an e-mail with a download link of the original mod, and I'll see what I can do the next couple of days.



Email sent via Snitz.


"5-in-1 Snitz Common Expansion Pack" - five popular mods packaged for easy install
". . .on a mote of dust, suspended in a sunbeam. . ."
HarborClassifieds
Support Snitz Forums


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