         For other scripts visit http://vanillashare.com


            -------------------------------------
            ALSTRASOFT STARTPAGE ENTERPRISE  v2.0
            -------------------------------------


            -------------------------------------
                   YAGBU | Underground Project
            -------------------------------------

                        www.yagbu.net


1. INSTALLATION
--------------------------------------------------------------

-  Set  correct  database  name, username and password in file 
   conf/config.php at lines:
       DEFINE("_DB_NAME", "");
       DEFINE("_DB_USER", "");
       DEFINE("_DB_PASS", "");
       DEFINE("_DB_HOST", "");

-  Put dump from sql/install.sql into MySQL DB,
   or run install.php

-  Set correct rights to var/ directory to allow PHP read/write 
   files and folders.

-  Use admin username: admin and password: admin to get access 
   in admin zone, and setup default page content for new users 
   in client area.



2. LANGUAGES
--------------------------------------------------------------

   There are /lang folder at site, it contain langs.ini file 
   and  en/de/ru  etc .xml files. To control languages at site 
   you must edit langs.ini, it has very simple format:
   -------------
   [English]
   langid=en
   display=English

   [Russian]
   langid=ru
   display=Russian

   [Deutsch]
   langid=de
   display=Deutsch
   -------------
   Explanation:
   [section name]
   langid = two letters abbreviation for language
   display = language name, that text you will see at bottom 
             links at site

   Also you can use icon for bottom links. Icon file must be 
   named as language abbreviation and has .gif extension.  You 
   can use existing set of flags.
   Icon files placed in static/flags/ folder.

   You can delete language by removing section, or create 
   by adding new section and the corresponding xml file. 
   For the xml files you can edit using any text editor that 
   supports utf-8 encoding.




3. ADDING NEW WIDGETS
--------------------------------------------------------------

-  Create  new folder  in  widgets/ , folder name must be same 
   as widget class name in lower case.
   
-  Copy all widget files to that folder.

-  Edit widgets/widgets.ini file.
   For example if you need to add Calculator widget. So, you must 
   add:

   ------------
   [calculator]
   version=1
   mode=menu
   className=Calculator
   ------------

-  Edit widgets/mainmenu.ini file.
   (Note: symbol "-" maen divider in Main Menu)

-  (if needed) Merge language data for widget with existing 
   languages files (xml in langs/ folder)




3. ADDING NEW THEME
--------------------------------------------------------------

-  Just put new folder in themes/ , and copy theme files in it

   Theme structure:
   ----------------
   images/  - folder that contain all images used in css
   description.tpl  - description of theme in HTML format
   theme.css  - theme css classes declaration
   thumbnail.jpg  - 310x160px theme thumbnail
   ----------------



4. INTERFACES
--------------------------------------------------------------
-  Site  code  has  PHP  handler to combine site with existing 
   users database. Please use PHP Class StartPageInterface for
   adding/deleting/modifing users records.


   Code examples:

   // getting StartPage interface object instance
   $interface = new StartPageInterface;

   // function createUser(string email, string pwd)
   // returning user Id
   $id = $interface->create_user("user@email.com", "123123");

   // function updateUser(int user_id, string email, string pwd)
   // updating email and password for user with Id = user_id 
   $interface->update_user($id, "user1@email.com", "abcabc");

   // function deleteUser(int user_id)
   // deleting user with Id = user_id 
   $interface->delete_user($id);

   // function login(string email, string password)
   // set user state as logged in
   $interface->login("user@email.com", "123123");

   // function logout()
   // set user state as not logged in
   $interface->logout();        
   

   PHP files with working examples:
       demos/users_control.php
       demos/users_login.php