Created: 15/08/2013
By: ThemeDema
Email: themedema@outlook.it
Thank you for purchasing Tequila. If you have any questions that are beyond the scope of this help file, please feel free to email via my user page contact form here. Thanks so much!

Table of Contents

  1. Install
  2. Structure
  3. PHP Structure
  4. CSS Files
  5. JavaScript
  6. Players
  7. Sources and Credits
  8. API

1. Install

To install tequila you must copy the files to your server and, once done, go to "www.yourdomainname.com/yourfolder/install/" and follow the guided process. Once the system has been installed, go to "www.yourdomainname.com/yourfolder/index.php"

2. Structure

The structure of the files of Tequila, is very simple:

  1. In the "root" there are the PHP pages of Tequila.
  2. In the folder "admin/" there are pages for system administration.
  3. In the folder "download/" there are zip files for downloads folder.
  4. In the folder "documentation/" there is the documentation page.
  5. In the folder "files/" there are/will be all the users's files. A script creates a folder for each user with his name. (es.: The user "john" will have the folder "john".)
    (In the folder "files/" and in the folders of each user will be also a "index.html" file for security reasons.)
  6. In the folder "include/" and subfolders there are the files of the Tequila system:
    - In the subfolder "css/" there are CSS files of the Tequila system.
    - In the subfolder "img/" there are Images of the Tequila system.
    - In the subfolder "js/" there are Javascript files of the Tequila system.
    - In the subfolder "php/" there are PHP files of the Tequila system.
    - In the subfolder "player/" there are Flash Players of the Tequila system.
  7. In the folder "install/" there are the instructions to install Tequila in your server.
  8. In the folder "profilepictures/" there are profile pictures uploaded by users.

3. PHP Structure

To simplify the reading, we have divided the structure into two parts:

  1. PHP pages (in the "root"):
  2. - createzip.php, this script creates the zip file with all the files in a particular folder and then download it.
    - download.php, this script forces the download of files.
    - file.php, this script displays a preview of a file and allows you to view informations for it, download or share it.
    - files.php, this script displays the grid of files and allows the filtering functions, files management and files upload.
    - forgotpass.php, this script displays the password recovery.
    - index.php, this script redirect the user.
    - login.php, this script displays the log in form.
    - process.php, this script executes the user's processes.(es.: log out)
    - register.php, this script displays the sign up form.
    - result.php, this script displays the search result.
    - upload.php, this script upload files and adds them to the database.
    - useredit.php, this script displays the User Edit form
  3. PHP system files (in the "include/" folder):
  4. - action.php, this script move, copy, remove or rename files and folders.
    - byteformat.php, this script converts the measurements of the size.
    - constants.php, this script displays the constants of the system. (es.: system settings)
    - database.php, this script performs the database operations.
    - foldersize.php, this script displays the Folder Size.
    - listdir.php, this script displays a list of all the user's folders.
    - form.php, this script performs the demands of forms.
    - mailer.php, this script executes requests to send emails.
    - mkdir.php, this script creates folders.
    - opendir.php, this script opens folders and show all the files contained in it.
    - profilepictures.php, this script upload and resize profile pictures of users.
    - safetyrename.php, this script converts the name of the file to secure code, file name or id.
    - search.php, this script performs lookups.
    - session.php, this script performs the users's sessions.
    - SmartImage.class.php, this script resize images.
    - view_active.php, this script displays active users.
    - views.php, this script manages the views of files.
    - zipper.php, this script creates zip files.

Generally the pages are divided into multiple sections. On each page, the first three lines are dedicated to import the page "session.php".
In the < head > there are three different sections:
  1. Description of page. (es.: line 6)
  2. Import CSS files. (es.: line 8>9)
  3. Import Javascript files. (es.: line 11>12)
Also in the < body > there are three different sections:
  1. Code to execute if the user is logged-in. (es.: line 15>21)
  2. Code to execute if the user is not logged-in. (es.: line 22>25)
  3. Run Javascript. (es.: line 26>29)

In the pages with a pop-up div (like the example in the picture), there is the div < intro-pu-wrapper >.
There are any forms that link on pages in the "include/" folder.


