plainblack.com
Username Password
search
Bookmark and Share

non-browsable File Folder FTP template

This will the hide the listing of files in a folder unless "admin is turned on", but will display the subfolders. The template can be easily modified to hide them as well.

For the reasoning behind this insanity, please see my wiki: http://www.webgui.org/wiki/building-your-own-file-system-within-webgui

 

System Requirements

Developed on 7.7.28

Release Notes for Version 2 (8/31/2010)

fixed relative paths for both ^Parent(url); and ^Parent(nice);

from this:
return $myparent->get('url');
to this:
return '/'.$myparent->get('url');

and from this:
       return '<a href="'.$myparent->get('url').'">'.$myparent->get("title").'</a>';
to this:
       return '<a href="/'.$myparent->get('url').'">'.$myparent->get("title").'</a>';

Comments
0elnino: "In the template, I choose not to hide the macro. So it's up to the administrator to test and make sure you don't bring people to places you don't want them to be..

Or you can surround the macro call with:

<tmpl_if session.var.adminOn>

<img src="/extras/assets/small/folder.gif" class="wg-icon" alt="<tmpl_var title>" />
<a href="&#94;Parent('url');" title="up">Up a level</a>

</tmpl_if>

With the above code, it will only appear if admin is turned on.

"
4TheSeparator: "Very interesting and a fine illustration of the flexibility of WebGUI!"
DownloadFileFolderFTP.tmpl FileFolderFTP.tmpl
Parent.pm.txt Parent.pm.txt
Parent_pm.txt Parent_pm.txt
LinksWebGUI Programmer
No Support Offered
Screenshotsscreenshot.jpg
Statistics Downloads: 1011
Views: 2418
Rating: 4
Updated: 8/31/2010
Keywords Templates
NavigationMore from WebGUI Programmer
Back to the Bazaar
© 2017 Plain Black Corporation | All Rights Reserved