Posts: 290
Threads: 26
Joined: Oct 2010
2010-12-01, 03:41:22
(This post was last modified: 2011-06-20, 10:40:07 by Chastin3.)
I was looking for a plugin (or something) so I can provide files to clients.
Currently I just use sub-directories on my server that I upload files into and htaccess protect them with a username and password, then provide them with a URL.
Something like a a user based file manager. I can imagine the following:
I have a page <mysite>/clientarea that is served by a plugin.
This gives a simple login screen, that when a client logs in they would get a breadcrumb like clientarea < clientname and be provided a simple list of file links that they can use. These links would be php handled and not links to the actual files. I've looked at a fiew plugins and they seem to work by responding to a hook in a created page. I didn;t want to have to create a separate page for every client and insert their plugin call, instead I was hoping the pages could be served up based on the slug.
On the back end, I'd like a page to add/delete clients, and set/change their access passwords.
I was thinking the files could just be stored under /data/clientarea/clintname/
In an ideal universe, this would provide a simple upload tool fo me, and in a super ideal universe would allow the client to upload files as well, and email me when a file is uploaded,
Would something like this fit as a getsimple plugin?
Or should I just keep it ourside the GS framework entirely?
Thanks for your time...
-Rob A>
Posts: 1,204
Threads: 30
Joined: Jun 2010
But are you generally asking for such plugin, or willing to create one ?
It would be nice to see such plugin, with users/files management in backend.
But creating such plugin would have to have bigger impact on GS than only access to downloads. It would have to add an additional type of created pages, available only to logged in users.
I was thinking about a simple solution based on htaccess too, but connected a little bit with GS.
I'd protect with htaccess a certain page, on which I could post html links to files, or just list certain directory content.
But this soution doesn't give a personalized access, and creating N users + generating N htpasswords (not to mention changing them later) is too much of a hassle.
ps. because I'm more a skeptic than optimist, I don't believe such plugin will be created ever soon. There's still no possibility to have more than 1 admin account, and creating cheats (like a small php script. which swaps between/renames user.xml files) started to get out of control.
Addons: blue business theme, Online Visitors, Notepad
Posts: 290
Threads: 26
Joined: Oct 2010
yojoe- I'm willing to work on such a plugin but wanted to know if it would fit within the existing plugin framework well.
I know if falls outside the scope of the existing GS core.
Thinking about it, I could solve my specific problem fairly simply by creating a page template that would look through a subdirectory that matched the page slug and use that to serve up content, using a file in that folder to specify a user and password for access. I might play with that first to see if it is workable.
I am familiar with another blog package that works kind of the other way around from get simple... a plugin can have a permalink associated with it and then any call to that permalink gets handed off to the plugin to generate the content, without the need to create a page. I don;t know if the GS framework allows that.
(For example, I create a plugin to do something and give it a permalink of "myplugin". Then going to www.sample.com/myplugin or www.sample.com/index.php?id=myplugin will render the page, and expect myplugin to fill in the content. Sort of a virtual page.)
-Rob A>
Posts: 290
Threads: 26
Joined: Oct 2010
2010-12-08, 02:46:38
(This post was last modified: 2010-12-22, 00:05:47 by Chastin3.)
I've cobbled together such a plugin.
It isn't pretty, but it seems to be working on my testbed site.
In the back-end there is a new menu called 'Client Files'
This lets you manage the client file areas, creating new ones, changing the password (to change a password, use the create form with an existing client name), deleting them (the 'X'), or managing them (click on the client are name).
Client areas are created under the data/other directory. The password is stored in each client area folder in a dot file.
Managing the client area lets you upload/replace, delete, and view files in the client area.
files are served by a helper php script included in the zip, as I could not find any other way to hook into the backend before headers were sent.
The front end is activated by using (% clientfiles %) in a page. This will be expanded to the whole front-end.
There is a login form. Once logged-in the client is given a list of their files which can be downloaded. I maintain the login using session variables.
I've never used sessions before so I hope I did it correctly. I serve the file using the same helper function when accessed from the front end out of sheer laziness as the code was already written. I suppose it could just be tied into the index-pretemplate hook as well to completely hide the backend helper.
Please give it a test. No idea if it will work with non-english character sets.
It needs cleanup, as many things should be moved into functions, and the whole UI needs to be prettied up, but I wanted to get it out for others to try.
Thanks,
EDIT: New version further down.
-Rob A>
Posts: 290
Threads: 26
Joined: Oct 2010
2010-12-15, 14:56:22
(This post was last modified: 2010-12-22, 00:06:26 by Chastin3.)
I've prettied up the front-end enough to use it on my production site.
You can try as a client here: http://testbed.cartocopia.com/ (use the Client Area menu)
The backend is now updated to have confirmation checks on deleted, and uses some of the admin interface CSS to look prettier.
I'd love some testing/feedback before adding this to extend.
Just unzip into your plugin folder. The zip includes an htaccess file to allow access to the download helper file in the clientfile directory.
-Rob A>
Posts: 290
Threads: 26
Joined: Oct 2010
Updated the previous post.
-Rob A>
Posts: 52
Threads: 5
Joined: May 2010
A complete manual how to set it up ...??
RobA Wrote:Updated the previous post.
-Rob A>
Posts: 290
Threads: 26
Joined: Oct 2010
2010-12-17, 01:44:22
(This post was last modified: 2010-12-22, 00:07:42 by Chastin3.)
maxpop Wrote:A complete manual how to set it up ...??
I have made a quick manual and attached it here.
-Rob A>
Posts: 52
Threads: 5
Joined: May 2010
RobA Wrote:maxpop Wrote:A complete manual how to set it up ...??
I have made a quick manual and attached it here.
-Rob A>
Thank you for the manual.
Cant get this to work properly, when i entered Name and Password (+Client log in) nothing is happening more the name and password is empty, how come?
//Maxpop
Posts: 14
Threads: 0
Joined: Sep 2010
love the plugin and works perfectly for me.. thanks for sharing!
Posts: 290
Threads: 26
Joined: Oct 2010
maxpop Wrote:Thank you for the manual.
Cant get this to work properly, when i entered Name and Password (+Client log in) nothing is happening more the name and password is empty, how come?
//Maxpop
When you enter a name and password there should be a directory created (with that name, so there may be an issue with character sets) and it will be displayed as shown in the manual.
Any errors should message out, but you need to turn debug on to see them. Once you have enabled debug please let me know what the error message is.
-Rob A>
Posts: 52
Threads: 5
Joined: May 2010
2010-12-21, 07:00:43
(This post was last modified: 2010-12-21, 07:12:18 by pesegolsson.)
Got creating and login to work.
Thanks..
RobA Wrote:maxpop Wrote:Thank you for the manual.
Cant get this to work properly, when i entered Name and Password (+Client log in) nothing is happening more the name and password is empty, how come?
//Maxpop
When you enter a name and password there should be a directory created (with that name, so there may be an issue with character sets) and it will be displayed as shown in the manual.
Any errors should message out, but you need to turn debug on to see them. Once you have enabled debug please let me know what the error message is.
-Rob A>
Posts: 1,927
Threads: 88
Joined: Apr 2010
excellent and useful plugin
http://neowebtime.ru/0/
admin/admin
Posts: 290
Threads: 26
Joined: Oct 2010
I've uploaded the latest version to the Extend repository as it looks good enough for public use.
http://get-simple.info/extend/plugin/client-files/66/
This version adds a change password link for the client areas and has moved all formatting of the front end table out of the code. Simply style it in your CSS.
The css I use in the demo http://testbed.cartocopia.com/testing/ is set up to match the default template, and can be dropped in your css file:
Code: /* CLIENT FILES TABLE */
#cf_table {
font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
width:100%;
border-collapse:collapse;
}
#cf_table caption {
font-weight: bolder;
}
#cf_table td, #cf_table th {
font-size:1em;
border:1px solid #cccccc;
padding:3px 7px 2px 7px;
}
#cf_table th {
font-size:1.1em;
text-align:left;
padding-top:5px;
padding-bottom:4px;
background-color:#009865;
color:#ffffff;
}
#cf_table tr.alt td {
color:#000000;
background-color:#f9f9f9;
}
-Rob A>
Posts: 105
Threads: 10
Joined: Dec 2009
Amelioration idea:
Add an option : allowing the customer to log in his space to upload files.
Thanks
Posts: 38
Threads: 1
Joined: Mar 2011
Nice plugin, but i miss something!
It is only possible to upload files, but if a have a link to a youtube file than i can not place a link to youtube. This would be very nice so that my server is not running everytime people want to see this file.
Posts: 38
Threads: 1
Joined: Mar 2011
Also it is not possible to upload MOV files.
If i made a movie with IPhone and i will put it very fast only than i have also a problem. First i have to edit it on the computer and then convert it to some other compression/file format.
Posts: 290
Threads: 26
Joined: Oct 2010
2011-03-29, 00:39:28
(This post was last modified: 2011-03-29, 00:41:15 by Chastin3.)
GetSimple2011 Wrote:Also it is not possible to upload MOV files.
If i made a movie with IPhone and i will put it very fast only than i have also a problem. First i have to edit it on the computer and then convert it to some other compression/file format.
There is nothing in the code to prevent uploading MOV files. There could be a timeout issue from your server.
http://testbed.cartocopia.com/testing/ has a mov file I uploaded to the test account and it works fine.
It may not serve up the correct mimetype, as mov files aren't in the list of the dlfile.php helper though, but a user can just right click and save/as if the server/browser don;t know how to deal with the file.
-Rob A>
Posts: 38
Threads: 1
Joined: Mar 2011
I upload again, your movie and one of my one and both give me the message "Unable to upload sample_iTunes.mov please try again"
Posts: 38
Threads: 1
Joined: Mar 2011
In the "clientfiles.php" is one line that says
echo '<input type="hidden" name="MAX_FILE_SIZE" value="10000000" />';
So that can be the problem but in the tab files there is a message below "client files" "max file size 2mb". Maby that is the problem because i have the same with a image that is bigger than 2mb.
Posts: 38
Threads: 1
Joined: Mar 2011
Oke i made some other test! i uploaden a image with a file size 1.9mb and it was oke, after that i uploaden a file 2.1mb and there is my problem. I can not upload files bigger than 2mb.
Can i change this somewhere in GetSimple? i think that there is a limit of the 2mb but i can not find where it is.
Posts: 38
Threads: 1
Joined: Mar 2011
Hello Rob, is there also a solution to create a link with ClientFiles?
I want to use a movie from YouTube and put a link to that file.
Posts: 290
Threads: 26
Joined: Oct 2010
GetSimple2011 Wrote:Oke i made some other test! i uploaden a image with a file size 1.9mb and it was oke, after that i uploaden a file 2.1mb and there is my problem. I can not upload files bigger than 2mb.
Can i change this somewhere in GetSimple? i think that there is a limit of the 2mb but i can not find where it is.
I'm guessing it is a php limit, or a limit of your web host.
regarding links, why wouldn't you just send them a link by email? (sorry, just am not sure what your use model is).
-Rob A>
Posts: 1
Threads: 0
Joined: Mar 2011
404 page no found when try to open uploaded files. Any ideas?
Posts: 290
Threads: 26
Joined: Oct 2010
yarcoz Wrote:404 page no found when try to open uploaded files. Any ideas?
Yeah - I just found a bug when gs isn't installed in your root folder....
I've updated extend with (hopefully) the fixed version:
http://get-simple.info/extend/plugin/client-files/66/
-Rob A>
|