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/O Code)
 File Manager?
 New Topic  Reply to Topic
 Printer Friendly
Next Page
Author  Topic Next Topic
Page: of 4

Desmomax
New Member

55 Posts

Posted - 27 October 2006 :  03:46:44  Show Profile  Reply with Quote
Hallo !

I am looking for a MOD that allow user to menage their files uploaded in posts (delete, use again in other posts..) and allow me to give a kb limit of files uploaded.
At moment the only way is to check the directory named for each user

Can someone suggest me a Mod ?

many thanx
<


Il forum

weeweeslap
Senior Member

USA
1077 Posts

Posted - 27 October 2006 :  03:56:16  Show Profile  Visit weeweeslap's Homepage  Send weeweeslap an AOL message  Send weeweeslap a Yahoo! Message  Reply with Quote
http://www.snitzbitz.com/mods/default.asp?pg=4&SortBy=Name&SortDir=asc&Version=All
couple file stuff there, file library might be the one you want<

coaster crazy
Go to Top of Page

modifichicci
Average Member

Italy
787 Posts

Posted - 27 October 2006 :  13:50:25  Show Profile  Visit modifichicci's Homepage  Reply with Quote
Proeder file attach mod, on snitzbitz.<

Ernia e Laparocele
Forum di Ernia e Laparocele
Acces - MySql Migration Tutorial
Adamantine forum
Go to Top of Page

Desmomax
New Member

55 Posts

Posted - 31 October 2006 :  03:04:05  Show Profile  Reply with Quote
thanks all..

grazie modifichicci <


Il forum
Go to Top of Page

Desmomax
New Member

55 Posts

Posted - 13 February 2007 :  10:59:05  Show Profile  Reply with Quote
I installed this mod. I can decide the maximun file size but i can not find where to set the maximun disk space allowed.

is it possible? i'd like to give a limited space where upload files for each user.
many thanx
<


Il forum
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 13 February 2007 :  11:08:44  Show Profile  Reply with Quote
As far as I know, none of the attachment or file manager files include such a feature; you would need to edit your files to include a check on the size of the folder before processing the upload.

<

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

Desmomax
New Member

55 Posts

Posted - 13 February 2007 :  12:47:18  Show Profile  Reply with Quote
unfortunally i cant do that..
i dont know so well asp
<


Il forum
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 13 February 2007 :  12:58:14  Show Profile  Reply with Quote
Which mod are you using?

<

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

PPSSWeb
Junior Member

312 Posts

Posted - 13 February 2007 :  13:57:32  Show Profile  Reply with Quote
If you are using Proeder's as suggested above you can modify the code in outputFile.asp to limit by folder size by adding the following:

