Author |
Topic  |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 05 July 2012 : 03:03:52
|
After doing the Proeders File Attachment in the 6-in-1 Snitz Common Expansion Pack Mod, when I click to view "My Files" I am seeing everyone's files. (I only allow .jpg, .gif and .png files so I am seeing everyone's pictures.) I think I read somewhere that mod is supposed to do this (why I can't imagine), but now an administrator of mine is saying she is seeing everyone's pictures, too. Is there a means of turning that off, at least for my administrator(s)?
When either of us view our files, we don't actually see them like a regular member does. We only see a list of the names of the files with an option to click on "Display" to view a file. Can you imagine how frustrating that is when you have no clue as to the name of a particular picture you've uploaded and there's hundreds and hundreds of your own pictures listed? Who has time to click "Display" on hundreds and hundreds of pictures until you find the one you're looking for?
Unless I am mistaken, when she and I go to view "My Files" if we could only see our own files, our pictures would display automatically like a regular member's does. So, that's my motive in hoping there's a means of turning the option off as to listing all of the member's files in an administrator's "My Files" list.
I hope this all makes sense! 
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
|
Carefree
Advanced Member
    
Philippines
4222 Posts |
Posted - 05 July 2012 : 06:40:03
|
In "myfiles.asp", search for every instance of "AdminAllowed" and replace it with "myAlevel < 3". That should do it.
Note: This is contingent upon having installed the Admin Levels mod.
|
Edited by - Carefree on 05 July 2012 06:40:36 |
 |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 05 July 2012 : 11:46:15
|
Okay, I did that and it worked. YEA!! 
But when I attempted to delete a file, I received the following error message.
Microsoft VBScript runtime error '800a0046'
Permission denied
/tfp/myfiles.asp, line 149
_______________________________________
Here are lines 147-150
Dim objFSO Set objFSO = Server.CreateObject("Scripting.FileSystemObject") objFSO.DeleteFile FileNamePath, true Set objFSO = Nothing
____________________________________________________
Line 147 had 'false' in it and I changed it to 'true' but that didn't help! (lol)
Here's a link to my entire myfiles.asp in txt format.
myfiles.asp in txt format
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
Carefree
Advanced Member
    
Philippines
4222 Posts |
Posted - 05 July 2012 : 18:58:04
|
Make certain that the folder has the appropriate permissions (read/write/delete) for the web guest account. |
 |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 05 July 2012 : 20:42:58
|
quote: Originally posted by Carefree
Make certain that the folder has the appropriate permissions (read/write/delete) for the web guest account.
Well, DUH!! LOL Can you tell I'm having a BAD day?!! 
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 05 July 2012 : 22:33:26
|
You were correct, Carefree! That directory did not have the appropriate permissions for read/write/delete.
Now I can delete a few of those hundreds of photos!
Thank you so very much, Carefree!! I Soooo appreciate you!!
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
Carefree
Advanced Member
    
Philippines
4222 Posts |
Posted - 06 July 2012 : 06:11:27
|
You're welcome. |
 |
|
cdeoreo
Starting Member
USA
3 Posts |
Posted - 10 July 2012 : 20:29:22
|
I installed Proeders File Attachment (proeders_file_attac-3407-3407~1). But I have a problem. I have seen a few people post similar issues but I have not been able to find any answers or direction.
I have the attachment mod working. But there are 2 issues I can not resolve.
1. I can not attach any files larger then around 300k in size. I have changed the max file size as well as made sure there were no issues with the upload directory in the forum location. I also confirmed the correct updates were made to the FORUM_UPSIZE Table. Can someone point me in the right direction for a fix? It does not appear to be a time out issue as I get the HTTP 500 white IE window in less then about 2 seconds. Any file smaller then 200 - 300 k loads with no issues. I have even tried re installing the mod but same issue every time.
2. Any file with a space in the file name gives invalid string message. I saw a post about this and the direction was to comment out some code in the outputFile.asp ... The advice was to comment out the code on line 279 that is IsValidString = Not bTemp .. I tried that and it still wont accept file names with spaces. This is not a big deal but it would be nice if I could allow it.
Thank you for any assistance.
Craig D |
 |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 11 July 2012 : 00:15:26
|
I am by no means an expert, Craig. However, I have had those same two problems and resolved them so I will share what I know with you.
My hosting company has a limit of 200 kb so no matter what I set the limit for the upload, members can not upload anything above that limit. In fact, they will usually get an error if their file size is above 195 kb. Now I could probably upgrade my hosting plan to allow a larger file, but I have no desire to pay a larger monthly fee.
Pictures can not have spaces in them or they will not upload. I suggested my members use the underscore _ instead of a space. It works! :)
Good luck with your forum!
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
Edited by - MaGraham on 11 July 2012 00:16:38 |
 |
|
bobby131313
Senior Member
   
