Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imponeer/smarty-includeq
Rewritten @smarty-php include variant that was invented for use in @XOOPS, but nowadays is used in some other PHP based CMS'es
https://github.com/imponeer/smarty-includeq
composer-library hacktoberfest include smarty smarty-plugins
Last synced: about 2 months ago
JSON representation
Rewritten @smarty-php include variant that was invented for use in @XOOPS, but nowadays is used in some other PHP based CMS'es
- Host: GitHub
- URL: https://github.com/imponeer/smarty-includeq
- Owner: imponeer
- License: mit
- Created: 2021-02-03T08:50:00.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-08-01T16:48:29.000Z (5 months ago)
- Last Synced: 2024-10-01T22:08:45.023Z (3 months ago)
- Topics: composer-library, hacktoberfest, include, smarty, smarty-plugins
- Language: PHP
- Homepage:
- Size: 59.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![License](https://img.shields.io/github/license/imponeer/smarty-includeq.svg)](LICENSE)
[![GitHub release](https://img.shields.io/github/release/imponeer/smarty-includeq.svg)](https://github.com/imponeer/smarty-includeq/releases) [![Maintainability](https://api.codeclimate.com/v1/badges/a231cf43fba22907f5a3/maintainability)](https://codeclimate.com/github/imponeer/smarty-includeq/maintainability) [![PHP](https://img.shields.io/packagist/php-v/imponeer/smarty-includeq.svg)](http://php.net)
[![Packagist](https://img.shields.io/packagist/dm/imponeer/smarty-includeq.svg)](https://packagist.org/packages/imponeer/smarty-includeq)# Smarty IncludeQ
Rewritten (due that original use GPLv2+ license) [Smarty](https://smarty.net) '[include](https://www.smarty.net/docsv2/en/language.function.include.tpl)' variant that was invented for use in [XOOPS](https://xoops.org), but nowadays used in some other PHP based CMS'es (like [ImpressCMS](https://impresscms.org)!).
See, [original version of this smarty plugin in Xoops](https://github.com/XOOPS/XoopsCore25/blob/v2.5.8/htdocs/class/smarty/xoops_plugins/compiler.includeq.php) to see more accurate description why this plugin exists.
## Installation
To install and use this package, we recommend to use [Composer](https://getcomposer.org):
```bash
composer require imponeer/smarty-includeq
```Otherwise, you need to include manually files from `src/` directory.
## Registering in Smarty
If you want to use these extensions from this package in your project you need register them with [`registerPlugin` function](https://www.smarty.net/docs/en/api.register.plugin.tpl) from [Smarty](https://www.smarty.net). For example:
```php
$smarty = new \Smarty();
$includeqPlugin = new \Imponeer\Smarty\Extensions\IncludeQ\IncludeQCompiler();
$smarty->registerPlugin('compiler', $includeqPlugin->getName(), [$includeqPlugin, 'execute']);
```## Using from templates
Example how to use it:
```smarty
{includeq file="file.tpl"}
```
## How to contribute?If you want to add some functionality or fix bugs, you can fork, change and create pull request. If you not sure how this works, try [interactive GitHub tutorial](https://skills.github.com).
If you found any bug or have some questions, use [issues tab](https://github.com/imponeer/smarty-includeq/issues) and write there your questions.