API usage
How it works
Installation
Copy files in your web root and change config file by changing API_KEY and other stuff as you need. Done
Common files
Javascript must be in /js folder. If you write your own scripts, put them in /js/custom.js - functions in end of file, procedures in customJs() function - that function is played every time page loads, window resizes and ajax load new content to #a4u-content div
PHP functions please include in /a4u/custom.php - it will be loaded each script run
Design default file stay in /style/general.php, but in config file you can change default file from general to another. Also in every module you can set $TEMPLATE to another.
CSS files best place is /style folder, keep it there
Images for design perfectly fit in /style/images folder and it's subfolders.
User uploaded images and other, non-image files :- good place for them is /files folder
Plugins - /plugins folder must contain folder with all plugin data - load.php, module.php etc
!!! plugins in general.php file loads by plugin(pluginName) - it loads plugins's load.php or by requiring page site/en/pluginName - it load plugin by module.php
Tags
N.B! Usable also in admin panel richtext and text fields
[ 4t.phrase] - text with phrase translation
[ 4l.toPage] - link to internal page
[ 4l.current] - current link
[ 4@.email] - prevent email from spam, by hiding it from crawlers
Functions
scb('module') - get module element;
scbA('module') - get module array
scbSet('link', array('option'=>'data')) - rewrite data in next requests
scbTitle(title) - set page title prefix, mostly used with webPage/content subject
debug(var) - debug variable, if DEBUG is started
d(var) - debug variable anyway
Usage tips
Debugging
To enable debugging mode :: in url add DEBUG=yourpassword param. Password is in config file
To disable debugging mode :: in url add DEBUG=stop param. Also first debugging line have link to this
Links
To disable automatic a4u ajax loader (loads data to #a4u-content div), just add onclick="return true" param to <a> element
Modules
webPage/languages - get webPage languages
options: -
webPage/content - content from webpage admin
options: ID, tag, template
webPage/contents - contents from webpage admin
options: ID, tag, template
webPage/pageMenu - content from menu
options: type
webPage/SEO - content from admin languages - title, keywords, description
options: link
webPage/anonimGuestbook/list - get guestbook data
options: -
webPage/anonimGuestbook/add - add entry to guestbook
options: nick, email, IP, text
fileHosting/folders - folders in folder from files
options: folder
fileHosting/files - files in folder from files
options: folder
warehouse/categories - get categories from warehouse, by setting parent 0 get root caterories
options: parent
warehouse/items - get products from category
options: category
warehouse/item - item data from warehouse
options: ID
warehouse/items/options - item option data from warehouse nr->{option->option,value->value}
options: ID
warehouse/items/options2 - item option data from warehouse in format opt->value
options: ID
warehouse/orders/new
options: client, email, zip, adress, adress2, paymentType, item[1][nr][ID], item[1][nr][count]
carRental/carsToRent - get list of cars to rent in period of time, with precalculated prices, including offers
options: from, till, type, ID (model id), all (also without images), order=price (default order is by position param in system), anyState ( also booked )
carRental/carList - get complete list of cars
options: type
type: lightAndBus, plus
carRental/carList/checkAvailability - check model availability in period of time. returns rezervation with ID, if not available, returns nothing, if available
options: model (ID), from, till
carRental/carList/carData - get car data
options: carID, carmID, model
carRental/shedule/save - make reservation in schedule
options: from, till, phone, price, priceIsFull, place_from, place_to, carID, client, comment, plus[name]=price
FirstData payment
N.B! dont forget to ask us for your teamName, othervise payment will not be processed!
N.B! will be simplified in next a4u versions
create POST form to http://schedulebull.com/firstData/?action=startsmstrans&m=teamName
with inputs:
post_amount - cents
post_currency - 978 (EUR)
post_ip - _SERVER['REMOTE_ADDR'];
post_description - ID of warehouse or car rental rezervation (got in save module)
post_language - $_SESSION['language'];