Closed Fuchur777 closed 12 years ago
That would be very handy. I think that a root-folder attribute in the config file. It should be left blank("") for the folder for webroot it should be ("/"), and for highest available foldet ("//").
Thanks for the request & suggestion! This seems like it will be simple to implement (I say before even beginning to try...). In any case, I'm on it!
Superb!
Gr. Frank
Op 6 nov. 2012 om 22:22 heeft Self-Evident notifications@github.com het volgende geschreven:
Thanks for the request & suggestion! This seems like it will be simple to implement (I say before even beginning to try...). In any case, I'm on it!
— Reply to this email directly or view it on GitHub.
Hi Self-Evident, my name is Anton, i`m from Russia I want to do for OneFileCMS Russian localization. Make it translated into Russian. I can do this?
PS: anton@zaykin.com
Absolutely! I would be glad to include a Russian language file with OneFileCMS. Feel free to either issue a pull request, or just post a note with the file (or a link to the file) and I'll merge it in.
Thanks for the interest, and please let me know if you have any suggestions.
David.
----- Original Message ----- From: Zaykin Sent: 11/07/12 01:23 AM To: Self-Evident/OneFileCMS Subject: Re: [OneFileCMS] SubFolder (#14)
Hi Self-Evident, my name is Anton, i`m from Russia I want to do for OneFileCMS Russian localization. Make it translated into Russian. I can do this?
PS: anton@zaykin.com
Fuchur777,
A quick question: when you refer to a "higher folder", do you mean a web-accessible sub-folder within the website, or do you mean a parent folder to you website's web-root folder - ie: a folder not accessible from the web?
In either case, there is a simple "chdir()" command at the end of the Session_Startup() function that affects the base folder to which OneFileCMS has access. It is currently set to $_SERVER["DOCUMENT_ROOT"], but it could be set to any folder, such as /, and give you at least browsing access to the entire server hosting the website. However, you would still be limited by normal file permissions, etc.
So, as a start, simply changing the chdir() folder will give/limit access to a given folder and it's sub-folders. However, if the given folder is outside the web-root folder, currently, some functions may not work due to how links are put together. Haven't had time to test everything.
Anyway, while it will probably be a very simple feature/configuration to implement, I'm gonna take a little time to test things out and make sure it doesn't create any problems (wouldn't be the first time:) . And any suggestions are welcome, of course.
Well I tried to modify the file myself. Didn't work completely...
See inline comments
Op 7 nov. 2012 om 23:53 heeft Self-Evident notifications@github.com het volgende geschreven:
Fuchur777,
A quick question: when you refer to a "higher folder", do you mean a web-accessible sub-folder within the website
yes or do you mean a parent folder to you website's web-root folder - ie: a folder not accessible from the web?
No In either case, there is a simple "chdir()" command at the end of the Session_Startup() function that affects the base folder to which OneFileCMS has access. It is currently set to $_SERVER["DOCUMENT_ROOT"], but it could be set to any folder, such as /, and give you at least browsing access to the entire server hosting the website. However, you would still be limited by normal file permissions, etc.
So, as a start, simply changing the chdir() folder will give/limit access to a given folder and it's sub-folders. However, if the given folder is outside the web-root folder, currently, some functions may not work due to how links are put together. Haven't had time to test everything.
I tried editing the script to accomplish this but didn't fully manage... Anyway, while it will probably be a very simple feature/configuration to implement, I'm gonna take a little time to test things out and make sure it doesn't create any problems (wouldn't be the first time:) . And any suggestions are welcome, of course.
Nicest thing would be one variable in the config that you set the path to which sub-folder you want the script to work.
— Reply to this email directly or view it on GitHub.
Thanks for the sub-folder clarifications - that will simplify things a little bit. Interesting that changing the value for chdir() didn't work - I'll have to double check what I thought I was thinking...
Got it right now. Add line 143 (Add the folder there if needed) Change line 145 (original 144) Change line 436 (original 435)
Thanks! Now I'll test it out and see what I can break... :) Then I'll work it in...
----- Original Message ----- From: Fuchur777 Sent: 11/10/12 03:41 PM To: Self-Evident/OneFileCMS Subject: Re: [OneFileCMS] SubFolder (#14)
Got it right now. Add line 143 (Add the folder there if needed) Change line 145 Change line 436 (original 435)
— Reply to this email directly or view it on GitHub.
With some incidental changes, the $ACCESS_ROOT option has been implemented. Thanks for the suggestion!
Nice!
Op 12 nov. 2012 om 22:10 heeft Self-Evident notifications@github.com het volgende geschreven:
With some incidental changes, the $ACCESS_ROOT option has been implemented. Thanks for the suggestion!
— Reply to this email directly or view it on GitHub.
A feature request.
Could there be the option to only give the script access to a higher folder. So not only the webroot.
Would be very helpfull. Pointing out where to change the dile would be enough if it is not going to be a feature.
Thanks!