In the pages with a tiles GUI (like the example in the picture 2), there is the Wookmark jQuery plugin (Documentation here).
  1. There is a < div "main" > that contains a < ul >, where it is imported the page "opendir.php", which prints the < li >s. The filters in the sidebar are in the outer < ul "filters" >
  2. The calculator of available space works thanks to the script "foldersize.php" and some mathematical operations.
  3. The functions in the header bar (es.: Copy, New Folder, Remove) work thanks to the script:
  4. - mkdir.php, this script creates folders.
    - action.php, this script move, copy, remove or rename files and folders.
    - search.php, this script performs lookups.

On the page that shows the preview of files (like the example in the picture 3), depending on the type, it shows:
- image, if the file is an image.
- music player, if the file is an music ".mp3".
- text, if the file is a text file ".txt".
- video player, if the file is a video ".mp4".
- webpage, if the file is a webpage ".html".

Security management is entrusted to the script "include/php/safetyrename.php" of files that converts the name of the file to secure code, file name or id. In the system, in fact, every file, when loaded, saved in the database these three fields:
- secure-code, security code with which the file is saved on the server (es.:4564376547.jpg).
- file-name, the real name of the file (es.:thename.jpg).
- id, a unique id that identifies the file (es.:2342344543).

How does the themes-system work? Simply the pages in the root retrieve entire pages from the theme folder (example "default") in the folder "themes/". Pages choose the theme depending on the settings saved in the file "themes/theme.php".

To make changes you can rely on the comments that explain the operation of the script, or you can contact our team who will respond as soon as possible.

4. CSS Files

The .css files of the Tequila system are three:

  1. The file "jquery.mCustomScrollbar.css" is the Cascading Style Sheets for the custom scrollbar, like in the "systemstats.php" page.
  2. The file "normalize.css" is a customisable CSS file that makes browsers render all elements more consistently and in line with modern standards. This is a generic reset file.
  3. The file "style.css" is a customisable CSS for the general GUI of Tequila.
  4. The file "mobile.css" is a customisable CSS for the mobile GUI of Tequila.
  5. The file "dropzone.css" is a customisable CSS for the uploading zone of the files.
If you would like to edit a specific section of the site, simply find the appropriate label in the CSS file, and then scroll down until you find the appropriate style that needs to be edited.
If you would like to edit the color, font, or style of any elements in one of these columns, you would do the following:

#primaryContent a {
color: #someColor;
}

If you find that your new style is not overriding, it is most likely because of a specificity problem. Scroll down in your CSS file and make sure that there isn't a similar style that has more weight.

5. JavaScript

Tequila imports six Javascript files:

  1. The file "jquery.knob.js", the jQuery Knob plugin.
  2. The file "jquery.mCustomScrollbar.js", the jQuery Custom Scrollbar plugin.
  3. The file "jquery.sysstats.js", that runs the jQuery Knob plugin.
  4. The file "jquery.wookmark.js", the Wookmark jQuery plugin.
  5. The file "jquery.wookmark.start.js", that runs the Wookmark jQuery plugin.
  6. The file "jquery.js", that is a Javascript library that greatly reduces the amount of code that you must write.
  7. The file "dropzone.js", runs the Dropzone Js Uploader.
  8. The file "tequila.js", with the javascript functions of the system.
To make changes to the code please consult the relevant documentation here or reviews provided.

6. Players

Tequila uses three different flash player:

  1. The file "player_mp3_maxi.swf", that is a simple flash .mp3 player.
  2. The file "jwplayer.js" > "player.swf", that is a flash .mp4 player.
  3. The file "player_mp3_mini.swf", that is a simple flash .mp3 player.
To make changes to the code please consult the relevant documentation here.

7. Sources and Credits

I've used the following images, icons or other files as listed.

8. API

TequilApi beta 0.1 This the first version of the apis developed for the Tequila script. This apis uses Rest to handle requests and replies.
List of methods:

In the next release we hope to be able to add some methods to delete files, create folders, etc.

Once again, thank you so much for purchasing Tequila. As I said at the beginning, I'd be glad to help you if you have any questions relating to Tequila. No guarantees, but I'll do my best to assist. If you have a more general question relating to the scripts on CodeCanyon, you might consider visiting the forums and asking your question in the "Item Discussion" section.