Charisma – free, responsive, multiple skin admin template

Charisma is a full featured, free, premium quality, responsive, HTML5 admin template (or backend template) based on Bootstrap 3 from Twitter, it comes with 9 different themes to suit your style and application type.

Charisma helps you minimize the repeat work you have to do on you projects. You can re-use Charisma as a base or as a package for your admin panel. It’s free for personal and commercial use and you can use it in multiple sites.

I have put a lot of effort on this, I just expect a share on Twitter or Facebook from you as a “Thank you!”.

Charisma free, premium quality, responsive, multiple skin admin template.

View Live Demo

View on GitHub

Download

If you’re a PHP dev then you may like my projects Pixie Database Query Builder and Strana Pagination Library.

An alternative Download Link (if the Download button doesn’t work).

It is featured with many plugins and UI elements to ease your work. It works on all major browsers and optimizes itself for tablets and mobile phones. Above all it’s 100% FREE and open source. It is licensed under Apache License v2.0, respective licenses apply to all resources used. Issues and pull requests on GitHub are always welcome.

Features

  • 9 different themes
  • Fully responsive, optimized UI for tablets and mobile phones, see how it looks on different devices.
  • Based on Bootstrap 3.
  • Grandmother friendly, works on IE9+.
  • Commented code.
  • Custom product tour, see example.
  • Grid system, see example.
  • Charts, including, pie, stack, flot, realtime etc.
  • Data tables.
  • Widget boxes, collapsible, sortable, closable, see example.
  • Photo gallery, see example
  • Ajaxified menus.
  • Full calendar, monthly weekly, daily, with todo list.
  • Custom error page.
  • Auto active link detection and much more.

UI Elements

  • Custom Tooltip
  • Popover
  • Star Rating
  • Toggle Switch
  • Tag Boxes
  • Multiple File Upload
  • Dialog Box
  • Auto Growing Textarea
  • Ajax Loaders
  • Progress Bars
  • Alerts
  • Pop Notifications
  • Animations

Enjoy 🙂

Strana – Smart Pagination Library for PHP

A framework agnostic, smart pagination library for PHP. Just a few lines of code and fully functional pagination is ready.

Paginate your records with Strana. Strana will slice(limit and offset) these records, generate pagination links for you and reads page number from them, all automatically.

Features:

  • Built-in adapters for DoctrineEloquent (Laravel)Pixie, PHP Array and you can do it manually.
  • Readable syntax
  • Add Infinite Scroll with one line
  • It automatically detects which DBAL you are using.
  • Styles automatically with Twitter Bootstrap, Zurb Foundation and most of other CSS frameworks.

Check out the installation instructions and documentation on GitHub.

Install or View on GitHub

Screenshot:

Screenshot

Example

Basically Strana makes it very easy, like the code below:

$paginator = $strana->perPage(10)->make($records);

That’s basically it.

Full Usage Example

// Make sure you have Composer's autoload file included
require 'vendor/autoload.php';

$strana = new \Strana\Paginator();
$records = array(1, 2, 3, .... 100);
$paginator = $strana->perPage(10)->make($records);

// Loop paginated items
foreach ($paginator as $item) {
    echo $item['field_name'] . '<br>';
}

// Print pagination links
echo '<br><br>;' . $paginator;

There are some advanced options which are documented below. Sold? Lets install.

Pixie – A Database Query Builder for PHP

It took me few weeks to build Pixie, a lightweight, expressive, framework agnostic query builder for PHP, it can also be referred as a Database Abstraction Layer. Pixie supports MySQL, SQLite and PostgreSQL and it takes care of query sanitization, table prefixing and many other things with a unified API. At least PHP 5.3 is required.

It has some advanced features like:

  • Query Events
  • Nested Criteria
  • Sub Queries
  • Nested Queries
  • Multiple Database Connections.

Check out the installation instructions and documentation on GitHub.

Install or View on GitHub

Example

// Make sure you have Composer's autoload file included
require 'vendor/autoload.php';

// Create a connection, once only.
$config = array(
            'driver'    => 'mysql', // Db driver
            'host'      => 'localhost',
            'database'  => 'your-database',
            'username'  => 'root',
            'password'  => 'your-password',
            'charset'   => 'utf8', // Optional
            'collation' => 'utf8_unicode_ci', // Optional
            'prefix'    => 'cb_', // Table prefix, optional
        );

new \Pixie\Connection('mysql', $config, 'QB');

Simple Query:

The query below returns the row where id = 3, null if no rows.

$row = QB::table('my_table')->find(3);

Full Queries:

$query = QB::table('my_table')->where('name', '=', 'Sana');

// Get result
$query->get();

Query Events:

After the code below, every time a select query occurs on users table, it will add this where criteria, so banned users don’t get access.

QB::registerEvent('before-select', 'users', function($qb)
{
    $qb->where('status', '!=', 'banned');
});

There are many advanced features which are documented on GitHub project page. Sold? Lets install.

GetSetGo – Dynamic Setter Getter Library for PHP

Build Status

GetSetGo is a dynamic setter-getter library for PHP 5.4+. Its developed by me and Sheikh Heera, and yes, its well unit tested.

You can use methods like setFoo('bar') and getFoo(), which you DON’T have to create (in your class). GetSetGo will make these methods work for you automatically as long as you have a $foo property in your class.

It makes use of Traits, so using it is super simple, you don’t have to extend any class, as you can extend a single class only, we don’t force you to use ours.
You can restrict to only getter only or you can specify a Type for property using annotations.

View on GitHubPackagist

Installation

GetSetGo uses Composer to make hassles Go.

Learn to use composer and add this to require (in your composer.json):

[code]
"usmanhalalit/get-set-go": "1.*@dev"
[/code]

Usage

Just add this in your classes:

use \GetSetGo\SetterGetter;

Example:

Class MyClass{
    use \GetSetGo\SetterGetter;

    protected $foo;
}

Now use it as
$myClass = new MyClass;

$myClass->setFoo('bar');
echo $myClass->getFoo();

That’s basically it.

Restrict Getter or Setter or Both

You can use annotation in you class property if you want to disable setter, getter or both using @setter and @getter annotation variables.

/**
 * We can't use setSomeProperty() anymore.
 *
 * @var
 * @setter false
 */
protected $someProperty;


/**
 * We can't use getSomeProperty() anymore.
 *
 * @var \stdClass
 * @getter false
 */
protected $someProperty;


/**
 * We can't use setSomeProperty() or getSomeProperty().
 *
 * @getter false
 * @setter false
 */
protected $someProperty;

Force a Type or Class

You can specify a type for the property using @var annotation variable, so setter will take only a value of this type, else it will throw an exception. The code below will work similar as public function setSomeProperty(stdClass $value){}

/**
 * Should be an instance of stdClass only.
 *
 * @var \stdClass
 */
protected $shouldBeStdClass;


/**
 * Should be an array only.
 *
 * @var Array
 */
protected $shouldBeArray;


/**
 * Should be a string only
 *
 * @var String
 */
protected $shouldBeString;


/**
 * Should be a number only.
 *
 * @var Number
 */
protected $shouldBeNumber;


/**
 * Should be an object only.
 *
 * @var Object
 */
protected $shouldBeObject;

Notes

GetSetGo assumes that you use proper camelCase. So name your properties like $pdoInstance (not $PDOInstance) and call setPdoInstance() method.