Author |
Topic  |
|
texanman
Junior Member
 
United States
410 Posts |
Posted - 25 January 2008 : 14:01:18
|
Hello!
I have implemented Proeder's file attachment. Everything seems fine except one thing. When a member name is RTL the photo link gets screwed up. I tried to look at the files to see if I can use something other than membername, which difines if from strDBNTusername. I thought there would be something like strNTDBmemberID to use instead to use instead of strDBNTusername. So, my question is: is there a way to add such a variable in config, if so how? If not is there any other around using something unique other than user name?
Thanks in advance. |
|
muzishun
Senior Member
   
United States
1079 Posts |
Posted - 25 January 2008 : 14:04:58
|
I would recommend using the member's ID. The field in the members table is MEMBER_ID, which is stored in MemberID if you are including the inc_header.asp file. I am not very familiar with Proeder's MOD, but I would assume that you could change all references to strDBNTusername in the MOD code to MemberID without breaking anything too badly. Of course, make sure to back up your files . I have been known to be wrong. |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
 |
|
texanman
Junior Member
 
United States
410 Posts |
Posted - 25 January 2008 : 14:10:52
|
Thanks muzishun: The includes in the "myfiles" are config.asp, inc_func_common.asp and inc_func_member.asp. So, what you are saying, if I include inc_header.asp to this file it may work? Thanks again |
 |
|
muzishun
Senior Member
   
United States
1079 Posts |
Posted - 25 January 2008 : 14:12:55
|
No. Give me a few minutes to download the MOD and take a look. You basically need to use the member ID in place of strDBNTusername for the folder name. Though, now that I am posting this, I'm not sure that I am understanding the problem. Can you post a link to your forum or a screenshot of what's going on? |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
 |
|
texanman
Junior Member
 
United States
410 Posts |
Posted - 25 January 2008 : 14:15:59
|
Sorry my mistake the reference to "strDBNTusername" is in pop_uplead.new and that one has inc_header.asp as include. |
 |
|
muzishun
Senior Member
   
United States
1079 Posts |
Posted - 25 January 2008 : 14:22:36
|
Yeah, if you are wanting to upload attachments to a folder that doesn't use the user's screen name, I definitely recommend using their member ID (I recommend this anyway, but that's another story). You may need to make changes elsewhere if the file locations are stored in topics or other places. If the file locations are determined in the code, though, you should be fine. It just depends on the MOD. |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
 |
|
texanman
Junior Member
 
United States
410 Posts |
Posted - 25 January 2008 : 14:27:29
|
I am not sure I can do screen shot, but here is what the file name in the link looks like:
/áäÇ ãåÏí/200811816165_images.jpg
The correct name should be:
membername/200811816165_images.jpg |
 |
|
muzishun
Senior Member
   
United States
1079 Posts |
Posted - 25 January 2008 : 14:33:45
|
I just downloaded the MOD and had a quick look. Unfortunately, it looks like the changes you'll need to make are in a few different files. I don't have the time right now to track them down, but I seem to remember someone doing this awhile back, so you may try searching around and see what comes up. |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
 |
|
texanman
Junior Member
 
United States
410 Posts |
Posted - 25 January 2008 : 14:37:48
|
so change this in pop_upload_new: Response.Write " <input type=""hidden"" name=""memberName"" value=""" & strDBNTUserName & """>" & vbNewline & _
to this:
Response.Write " <input type=""hidden"" name=""memberID"" value=""" & member_ID & """>" & vbNewline & _
and change the references to "membername" in outputFile to "memberid".
The rest of the files are not affected. |
 |
|
muzishun
Senior Member
   
United States
1079 Posts |
Posted - 25 January 2008 : 14:37:54
|
Here is the original thread about changing from the membername/files to the memberid/files folder structure. It looks like nothing ever came of it, but Marcel is still around, so you may see if he ever got code put together for that.
Edit: I suppose the actual link would help.
http://forum.snitz.com/forum/topic.asp?ARCHIVE=true&TOPIC_ID=58858 |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
Edited by - muzishun on 25 January 2008 14:38:08 |
 |
|
muzishun
Senior Member
   
United States
1079 Posts |
Posted - 25 January 2008 : 14:39:07
|
quote: Originally posted by texanman
so change this in pop_upload_new: Response.Write " <input type=""hidden"" name=""memberName"" value=""" & strDBNTUserName & """>" & vbNewline & _
to this:
Response.Write " <input type=""hidden"" name=""memberID"" value=""" & member_ID & """>" & vbNewline & _
and change the references to "membername" in outputFile to "memberid".
The rest of the files are not affected.
I believe at least one or two other files are affected. Files that get the list of attachments or link to the attachments will need to be changed. |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
 |
|
texanman
Junior Member
 
United States
410 Posts |
Posted - 25 January 2008 : 14:44:46
|
You are right! myfiles.asp is affected |
 |
|
texanman
Junior Member
 
United States
410 Posts |
Posted - 27 January 2008 : 14:38:24
|
This works great now! Here is what I did: 1. Changed all the incidents of "strDBNTusername" to "memberID" except when the code is checking whether strDBNTusername <> " " and strDBNTusername = " " I guess to check whether the user is logged in or not. These changes are in the files: myfiles.asp, pop_upload_new.asp, and outputFile.asp 2. Changed all the references of membername to memberID in the same files above.
Thanks muzishun and PPSSWEB for your inputs on this |
Edited by - texanman on 27 January 2008 14:40:57 |
 |
|
muzishun
Senior Member
   
United States
1079 Posts |
Posted - 27 January 2008 : 20:25:08
|
Glad you were able to get it working.  |
Bill Parrott Senior Web Programmer, University of Kansas Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com) Personal Website (www.chimericdream.com) |
 |
|
|
Topic  |
|