PHPackages                             jelix/jtags-module - 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. [Admin Panels](/categories/admin)
4. /
5. jelix/jtags-module

ActiveJelix-module[Admin Panels](/categories/admin)

jelix/jtags-module
==================

Module for Jelix allowing to manage tags on records/objects

v1.1.0(3y ago)056LGPL-2.1-onlyPHPPHP &gt;=7.4

Since Aug 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/jelix/jtags-module)[ Packagist](https://packagist.org/packages/jelix/jtags-module)[ RSS](/packages/jelix-jtags-module/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (4)Used By (0)

jTags module
============

[](#jtags-module)

This is a module for Jelix, allowing to manage tags on records/objects.

This module is for Jelix 1.7.2 and higher.

It was originally developed into the [Booster project](https://github.com/jelix/booster/)and the [Havefnubb project](https://github.com/havefnubb/havefnubb/).

Setting up the module
=====================

[](#setting-up-the-module)

The best method is to use Composer.

In a commande line inside your project, execute:

```
composer require "jelix/jtags-module"

```

Launch the configurator for your application to enable the module

```
php dev.php module:configure jtags
```

After configuring the module, you should launch the installer of your application to activate the module:

```
php install/installer.php
```

How to use it
=============

[](#how-to-use-it)

All tags are stored into a table. An other table contains the association between a tag, a scope and an id.

A scope is the type of records (a table name for example), or a domain. An id is the id of a record inside the scope.

When you store some tags for an object, you give a scope and the id of the object.

For example, for news posts, the scope may be `news`, and the id, the id of a news.

Editing tags within a form
--------------------------

[](#editing-tags-within-a-form)

Add in your jforms:

```

    Type your tags

```

When initializing the form, retrieve the list of tags and set it to the input:

```
$form = jForms::create('news', $id_news);

// ...

$srvTags = jClasses::getService("jtags~tags");
$tags = implode(',', $srvTags->getTagsBySubject('news', $id_news));
$form->setData('tags', $tags);
```

If you want autocompletion, add the class on the widget, into your template:

```
{ctrl_control 'tags', ["class"=>"jtags-autocomplete"]}

```

And call `setResponseHeaders()` into your controller:

```
$resp = $this->getResponse('html');
//...
jClasses::getService("jtags~tags")->setResponsesHeaders($resp);
```

Saving tags after submitting a form
-----------------------------------

[](#saving-tags-after-submitting-a-form)

In the action of submit, retrieve the list of tags, and call `saveTagsBySubject()`

```
$id_news = $this->param('id_news');
$form = jForms::fill('news', $id_news);

// ...

$srvTags = jClasses::getService("jtags~tags");
$tags = explode(',', $form->getData('tags'));

$srvTags->saveTagsBySubject($tags, 'news', $id_news));
```

Displaying the list of tags
---------------------------

[](#displaying-the-list-of-tags)

to display the list of tags of a record, call `getTagsBySubject`

```
$srvTags = jClasses::getService("jtags~tags");
$tags = implode(', ', $srvTags->getTagsBySubject('news', $id_news));

$tpl->assign('tags', $tags);
```

Displaying tags cloud
---------------------

[](#displaying-tags-cloud)

There is a zone to display a tags cloud.

Into your controller:

```
$tpl->assignZone("tagscloud", "jtags~tagscloud", array('destination'=>'module~ctrl:method', 'maxcount'=>30));
```

or in a template

```
{zone "jtags~tagscloud", array('destination'=>'module~ctrl:method', 'maxcount'=>20)}

```

- `destination` : the action which will display objects corresponding to a tag. it receive a "tag" parameter.
- `maxcount` : displays only the given number of tags. Set it to 0 or don't set this parameter to displays all tags.

Getting all objects marked with tags
------------------------------------

[](#getting-all-objects-marked-with-tags)

```
$tag = $this->param("tag", false);
if ($tag) {
    $srv_tags = jClasses::getService("jtags~tags");
    $listOfNewsId = $srv_tags->getSubjectsByTags($tag, "news"));
}
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~245 days

Total

3

Last Release

1287d ago

Major Versions

v0.2.0 → v1.0.02021-08-20

PHP version history (2 changes)v0.2.0PHP &gt;=5.6

v1.1.0PHP &gt;=7.4

### Community

Maintainers

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

---

Top Contributors

[![laurentj](https://avatars.githubusercontent.com/u/336034?v=4)](https://github.com/laurentj "laurentj (6 commits)")

---

Tags

moduleUsersadminjelixstatistics

### Embed Badge

![Health badge](/badges/jelix-jtags-module/health.svg)

```
[![Health](https://phpackages.com/badges/jelix-jtags-module/health.svg)](https://phpackages.com/packages/jelix-jtags-module)
```

###  Alternatives

[luyadev/luya-module-admin

Administration core module for all LUYA admin modules

48182.7k24](/packages/luyadev-luya-module-admin)[avatar4eg/flarum-ext-users-list

Add users list in admin panel.

125.7k](/packages/avatar4eg-flarum-ext-users-list)

PHPackages © 2026

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