PHPackages                             qcubed/plugin\_bootstrap - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. qcubed/plugin\_bootstrap

ActiveQcubed-plugin[Utility &amp; Helpers](/categories/utility)

qcubed/plugin\_bootstrap
========================

QCubed wrappers for Twitter Bootstrap.

v1.0.2(10y ago)21735[3 issues](https://github.com/qcubed/plugin_bootstrap/issues)[1 PRs](https://github.com/qcubed/plugin_bootstrap/pulls)MITPHPPHP &gt;=5.4

Since Feb 16Pushed 9y ago9 watchersCompare

[ Source](https://github.com/qcubed/plugin_bootstrap)[ Packagist](https://packagist.org/packages/qcubed/plugin_bootstrap)[ RSS](/packages/qcubed-plugin-bootstrap/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)DependenciesVersions (5)Used By (0)

QCubed Bootstrap Plugin
=======================

[](#qcubed-bootstrap-plugin)

QCubed plugin to simplify the integration of Twitter Bootstrap

Installation
------------

[](#installation)

1. Install both the plugin and twitter bootstrap using Composer. Execute the following on the command line from your main install directory:

```
	composer require qcubed/plugin_bootstrap
	composer require twbs/bootstrap

```

2. Next, you might want to set up some configuration settings in your configuration.inc.php file.

### **BOOTSTRAP\_CSS**

[](#bootstrap_css)

The default setting for this file is:

```
	define ('__BOOTSTRAP_CSS__', __VENDOR_ASSETS__. '/twbs/bootstrap/dist/css/bootstrap.min.css');

```

If you are compiling your own custom version of the bootstrap css file, simply set that define to point to your own version.

3. Point the base class to Bootstrap classes so that they add their functionality.

In your project/includes/controls/QControl.class.php file, have your QControl inherit from the base class. For example, you should change the first line to:

```
abstract class QControl extends QCubed\Plugin\Bootstrap\Control {

```

### **BOOTSTRAP\_JS**

[](#bootstrap_js)

The default mechanism included in this plugin only loads the bootstrap.js file on forms using the plugin widgets that need it. If you are hand-coding some bootstrap forms that also need bootstrap.js, you should do both of the following to avoid multiple bootstrap.js files being loaded:

1. Define **BOOTSTRAP\_JS** in your configuration.inc.php file and point it to your desired bootstrap js file as so:

```
	define ('__BOOTSTRAP_JS__', __VENDOR_ASSETS__ . '/twbs/bootstrap/dist/js/bootstrap.js'); (or bootstrap.min.js if you prefer)

```

2. Either add this file to your footer.inc.php file like this:

```