around line#161 after the endif and before 'Create and Write to a File insert:
'##################limit uploads directory size to less than maxDiskSpace#####################
Dim ds 
Set ds=ScriptObject.GetFolder(memberPath)
IF ds.Size + bytecount > maxDiskSpace then
	Response.Write	"<html>" & vbNewline
	Response.Write	"<head>" & vbNewline
	Response.Write	"<title>Error while uploading</title>" & vbNewline
	Response.Write	"</head>" & vbNewline
	Response.Write	"<body link=""" & strLinkColor & """ aLink=""" & strActiveLinkColor & """ vLink=""" & strActiveLinkColor & """>" & vbNewline
	Response.Write	"<p align=""center"">" & vbNewline
	Response.Write	"	<font face=""" & strDefaultFontFace & """ size=""" & strHeadFontSize & """ color=""" & strDefaultFontColor & """><b><br>This file cannot be uploaded.<br><br></b></font></ br><hr size=""1"" color=""" & strHiLiteFontColor & """>" & vbNewline
	Response.Write	"	<table>" & vbNewline
	Response.Write	"		<tr><td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """><b> Maximum Disk Space </b></font></td><td><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>- Maximum upload disk space of " & maxDiskSpace/1048576 & "MB exceeded. " & vbNewLine & "Current Disk Usage =  " & Round(ds.Size/1048576,2) & " MB</font></td></tr>" & vbNewline
	Response.Write	"	</table><hr size=""1"" color=""" & strHiLiteFontColor & """>" & vbNewline
	Response.Write	"	<p align=""center""><a href=""#"" onClick=""history.go(-1);"" style=""text-decoration: none""><font face=""" & strDefaultFontFace & """ size=""" & strDefaultFontSize & """ color=""" & strDefaultFontColor & """>Please click here to go back and choose another file to upload.</font></a></p>" & vbNewline
	Response.Write	"</p>" & vbNewline
	Response.Write	"</body>" & vbNewline
	Response.Write	"</html>" & vbNewline
Else 
'#############################################################################################


around line#224 between the Response.Write and the Else insert:
'#########close limit for maxDiskSpace#####	
	End If	
	set ds=nothing
'##########################################


Then add the constant maxDiskSpace to your config.asp file in the variable section:
'###################Define Maximum Disk Space for uploads Per User##############
Const maxDiskSpace = 1048576
'###############################################################################
<

Edited by - PPSSWeb on 13 February 2007 14:41:04
Go to Top of Page

PPSSWeb
Junior Member

312 Posts

Posted - 13 February 2007 :  15:21:02  Show Profile  Reply with Quote
You might also want to let the users know how much disk space they have used of their quota in the myfiles page.

Insert at line#222 the following:
'#################display current disk usage################
Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")
Dim ds 
Set ds=ScriptObject.GetFolder(Path)	
Response.Write "<p align=""center""><font face=""" & strDefaultFontFace & """ size=""" & strHeaderFontSize-2 & """><b>Current Disk Usage = " & Round(ds.Size/1048576,2) & " MB" 
IF AdminAllowed=false then 
	Response.Write  " of "& maxDiskSpace/1048576 & " MB</b></font></p><p>"
Else
	Response.Write  "</b></font></p><p>"
End IF

set ds=nothing
'###########################################################
<

Edited by - PPSSWeb on 13 February 2007 15:27:37
Go to Top of Page

Desmomax
New Member

55 Posts

Posted - 14 February 2007 :  03:13:28  Show Profile  Reply with Quote
great!!!! many thanks!!

unfortunally i can not find the line where insert your code. My outputfile.asp is totally different... i have the lcamara's mod of proeder mod (with fixes from modifichicchi and others).
Here is mine outputfile, could you please give it a look and tell me where insert your code?
many thanx

Download Outputfile.rar
<


Il forum

Edited by - Desmomax on 14 February 2007 03:14:21
Go to Top of Page

thermal_seeker
Junior Member

United Kingdom
430 Posts

Posted - 14 February 2007 :  08:56:53  Show Profile  Reply with Quote
is it possible to allow different members different amounts of disk space??

Dave<

No good at coding, but I can plough a field !!
Go to Top of Page

PPSSWeb
Junior Member

312 Posts

Posted - 14 February 2007 :  09:38:19  Show Profile  Reply with Quote
quote:
Originally posted by Desmomax

unfortunally i can not find the line where insert your code. My outputfile.asp is totally different... i have the lcamara's mod of proeder mod (with fixes from modifichicchi and others).
Here is mine outputfile, could you please give it a look and tell me where insert your code?



In your outputFile.asp, you should insert the first bit of code at line#254 and the second bit at line#318.


quote:
Originally posted by thermal_seeker

is it possible to allow different members different amounts of disk space??



Yes, you could add more variables for the different member levels, etc. Then change the if statement to check for the different members and use their associated quota's.

I never thought to do this until Desmomax mentioned it. It was a great idea so I put this code on my intranet site. I have one user who requires more disk space than others, so I changed the const maxDiskSpace to a variable in config.asp and added an if statement to check for her usergroup (usergroups mod saves the day again) and change the value before the check against the bytecount.<

Edited by - PPSSWeb on 14 February 2007 09:42:00
Go to Top of Page

thermal_seeker
Junior Member

United Kingdom
430 Posts

Posted - 14 February 2007 :  13:03:02  Show Profile  Reply with Quote
would you like to share your piece of code??

would I have to make extra usergroups (ie file upload, file upload2, file upload3 etc?)

EDIT: thinking about this a bit more.. I have set the max upload size to 20MB. Once a user gets to that amount surely all I would have to do is allow them to usergroup fileupload2 for a further 20MB?? and so on...or am I missing something??
I presume that I would also have to add another line to post.asp
if ((mlev > 3) or InArray(strGroupMembership, intFileUpload2Allowed)) then ' check that user is either administrator of member of upload2 usergroup

and in config.asp
const intFileUpload2Allowed = <integer value of group>




Dave<

No good at coding, but I can plough a field !!

Edited by - thermal_seeker on 14 February 2007 16:55:37
Go to Top of Page

Desmomax
New Member

55 Posts

Posted - 15 February 2007 :  02:59:53  Show Profile  Reply with Quote
quote:
Originally posted by PPSSWeb
I never thought to do this until Desmomax mentioned it. It was a great idea so I put this code on my intranet site.



Many thanx for your help
glad to have given my contribution even if only with an idea<


Il forum
Go to Top of Page

Desmomax
New Member

55 Posts

Posted - 15 February 2007 :  04:53:45  Show Profile  Reply with Quote
it works!!! Great!!! :)

i have only a little error:

when i try to upload a file too big then i receive the error message , when i click to COME BACK on the pop up windows i receive this error:

Errore di run-time di Microsoft VBScript error '800a0005'

Chiamata di routine o argomento non validi: 'MidB'

/myforum/upload.asp, line 5


The line is:
boundary = MidB(RequestBin,PosBeg,PosEnd-PosBeg)


any idea?

<


Il forum
Go to Top of Page
Page: of 4  Topic Next Topic  
Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.15 seconds. Powered By: Snitz Forums 2000 Version 3.4.07