Created: 09/08/2010
By: vladh (vladh.net)
Email: vlad@vladh.net
Thanks for purchasing Tastydir! If you have any questions or encounter any problems, please feel free to send me an email!
Tastydir's layout is separated into six sections.
The #header div contains an <h1> tag. The text inside this tag corresponds to the text in the logo, although the logo is actually an image - this is done to help search engines. Please check out the CSS Files and Structure section for further instructions on changing the logo.
The #nav div contains:
The former contains navigation buttons with straightforward onclick attributes, such as history.go(-1).
The latter contains div.item elements separated by div.sep separators. The first div.item in the code is the rightmost, the last is the leftmost. The aforementioned items are actually the login section and the info tooltip - again, pretty straightforward.
The #nav div has a slightly deeper structure, so here's an example:
div#path ....div.pathpart{ ........a#path1{ ............home ............div.breadcrumb{} ........} ....}
Where div.pathpart is the section of the path, a#path1 is the link that changes the directory to that path, and div.breadcrumb is the arrow separator.
Initially, this contains: table-containing div (div#files_outer), files table (table#files_table), table header (thead#files_head), table body - where the files go (tbody#files).
Then, Javascript does something like this for every file/folder.
Folder: tr #folder0 .frow ....td .fcell .folder ........a .fname .folder [href=path]{ folder name } ....td ........span .fsize{} ....td ........a .fperms ............span (.ok, .no, or no class){ drwxr-xr-x } ....td .actions ........img .action_editfolder ........img .action_deletefolder File: tr #file0 .frow ....td .fcell .file ........a .fname .file .action_downloadfile [href=_tastydir/do.php?download=path] [style=background image that changes with extension]{ file name } ....td ........span .fsize{191.00 B} ....td ........a .fperms ............span (.ok, .no, or no class){ drwxr-xr-x } ....td .actions ........img .action_editfile ........img .action_deletefile ........img .action_copyfile
There's a lot of Javascript stuff going on here, and you can read about that in the JavaScript and PHP (with AJAX) section.
The #bottombar div contains:
Nothing really interesting here.
This div contains:
Again, pretty simple.
Tastydir only uses one CSS file - _tastydir/style.css. This contains:
You can find details about the CSS reset in the CSS itself. As for the jQuery UI styling, it's pretty long - please don't try to edit it manually. Instead, use jQuery's themeroller to make a jQuery UI theme.
As for the actual styling, it's pretty self-explanatory and similar in structure to the HTML. You may want to change the logo though, so here's how:
Since Tastydir mainly uses AJAX, most of its core functionality is in the Javascript.
The main Javascript file is located in _tastydir/js/site.js (this file also has awesome ASCII art headings!) - it makes requests to _tastydir/do.php, which actually performs file operations. Other files: _tastydir/common.php (common functions etc.), _tastydir/install.php (install scripts).
Tastydir uses some pretty complicated Javascript, and documenting all of it would be very difficult. Instead, I'll just outline a basic request/file operation. Let's have a look at file editing:
Additional example: if the user was actually creating a new file, the same operations would be performed, with two main differences:
Also: all of these requests return a status code (each request has a custom set of them), which is then checked by the Javascript - which either continues the operation or presents the user with an error or confirmation dialog.
Remember: there are many such requests, so good luck!
Please read the README file for additional information and credits.
Once again, thank you for purchasing Tastydir. Feel free to email me regarding any issues or questions you may have, and I'll do my best to help. Have a nice day!
Vlad Harbuz (vladh.net)