PHPackages                             imponeer/smarty-xo - 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. [Templating &amp; Views](/categories/templating)
4. /
5. imponeer/smarty-xo

ActiveLibrary[Templating &amp; Views](/categories/templating)

imponeer/smarty-xo
==================

Smarty template engine plugins collections based on ideas for plugins from XOOPS

v1.1.8(2y ago)120.6k↓33.3%1[3 issues](https://github.com/imponeer/smarty-xo/issues)[2 PRs](https://github.com/imponeer/smarty-xo/pulls)MITPHPPHP &gt;=7.1CI failing

Since Feb 7Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/imponeer/smarty-xo)[ Packagist](https://packagist.org/packages/imponeer/smarty-xo)[ RSS](/packages/imponeer-smarty-xo/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (1)Versions (13)Used By (0)

[![License](https://camo.githubusercontent.com/71156e02ad7f5fb137506f5c3b8f2304fabf3ea9cd5bc5471745733cb10d6937/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f696d706f6e6565722f736d617274792d786f2e737667)](LICENSE)[![GitHub release](https://camo.githubusercontent.com/a5531a11003469cf4568ffeb336820a510b412ff81736e2029cc7721f0f8109e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f696d706f6e6565722f736d617274792d786f2e737667)](https://github.com/imponeer/smarty-xo/releases) [![Maintainability](https://camo.githubusercontent.com/59628c3fd30fb34c938e9d279714cb69b5fd494addfc929548b3864853ef2a83/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f38653961313537396535363639396539356230352f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/imponeer/smarty-xo/maintainability) [![PHP](https://camo.githubusercontent.com/111d38edf5247dc2a12f41e60e3f680048a34f0b6e8dbd9dd9b7ce2f8651c14a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f696d706f6e6565722f736d617274792d786f2e737667)](http://php.net)[![Packagist](https://camo.githubusercontent.com/d01e8beb72f52da8f445f213c24754fe57fe984e88c4ac851b75429328c9239b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f696d706f6e6565722f736d617274792d786f2e737667)](https://packagist.org/packages/imponeer/smarty-xo)

Smarty XO
=========

[](#smarty-xo)

A rewritten (due to licensing issues) collection of [Smarty](https://smarty.net) plugins that were originally written for [Xoops](https://xoops.org) but can now be used in any project that uses Smarty.

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

[](#installation)

To install and use this package, we recommend to use [Composer](https://getcomposer.org):

```
composer require imponeer/smarty-xo
```

Otherwise, you need to include manually files from `src/` directory.

Registering in Smarty
---------------------

[](#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:

```
$smarty = new \Smarty();
$plugins = [
  new \Imponeer\Smarty\Extensions\XO\XOAppUrlCompiler(
    function (string $url): string { // function that converts url into path
       return $url;
    },
    function (string $url, array $params = []): string { // function that adds params to path
       return $url . '?' . http_build_query($params);
    }
  ),
  new \Imponeer\Smarty\Extensions\XO\XOPageNavFunction(
    function (string $url): string { // function that generates real url
      return $url;
    },
    $strPreviousPage = '',
    $oldSchoolUrlMode = true
  ),
  new \Imponeer\Smarty\Extensions\XO\XOImgUrlCompiler(
     function (string $imgPath): string { // function that makes psiaudo path into real assets path
        return $imgPath;
     }
  ),
  new \Imponeer\Smarty\Extensions\XO\XOInboxCountFunction(
     function (): ?int { // function that calc unread messages in user inbox
       return 0;
     }
  )
];
foreach ($plugins as $plugin) {
  if ($plugin instanceof \Imponeer\Contracts\Smarty\Extension\SmartyFunctionInterface) {
    $type = 'function';
  } else {
    $type = 'compiler';
  }
  $smarty->registerPlugin($type, $plugin->getName(), [$plugin, 'execute']);
}
```

Inspirations list
-----------------

[](#inspirations-list)

This list can be useful for comparing current plugins code with original version to see differences and find some useful data how to use these plugins.

XO Smarty pluginOriginal Plugin (from [Xoops](https://xoops.org))[\\Imponeer\\Smarty\\Extensions\\XO\\XOPageNavFunction](./src/XOPageNavFunction.php)[smarty\_function\_xoPageNav](https://github.com/XOOPS/XoopsCore25/blob/v2.5.8/htdocs/class/smarty/xoops_plugins/function.xoPageNav.php)[\\Imponeer\\Smarty\\Extensions\\XO\\XOAppUrlCompiler](./src/XOAppUrlCompiler.php)[smarty\_compiler\_xoAppUrl](https://github.com/XOOPS/XoopsCore25/blob/v2.5.8/htdocs/class/smarty/xoops_plugins/compiler.xoAppUrl.php)[\\Imponeer\\Smarty\\Extensions\\XO\\XOImgUrlCompiler](./src/XOImgUrlCompiler.php)[smarty\_compiler\_xoImgUrl](https://github.com/XOOPS/XoopsCore25/blob/v2.5.8/htdocs/class/smarty/xoops_plugins/compiler.xoImgUrl.php)[\\Imponeer\\Smarty\\Extensions\\XO\\XOInboxCountFunction](./src/XOInboxCountFunction.php)[smarty\_function\_xoInboxCount](https://github.com/XOOPS/XoopsCore25/blob/v2.5.8/htdocs/class/smarty/xoops_plugins/function.xoInboxCount.php)Development
-----------

[](#development)

Static analysis is configured with [PHPStan](https://phpstan.org/):

```
composer install
composer phpstan
```

How to contribute?
------------------

[](#how-to-contribute)

Contributions are welcome:

1. Fork the repository and create a feature branch.
2. Install dependencies with `composer install`.
3. If you add functionality, include or update tests when available and run `composer validate` to ensure the package metadata stays valid.
4. Open a pull request describing the change and why it helps.

If you find a bug or have a question, please open an issue in the [issues tab](https://github.com/imponeer/smarty-xo/issues).

###  Health Score

38

—

LowBetter than 84% of packages

Maintenance44

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~97 days

Recently: every ~68 days

Total

10

Last Release

1043d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dba53e399a507d1f60626164c8b1e340a5cc0dc4f0637f4c6aaff8fc239fdaee?d=identicon)[fiammybe](/maintainers/fiammybe)

![](https://www.gravatar.com/avatar/7255f306e0ca27292c50cdd9644c1c04e0d7b0f54bf35e0cdd79dc55c83b4923?d=identicon)[MekDrop](/maintainers/MekDrop)

![](https://www.gravatar.com/avatar/79009323fafcd4974bb1713b12eea0a610f01c4fb21cc5e85d446c4cb66453d4?d=identicon)[skenow](/maintainers/skenow)

---

Top Contributors

[![MekDrop](https://avatars.githubusercontent.com/u/342641?v=4)](https://github.com/MekDrop "MekDrop (37 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (20 commits)")[![Codex](https://avatars.githubusercontent.com/in/2248422?v=4)](https://github.com/Codex "Codex (8 commits)")[![fiammybe](https://avatars.githubusercontent.com/u/3736946?v=4)](https://github.com/fiammybe "fiammybe (2 commits)")[![mend-bolt-for-github[bot]](https://avatars.githubusercontent.com/in/16809?v=4)](https://github.com/mend-bolt-for-github[bot] "mend-bolt-for-github[bot] (1 commits)")

---

Tags

hacktoberfestlinkspaginationsmartysmarty-pluginsxoopspaginationcountersmartylinksxoopssmarty-plugins

### Embed Badge

![Health badge](/badges/imponeer-smarty-xo/health.svg)

```
[![Health](https://phpackages.com/badges/imponeer-smarty-xo/health.svg)](https://phpackages.com/packages/imponeer-smarty-xo)
```

###  Alternatives

[knplabs/knp-paginator-bundle

Paginator bundle for Symfony to automate pagination and simplify sorting and other features

1.8k42.8M314](/packages/knplabs-knp-paginator-bundle)[ytake/laravel-smarty

Smarty template engine for Laravel and Lumen

87401.6k](/packages/ytake-laravel-smarty)[noiselabs/smarty-bundle

This Symfony bundle provides integration for the Smarty3 template engine.

53194.4k1](/packages/noiselabs-smarty-bundle)[text/template

Simple and secure string-template-engine (Twig-like syntax) with nested if/elseif/else, loops, filters. Simple OOP api: Just one class doing the job (2-lines of code). Fast and secure: No code-generation, no eval'ed() code. Extensible by callbacks. Fully tested. Rich examples included.

38201.1k10](/packages/text-template)[styde/blade-pagination

Laravel's pagination with Blade templating support

7214.1k](/packages/styde-blade-pagination)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
