Zpersianscript.ir


Z-Docu v1.0”

Created: 02/07/2014
By: ZoneCoders
Last Update: 02/07/2014
Current version: 1.0
Email: contact@zonecoders.com

Table of Contents

  1. Requirements
  2. INSTALLATION
  3. Upgrading
  4. Configuration
  5. Integration

Thank you for purchasing Z-Docu Online Documentation Script.

persianscript.ir - Download Unique Web Templates And Scripts

Z-Docu is a multi products online documentation script for your products or services based on categories and subcategries for each product or services. Z-Docu is build on pure php and smarty framework, full responsive design template.

Easy to integrate and customize the template design and source code. You can create unlimited templates that can be changed any time you want from General Settings.

The script come with a lot of features for admin and editors. Other people can join your website as editors and they can edit your documentation articles based on user level. You can opt for auto approve or mark the articles as hidden until administrator review. Admin can any time edit/delete or approve/unapprove articles and editors accounts, and of course the editors will be notified by email about any changes made on them account.

We also have a forum community where you can ask more information about this script, or if you have any issues using our product, just post there, we will be glad to help you.

If you have any questions that are beyond the scope of this help file, please feel free to visit my website ZoneCoders.com or you on my website Forum ZoneCoders.com. Thanks so much!


 

A) Requirements - top

Most current web servers with PHP & MySQL installed will be capable of running our script.

The minimum requirements are:

Your server must support cron job manager also, is used for automation of script and will not working corectly if you don't use it.

Features


B) INSTALLATION - top

Installing z-docu is very simple. The following steps will guide you through the process:

(1) Unzip the contents of the zip file to a folder on your computer

(2) Set write permissions to all folders and subfolders required on step two.

(3) Upload the entire folders to your website, if you experience problems, try uploading in binary mode.

(4) Create your database using your hosting control panel.

(5) Now visit the installation script at http://www.yourdomain.com/install to run the installation wizard - if you get an Ioncube related error message, see the installation Ioncube steps above.

(6) Follow the instructions on screen to install which will involve setting file permissions as listed below, entering your license key and setting up your primary admin account.

(7) When complete, delete the install folder from your web server and CHMOD the includes/configuration.php file back to 644.

If you experience problems installing the software, visit our forum and ask for support.

C) Upgrading - top

Upgrading z-docu is not so dificult but you have to read documentation file before upgrade your software. On your admin panel you have all information about actual version and you will be notified by email when a new version is relased.

What you should do before upgrade:

(1) Backup all your files and folders

(2) Backup your database

(3) Read bacup instruction

(4) Always check if the upgrade is for your version, for eg. if you actual version is 1.2 and is available version 1.3 then is ok. If you version for eg. is 1.2 and the available update is 1.4 then you should first download the version 1.3 , perform the update then download 1.4 and alos perform the updates.

(5) Check if all working well, else please report any bug you found.

D) Configuration - top

Functions

