
Sticklr PHP is a PHP script which provides an easy way to generate sticky side panel navigation menu in server-side from various sources of formats: PHP, JSON, or MySQL database table.
Requirements:- PHP5
- jQuery
- Sticklr jQuery plugin
<?php
// import Sticklr classes
require_once('Sticklr.php');
// instantiate new Sticklr object
$sticklr = new Sticklr();
// Option 1: import data from MySQL
$sticklr->importMySQL($mysql_host, $mysql_user, $mysql_pass, $db_name, $table_name)
// Option 2: import data from JSON text/file
$sticklr->importJSON($json);
// Option 3: PHP way
$sticklr
->addMenu((new SticklrMenu('Label', '#', 'tag'))
->addMenuItem(new SticklrMenuItem('title', '#', '', 'Title'))
->addMenuItem(new SticklrMenuItem('link', 'http://fb.com', 'fb', 'FB'))
->addMenuItem())
->addMenu((new SticklrMenu())->addMenuItem())
->setOption('panelSize', 32);
// Finally: draw as HTML
$sticklr->writeHTML();
?>
No comments:
Post a Comment