PHPackages                             rah/rah\_comments - 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. rah/rah\_comments

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

rah/rah\_comments
=================

Paginated comment list for Textpattern CMS

20PHP

Since Mar 23Pushed 11y ago1 watchersCompare

[ Source](https://github.com/gocom/rah_comments)[ Packagist](https://packagist.org/packages/rah/rah_comments)[ RSS](/packages/rah-rah-comments/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (1)Used By (0)

rah\_comments
=============

[](#rah_comments)

[Download](https://github.com/gocom/rah_comments/releases) | [Packagist](https://packagist.org/packages/rah/rah_comments) | [Issues](https://github.com/gocom/rah_comments/issues) | [Support forum](http://forum.textpattern.com/viewtopic.php?id=26126) | [Donate](http://rahforum.biz/donate/rah_comments)

Rah\_comments lets you to paginate [Textpattern CMS’](http://textpattern.com) [comment lists](http://www.textpattern.net/wiki/index.php?title=comments), splitting the long endless list of comments into multiple pages with fully customisable navigation.

The plugin is a module for [etc\_pagination](https://github.com/bloatware/etc-pagination), extending the core comment system and letting etc\_pagination to work with it. Rah\_comments does the background work such as URL routing and comment calculation, while etc\_pagination takes care of rendering the pagination.

Install
-------

[](#install)

Using [Composer](https://getcomposer.org):

```
$ composer require rah/rah_comments:*
```

Or [download](https://github.com/gocom/rah_comments/releases) a plugin package.

Requirements
------------

[](#requirements)

- Textpattern 4.4.1 or newer.
- [etc\_pagination](https://github.com/bloatware/etc-pagination)
- PHP 5.3.0 or newer.

Basics
------

[](#basics)

Rah\_comments is used together with etc\_pagination to generate pagination for article comments, and comes with few tags that make core comment system and etc\_pagination fully compatible.

All-in-all, rah\_comments takes care of providing etc\_pagination page count it uses to figure out what it needs to render, rewrites and reroutes comment URLs and smoothens the comment submissions process.

Two tags are included; `rah_comments_numpages` – the main that which acts as the etc\_pagination glue and `rah_comment_permlink`, a replacement tag for [comment\_permlink](http://www.textpattern.net/wiki/index.php?title=comment_permlink).

The most basic usage case would involve calculating the number of pages using rah\_comments, passing the value to etc\_pagination and then using the core [comments](http://www.textpattern.net/wiki/index.php?title=comments) tag with a correct `offset` attribute passed to it:

```

```

The above is similar to any etc\_pagination use case, but instead of using it’s `etc_numpages`, we’re using `rah_comments_numpages`.

Tags and attributes
-------------------

[](#tags-and-attributes)

### rah\_comments\_numpages

[](#rah_comments_numpages)

```

```

Calculates and returns the number of comment pages, while doing some necessary background tasks. The number of pages is calculated based on the provided offset and limit attributes, and the resulting value should be passed to etc\_pagination or similar pagination generator.

To the pagination to work properly, the tag needs that two attributes, `limit` and `sort`, are identically mirrored to match the values used in the paginated `comments` tag.

#### Attributes

[](#attributes)

**limit**
Number of comments displayed per page. This value should be identical to the `limit` you are using on the [comments](http://www.textpattern.net/wiki/index.php?title=comments) tag.
Default: `"10"` Example: `limit="5"`

**sort**
Comment sorting criteria. This value should be identical to the `sort` attribute you are using on the [comments](http://www.textpattern.net/wiki/index.php?title=comments) tag, if you are using any.
Default: `"posted asc"` Example: `sort="posted desc"`

**offset**
Number of comments skipped.
Default: `"0"` Example: `offset="5"`

**parameter**
The query string parameter the page number is passed in. This value should be set to match the parameter, `pg_counter`, you are using with `etc_pagination`.
Default: `"pg"` Example: `parameter="pg"`

### rah\_comment\_permlink

[](#rah_comment_permlink)

```

    ...contained statement...

```

Renders comment permlink, used as [comment\_permlink](http://www.textpattern.net/wiki/index.php?title=comment_permlink) tag’s replacement.

#### Attributes

[](#attributes-1)

**anchor**
Whether to apply the comment’s id to the hyperlink tag (as the id attribute), setting this comment permanent link as the comment page anchor.
Default: `"1"` Example: `anchor="0"`

Examples
--------

[](#examples)

### Basic pagination

[](#basic-pagination)

```

```

The above renders 10 comments per page and displays page numbers above the comment list.

### Recent comments

[](#recent-comments)

```

     ()

```

The above renders last 10 comments on the website.

Changelog
---------

[](#changelog)

### Version 0.5.0 – upcoming

[](#version-050--upcoming)

- Rewritten as [etc\_pagination](https://github.com/bloatware/etc-pagination) module.
- Removed: `rah_comments` tag.
- Removed: `rah_recent_comments` tag.
- Added: `rah_comments_numpages` tag.
- Added: `rah_comment_permlink` tag.
- Updated: now shows the correct comment page after new comment submissions.
- Performance optimisations.
- Released as [Composer](http://getcomposer.org) package.

### Version 0.4 – 2008/09/14

[](#version-04--20080914)

- Added `` tag.

### Version 0.3 – 2008/09/03

[](#version-03--20080903)

- Removed attributes: `break_nav` and `break_pages`.
- Fixed messy url mode’s error: now works fully on messy.
- Added attributes: `pg_break`, `pg_break_class`, `prepend` and `append`.
- Now works in article lists, same way like ``.
- Better documentation.

### Version 0.2 – 2008/02/17

[](#version-02--20080217)

- Some minor bug fixes.
- Removed some typos from documentation.

### Version 0.1 – 2008/02/16

[](#version-01--20080216)

- First release.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a34b4e1b662cd2c926e8e89a76f93df266b199fe61508d38026cb952f28e59e?d=identicon)[rah](/maintainers/rah)

### Embed Badge

![Health badge](/badges/rah-rah-comments/health.svg)

```
[![Health](https://phpackages.com/badges/rah-rah-comments/health.svg)](https://phpackages.com/packages/rah-rah-comments)
```

PHPackages © 2026

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