The functions are found in includes/functions.php file. Bellow is a list with available functions:

  • genPass() - generate random passwords
  • prod_seo() - this function will transform the products name in a seo name, for eg. your product name is "My Test product", our function will transform the name into "my-test-product" and can be used on your new links. To call the function, use prod_seo($your_prod_id);
  • art_seo() - transform your article name in seo name, same as func. nr 2
  • cat_seo() - transform your category name in seo name, same as func. nr 2
  • scat_seo() - transform your subcategory name in seo name, same as func. nr 2
  • prod_data() - get any data based on product id from docs_products table, you have to use two variables:
  • -$id

    -$data

    To call the function, use prod_data('1','name'); - where 1 = your product id, where name = row name, so the function will return the result from row name where id = 1.

  • user_data() - get any data from users table based on user id and row name, same as prod_data() function.
  • art_data() - get any data from articles table based on article id and row name, same as prod_data() function.
  • cat_data() - get any data from category table based on category id and row name, same as prod_data() function.
  • scat_data() - get any data from subcategory table based on subcategory id and row name, same as prod_data() function.
  • settings() - get website settings data from settings table, you have to call the funtion settings('label_name') and the function will return the value of row name "value" where label = label_name
  • Create new pages

    Z-Docu allow you create new custom pages very simple. First you have to create a php page on root directory, for eg. mypage.php. Then open templates/your-template/ and create a new file mypage.tpl. Open mypage.php using a text editor like notepad++ and add the following code:

    <?php 
    include('includes/inc.config.php');
    
    $variable = 'Welcome to my test page';
    
    $smarty->assign("variable", $variable); 
    $smarty->display('mypage.tpl');
    ?>
             

    Open templates/your-template/mypage.tpl and add following code:

    {include file="header.tpl"} 
     
     <div id="container"> 
     <div class="row">
    
    <h3>{$variable}</h3>
    
    </div>
    
    </div>
    
    {include file="footer.tpl"} 
    		 

    Now go to http://yoursite.com/mypage.php and you will shuld be able to see your page. For mor tutorials and questions, visit our forum community.

    Working with smarty

    Smarty is a very easy framework and give you the posibility to customize your site in the most simple way. Bellow you have a list with z-docu reserved variables and methods:

    Get any data on your html page using smarty

    For eg. if you want display a user data, you have to use this method: {'docs_editors'|data:'id':$user_id:'username'} - This method return the logged in username.

  • docs_editors = table name
  • data = call smarty modifier data
  • id = search on docs_editors where row id
  • $user_id = search on docs_editors where row id = $user_id (user session id), you can also use static variables as 1,2,etc
  • username = returned data from docs_editors , this can be any row name from docs_editors table.
  • Smarty Reserved Variables
  • $username = the user session username
  • $user_id = the user session user_id
  • $filename = get actual page name
  • $virtualurl = your installation url
  • $templateurl = your default template url
  • $islogged = check if user is logged in, 1 = loggedin, 0 = not loged
  • Php reserved variables
  • $username = the user session username
  • $user_id = the user session user_id
  • $filename = get actual page name
  • $virtualurl = your installation url
  • $templateurl = your default template url
  • $islogged = check if user is logged in, 1 = loggedin, 0 = not loged
  • ROOT_URL = your installation url
  • INCLUDE_PATH = path to include directory
  • FUNCTION_PATH = path to functions directory
  • LIB_PATH = path to lib directory
  • SMARTY_PATH = path to smarty directory


  • E) Integration - top

    Using the same database

    o integrate z-docu on your site, you have to make some small changes. Probably you want use same user table as your existing website, if yes, then follow the steps bellow:

  • (1) Install z-docu on same database as your site, be sure that there is no table name conflict.
  • (2) Open includes/check.login.php file using a text editor such as notepad++
  • (3) You need a basic php knowledge in order to edit this file.
  • Now, find this line:

    $check = $database->execute("SELECT * FROM docs_editors where username = '$username' and status = '1'");
    		

    Modify this line to meet your users table, for example z-docs use docs_editors table, you have to change this name with your users table, of corse you have to change the rows name also, where `username` add your username row name, and so on.

    If you want allow users register direct from z-docu, then you have to change register.php also, else just remove the register.php from your site and all links that point to register page. The accounts will be created from your existing website and users are able to login using their accounts.

    Working with cookie

    Z-Docu use cookie for authentification, this allow your editors to write big articles and to stay logged in for long period of time. However if you want use sessions then you have to modify includes/check.login.php and also check.session.php.

    You need a basic php knowledge in order to modify this files. You can also ask for help on our forum community.


    Once again, thank you so much for purchasing Z-Docu Online Documentation script. As I said at the beginning, I'd be glad to help you if you have any questions relating to this script. No guarantees, but I'll do my best to assist. If you have a more general question relating to this script please visit my website ZoneCoders.com and ask for help on our forum.

    P.S: Sory for my bad English :)

    ZoneCoders

    Go To Table of Contents