{"id":22136177,"url":"https://github.com/qcubed/plugin_bootstrap","last_synced_at":"2025-07-25T20:32:34.254Z","repository":{"id":26963323,"uuid":"30426540","full_name":"qcubed/plugin_bootstrap","owner":"qcubed","description":"QCubed plugin to simplify the integration of Twitter Bootstrap","archived":false,"fork":false,"pushed_at":"2017-03-26T07:53:46.000Z","size":129,"stargazers_count":2,"open_issues_count":4,"forks_count":5,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-11-24T11:43:34.929Z","etag":null,"topics":["bootstrap"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qcubed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-06T18:24:43.000Z","updated_at":"2017-08-01T04:27:13.000Z","dependencies_parsed_at":"2022-08-24T05:00:19.140Z","dependency_job_id":null,"html_url":"https://github.com/qcubed/plugin_bootstrap","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qcubed%2Fplugin_bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qcubed%2Fplugin_bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qcubed%2Fplugin_bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qcubed%2Fplugin_bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qcubed","download_url":"https://codeload.github.com/qcubed/plugin_bootstrap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227615080,"owners_count":17794020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap"],"created_at":"2024-12-01T19:20:01.501Z","updated_at":"2025-07-25T20:32:34.243Z","avatar_url":"https://github.com/qcubed.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# QCubed Bootstrap Plugin\nQCubed plugin to simplify the integration of Twitter Bootstrap\n\n## Installation\n1) Install both the plugin and twitter bootstrap using Composer. Execute the following on the command line from your main\ninstall directory:\n```\n\tcomposer require qcubed/plugin_bootstrap\n\tcomposer require twbs/bootstrap\n```    \n2) Next, you might want to set up some configuration settings in your configuration.inc.php file.\n\n### __BOOTSTRAP_CSS__\nThe default setting for this file is:\n```\n\tdefine ('__BOOTSTRAP_CSS__', __VENDOR_ASSETS__. '/twbs/bootstrap/dist/css/bootstrap.min.css');\n```\nIf you are compiling your own custom version of the bootstrap css file, simply set that define to point to your own version.\n\n3) Point the base class to Bootstrap classes so that they add their functionality.\n\nIn your project/includes/controls/QControl.class.php file, have your QControl inherit from the base class. For example,\nyou should change the first line to:\n\n```\nabstract class QControl extends QCubed\\Plugin\\Bootstrap\\Control {\n```\n\n### __BOOTSTRAP_JS__\nThe default mechanism included in this plugin only loads the bootstrap.js file on forms using the plugin widgets that\nneed it. If you are hand-coding some bootstrap forms that also need bootstrap.js, you should do both of the following to avoid\nmultiple bootstrap.js files being loaded:\n\n1) Define __BOOTSTRAP_JS__ in your configuration.inc.php file and point it to your desired bootstrap js file as so:\n```\n\tdefine ('__BOOTSTRAP_JS__', __VENDOR_ASSETS__ . '/twbs/bootstrap/dist/js/bootstrap.js'); (or bootstrap.min.js if you prefer)\n```\n2) Either add this file to your footer.inc.php file like this:\n```\n\t\u003cscript type=\"text/javascript\" src=\"\u003c?php echo(__BOOTSTRAP_JS__); ?\u003e\"\u003e\u003c/script\u003e\n```\nor add it to the list of auto-loaded javascript forms in your QForm.class.php file like this:\n```\n\tprotected function GetFormJavaScripts() {\n\t\t$scripts = parent::GetFormJavaScripts();\n\t\t$scripts[] = __BOOTSTRAP_JS__;\n\t\treturn $scripts;\n\t}\n\n```\n\n## Usage\n\nSee the examples pages for details. The main functionality includes:\n\n1. Using **RenderFormGroup** instead of RenderWithName to draw form objects in the Bootstrap way. The Bootstrap Control\nclass exposes a number of utility classes to add Bootstrap class to the object, the label, the wrapper, and even\nsome internal wrappers in special situations.\n\n2. Specific Bootstrap type QControls to draw particular things on the screen. Examples include:\n * Carousel\n * Navbar\n * Menu button\n * Alert\n * Accordion\n\n3. Extensions of base QCubed controls with additional Bootstrap functionality. Includes:\n * Checkbox to draw checkboxes the bootstrap way with the label wrapping the checkbox\n * TextBox to add the ability to draw it as an inline-group with another object\n\n4. Defines that give you easy access to all the various Bootstrap class names via PHP constants. Those are located\nin the Bootstrap.php file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqcubed%2Fplugin_bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqcubed%2Fplugin_bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqcubed%2Fplugin_bootstrap/lists"}