{"id":21840193,"url":"https://github.com/gocom/rah_comments","last_synced_at":"2025-03-21T15:33:51.117Z","repository":{"id":29156606,"uuid":"32686928","full_name":"gocom/rah_comments","owner":"gocom","description":"Paginated article comments list for Textpattern CMS","archived":false,"fork":false,"pushed_at":"2015-03-23T12:42:54.000Z","size":156,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-26T11:08:22.434Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gocom.png","metadata":{"files":{"readme":"README.textile","changelog":null,"contributing":"CONTRIBUTING.textile","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-22T17:38:52.000Z","updated_at":"2015-03-23T12:42:54.000Z","dependencies_parsed_at":"2022-08-02T21:34:13.501Z","dependency_job_id":null,"html_url":"https://github.com/gocom/rah_comments","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocom%2Frah_comments","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocom%2Frah_comments/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocom%2Frah_comments/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocom%2Frah_comments/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gocom","download_url":"https://codeload.github.com/gocom/rah_comments/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244822856,"owners_count":20516179,"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":[],"created_at":"2024-11-27T21:25:07.007Z","updated_at":"2025-03-21T15:33:51.095Z","avatar_url":"https://github.com/gocom.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"h1. rah_comments\n\n\"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\n\nRah_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.\n\nThe 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.\n\nh2. Install\n\nUsing \"Composer\":https://getcomposer.org:\n\nbc. $ composer require rah/rah_comments:*\n\nOr \"download\":https://github.com/gocom/rah_comments/releases a plugin package.\n\nh2. Requirements\n\n* Textpattern 4.4.1 or newer.\n* \"etc_pagination\":https://github.com/bloatware/etc-pagination\n* PHP 5.3.0 or newer.\n\nh2. Basics\n\nRah_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.\n\nAll-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.\n\nTwo 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.\n\nThe 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:\n\nbc. \u003ctxp:variable name=\"numPages\" value='\u003ctxp:rah_comments_numpages limit=\"10\" /\u003e' /\u003e\n\u003ctxp:etc_pagination pages='\u003ctxp:variable name=\"numPages\" /\u003e' /\u003e\n\u003ctxp:comments offset='\u003ctxp:etc_offset pageby=\"10\" /\u003e' limit=\"10\" /\u003e\n\nThe above is similar to any etc_pagination use case, but instead of using it's @etc_numpages@, we're using @rah_comments_numpages@.\n\nh2. Tags and attributes\n\nh3. rah_comments_numpages\n\nbc. \u003ctxp:rah_comments_numpages limit=\"10\" /\u003e\n\nCalculates 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.\n\nTo 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.\n\nh4. Attributes\n\n*limit*\nNumber 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.\nDefault: @\"10\"@ Example: @limit=\"5\"@\n\n*sort*\nComment 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.\nDefault: @\"posted asc\"@ Example: @sort=\"posted desc\"@\n\n*offset*\nNumber of comments skipped.\nDefault: @\"0\"@ Example: @offset=\"5\"@\n\n*parameter*\nThe 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@.\nDefault: @\"pg\"@ Example: @parameter=\"pg\"@\n\nh3. rah_comment_permlink\n\nbc. \u003ctxp:rah_comment_permlink\u003e\n    ...contained statement...\n\u003c/txp:rah_comment_permlink\u003e\n\nRenders comment permlink, used as \"comment_permlink\":http://www.textpattern.net/wiki/index.php?title=comment_permlink tag's replacement.\n\nh4. Attributes\n\n*anchor*\nWhether to apply the comment's id to the hyperlink tag (as the id attribute), setting this comment permanent link as the comment page anchor.\nDefault: @\"1\"@ Example: @anchor=\"0\"@\n\nh2. Examples\n\nh3. Basic pagination\n\nbc. \u003ctxp:variable name=\"numPages\" value='\u003ctxp:rah_comments_numpages limit=\"10\" /\u003e' /\u003e\n\u003ctxp:etc_pagination pages='\u003ctxp:variable name=\"numPages\" /\u003e' /\u003e\n\u003ctxp:comments offset='\u003ctxp:etc_offset pageby=\"10\" /\u003e' limit=\"10\" /\u003e\n\nThe above renders 10 comments per page and displays page numbers above the comment list.\n\nh3. Recent comments\n\nbc. \u003ctxp:recent_comments limit=\"10\" wraptag=\"ul\" break=\"li\"\u003e\n    \u003ctxp:rah_comment_permlink\u003e\u003ctxp:comment_name link=\"0\" /\u003e (\u003ctxp:title /\u003e)\u003c/txp:rah_comment_permlink\u003e\n\u003c/txp:recent_comments\u003e\n\nThe above renders last 10 comments on the website.\n\nh2. Changelog\n\nh3. Version 0.5.0 - upcoming\n\n* Rewritten as \"etc_pagination\":https://github.com/bloatware/etc-pagination module.\n* Removed: @rah_comments@ tag.\n* Removed: @rah_recent_comments@ tag.\n* Added: @rah_comments_numpages@ tag.\n* Added: @rah_comment_permlink@ tag.\n* Updated: now shows the correct comment page after new comment submissions.\n* Performance optimisations.\n* Released as \"Composer\":http://getcomposer.org package.\n\nh3. Version 0.4 - 2008/09/14\n\n* Added @\u003ctxp:rah_recent_comments /\u003e@ tag.\n\nh3. Version 0.3 - 2008/09/03\n\n* Removed attributes: @break_nav@ and @break_pages@.\n* Fixed messy url mode’s error: now works fully on messy.\n* Added attributes: @pg_break@, @pg_break_class@, @prepend@ and @append@.\n* Now works in article lists, same way like @\u003ctxp:comments /\u003e@.\n* Better documentation.\n\nh3. Version 0.2 - 2008/02/17\n\n* Some minor bug fixes.\n* Removed some typos from documentation.\n\nh3. Version 0.1 - 2008/02/16\n\n* First release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocom%2Frah_comments","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgocom%2Frah_comments","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocom%2Frah_comments/lists"}