USA
1163 Posts |
Posted - 11 July 2012 : 00:31:44
|
In outputfile.asp try replacing...
RequestBin = Request.BinaryRead(byteCount)
Dim UploadRequest
Set UploadRequest = CreateObject("Scripting.Dictionary")
BuildUploadRequest RequestBin
membername = UploadRequest.Item("memberName").Item("Value")
subfolder = strForumUrl & strUploadUrl & "/" & membername
contentType = UploadRequest.Item("blob").Item("ContentType")
filepathname = UploadRequest.Item("blob").Item("FileName")
filename = Right(filepathname,Len(filepathname)-InstrRev(filepathname,"\"))
oldfilename = filename
filename = Year(Now) & Month(Now) & Day(Now) & Hour(Now) & Minute(Now) & Second(Now) & "_" & filename
With...
RequestBin = Request.BinaryRead(byteCount)
Dim UploadRequest
Set UploadRequest = CreateObject("Scripting.Dictionary")
BuildUploadRequest RequestBin
membername = UploadRequest.Item("memberName").Item("Value")
subfolder = subfolder & "/" & membername
contentType = UploadRequest.Item("blob").Item("ContentType")
filepathname = replace(UploadRequest.Item("blob").Item("FileName"),vbNullChar,"")
filename = Right(filepathname,Len(filepathname)-InstrRev(filepathname,"\"))
filename = Replace(filename, "!", "")
filename = Replace(filename, "#", "")
filename = Replace(filename, "@", "")
filename = Replace(filename, "$", "")
filename = Replace(filename, "%", "")
filename = Replace(filename, "^", "")
filename = Replace(filename, "&", "")
filename = Replace(filename, "*", "")
filename = Replace(filename, "(", "")
filename = Replace(filename, ")", "")
filename = Replace(filename, "=", "")
filename = Replace(filename, "+", "")
filename = Replace(filename, "{", "")
filename = Replace(filename, "}", "")
filename = Replace(filename, "[", "")
filename = Replace(filename, "]", "")
filename = Replace(filename, "|", "")
filename = Replace(filename, "\", "")
filename = Replace(filename, ";", "")
filename = Replace(filename, ":", "")
filename = Replace(filename, "/", "")
filename = Replace(filename, "?", "")
filename = Replace(filename, ">", "")
filename = Replace(filename, ",", "")
filename = Replace(filename, "<", "")
filename = Replace(filename, "'", "")
filename = Replace(filename, "~", "")
filename = Replace(filename, " ", "")
oldfilename = filename
filename = Year(Now) & Right("0" & Month(Now),2) & Right("0" & Day(Now),2) & "_" & filename
Should tidy up your file names. Make a backup first.
Note: I removed the hours, minutes, and seconds from the file name so members can't upload the same image multiple times in a day taking up disk space. If you don't want it that way, leave the last line unchanged. |
Switch the order of your title tags |
Edited by - bobby131313 on 11 July 2012 00:34:21 |
 |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 11 July 2012 : 01:11:25
|
So this will allow member's pictures to have spaces or any of those symbols I see in your modification here and this will replace the spaces and/or symbols?
Oh my! WONDERFUL!!
THANK YOU!!
Oh, will this take care of the same problem when using "Zuel's Avatar Mod" that allows members to upload pictures in their profile area?
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
Edited by - MaGraham on 11 July 2012 01:15:58 |
 |
|
bobby131313
Senior Member
   
USA
1163 Posts |
Posted - 11 July 2012 : 01:22:30
|
It should just strip them out, not sure about the avatar thing, I haven't installed it. |
Switch the order of your title tags |
Edited by - bobby131313 on 11 July 2012 01:23:30 |
 |
|
MaGraham
Senior Member
   
USA
1297 Posts |
Posted - 11 July 2012 : 01:37:09
|
It works PERFECT in a post!
THANK YOU!!!
But uploading a picture in the profile area using Zuel's Avatar Upload Mod, I get this error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[MySQL][ODBC 3.51 Driver][mysqld-5.0.45-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'july 435.gif' AND A_MEMBER_ID = 1' at line 1
/tfp/incAvatarFunctions.asp, line 492
|
"Do all the good you can, by all the means you can, in all the ways you can, at all the times you can, to all the people you can, as long as ever you can." - John Wesley |
 |
|
Carefree
Advanced Member
    
Philippines
4222 Posts |
Posted - 11 July 2012 : 07:30:43
|
Suggested change to Bobby's routine above:
before the line reading:
oldfilename = filename
insert this:
filename = Replace(filename, chr(160), "")
Using replace " " only eliminates chr(32) and chr(160) can still cause a space to slip through. |
 |
|
cdeoreo
Starting Member
USA
3 Posts |
Posted - 11 July 2012 : 08:56:07
|
Thank you for the suggestions. I tried the new code in the outputFile.asp but it did not work for me. I am not too worried about the spaces. But the file size is a problem. I do not think it is a hosting issue as I own and admin the server this forum is loaded on. I have no restrictions on the upload directory that I am aware of and I have given full control on the upload directory. Any other ideas?
Thank you again. I really like the Snitz Forums. |
 |
|
cdeoreo
Starting Member
USA
3 Posts |
Posted - 11 July 2012 : 12:10:24
|
Ok I figured out the file size issue. This may be helpful for anyone using IIS on Windows servers. The default file size is 200k for uploading. But this can be changed. See the directions below to change the file size.
IIS 6 on windows 2003 set default limit for file upload to 200KB
To increase this limit, you can follow the steps belw to edit the IIS metabase.xml file
1. Before you can edit the metabase.xml file you configure IIS to allow editing the file.
In IIS, right click the name of the server and select properties. Check "Enable Direct Metabase Edit".
2. Find the metabase.xml file located in C:\windows\sytem32\inetserv and open the file in Notepad.
3. Search for AspMaxRequestEntityAllowed and increase the value.
The default value is 204800 (200KB). Setting the value to 5242880 will allow 5 MB file upload.
4. Go back IIS Manager to uncheck "Enable Direct Metabase Edit", and restart IIS service.
Alternatively you can run command via IIS admin utilities
Open a command prompt window and enter the following command
cd C:\inetpub\adminscripts cscript adsutil.vbs set w3svc/ASPMaxRequestEntityAllowed max-file-size
Then Restart IIS to apply the change. |
 |
|
|
Topic  |
|
|
|