Giter Club home page Giter Club logo

bootstrapsmarty's Introduction

BootstrapSmarty

Latest Version Scrutinizer Code Quality

A wrapper for Smarty to set (and maintain) defaults within a Bootstrap UI environment

Install

Because this makes use of front-end files managed via Bower, as well as the back-end managed by Composer, it is really, really, super-helpful to run the following command before trying to work with this package:

composer global require "fxp/composer-asset-plugin:^1.1"

Find out more about fxp/composer-asset-plugin and Bower.

And then, include in composer.json:

"require": {
  "battis/bootstrapsmarty": "~1.0"
}

Use

If you have no templates of your own:

use Battis\BootstrapSmarty\BootstrapSmarty;
$smarty = BootstrapSmarty::getSmarty();

// ...app logic...

$smarty->assign('content', '<p>whatever content you want displayed</p>');
$smarty->display();

If you have your own templates directory:

$smarty->addTemplateDir('path/to/your/templates_dir');

If you have your own stylesheet:

$smarty->addStylesheet('path/to/your/stylesheet.css');

Complete API documentation is included in the repo and the Smarty API documentation is also online.

bootstrapsmarty's People

Contributors

battis avatar scrutinizer-auto-fixer avatar

Watchers

 avatar  avatar  avatar  avatar

bootstrapsmarty's Issues

Datatables

This wouldn't just replace MODULE_SORTABLE, it would put it on steroids.

Autogenerate title

At least autogenerate it for the subpage.tpl template to match the autogenerated page title.

Creating 1 directories

Not quite sure where this bug is -- could be in a number of projects, but this is the one that threw the original exception:

[Mon Apr 04 08:27:59.141285 2016] [:error] [pid 32124] [client 104.129.82.2:51977] PHP Fatal error: Uncaught exception 'Battis\BootstrapSmarty\BootstrapSmarty_Exception' with message 'The directory '/var/www/skunkworks.stmarksschool.org/canvas/lti/canvashack/hacks/templates/1/' was created (should have already existed and been populated)' in /var/www/skunkworks.stmarksschool.org/canvas/lti/canvashack/vendor/battis/bootstrapsmarty/src/BootstrapSmarty.php:156\nStack trace:\n#0 /var/www/skunkworks.stmarksschool.org/canvas/lti/canvashack/vendor/battis/bootstrapsmarty/src/BootstrapSmarty.php(270): Battis\BootstrapSmarty\BootstrapSmarty::testReadableDirectory('/var/www/skunkw...')\n#1 /var/www/skunkworks.stmarksschool.org/canvas/lti/canvashack/vendor/smtech/stmarkssmarty/src/StMarksSmarty.php(28): Battis\BootstrapSmarty\BootstrapSmarty->__construct(true, '/var/www/skunkw...', NULL, NULL)\n#2 /var/www/skunkworks.stmarksschool.org/canvas/lti/canvashack/vendor/smtech/stmarkssmarty/src/StMarksSmarty.php(22): smtech\StMarksSmarty\StMarksSmarty->__construct(true, '/var/www/skunkw...', NULL, NULL)\n#3 /var/www/skunkworks.stm in /var/www/skunkworks.stmarksschool.org/canvas/lti/canvashack/vendor/battis/bootstrapsmarty/src/BootstrapSmarty.php on line 156, referer: https://stmarksschool.instructure.com/courses/97

This occurred on a fresh load of Composer packages to the server, happened the first time each directory was accessed, but not again afterwards, and the 1 directories were, indeed, created.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.