{"id":21840229,"url":"https://github.com/gocom/rah_ip_range","last_synced_at":"2026-01-08T00:42:52.317Z","repository":{"id":2347849,"uuid":"3310543","full_name":"gocom/rah_ip_range","owner":"gocom","description":"Restricts access to Textpattern CMS pages","archived":false,"fork":false,"pushed_at":"2022-04-17T00:00:04.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T07:32:41.540Z","etag":null,"topics":["php","textpattern","textpattern-plugin"],"latest_commit_sha":null,"homepage":"","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":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":["https://www.paypal.me/jukkasvahn"]}},"created_at":"2012-01-31T00:38:44.000Z","updated_at":"2023-12-19T20:20:31.000Z","dependencies_parsed_at":"2022-08-26T12:52:01.183Z","dependency_job_id":null,"html_url":"https://github.com/gocom/rah_ip_range","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocom%2Frah_ip_range","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocom%2Frah_ip_range/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocom%2Frah_ip_range/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gocom%2Frah_ip_range/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gocom","download_url":"https://codeload.github.com/gocom/rah_ip_range/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246280688,"owners_count":20752191,"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":["php","textpattern","textpattern-plugin"],"created_at":"2024-11-27T21:25:19.177Z","updated_at":"2026-01-08T00:42:52.278Z","avatar_url":"https://github.com/gocom.png","language":"PHP","funding_links":["https://www.paypal.me/jukkasvahn"],"categories":[],"sub_categories":[],"readme":"h1. rah_ip_range\n\n\"Download\":https://github.com/gocom/rah_ip_range/releases | \"Packagist\":https://packagist.org/packages/rah/rah_ip_range | \"Issues\":https://github.com/gocom/rah_ip_range/issues\n\nRah_ip_range is a \"Textpattern CMS\":https://textpattern.com plugin for restricting visitors' access to certain parts of site content based on their IP addresses. The plugin introduces a little Textpattern tag that takes an IP address range and an executed action. The tag can either be used to hide parts of a page template or to invoke a customizable error page.\n\nh2. Install\n\nUsing \"Composer\":https://getcomposer.org:\n\nbc. $ composer require rah/rah_ip_range\n\nOr \"download\":https://github.com/gocom/rah_ip_range/releases an installer package.\n\nh2. Basics\n\nbc. \u003crah::ip_range deny from=\"127.0.0.1\" to=\"127.0.0.1\"\u003e\n    ...contained statements...\n\u003c/rah::ip_range\u003e\n\nThe plugin introduces a new Textpattern tag, @\u003crah::ip_range /\u003e@. The tag can be used to restrict visitor's access to certain parts of page template content or full pages based on their IP address. The tag takes an IP range, set by @from@ and @to@ attributes. A visitor that is in the specified range will be either denied or allowed access to the content based on @deny@ or @allow@ boolean attribute.\n\nThe tag can be used both as a container and as a self-closing single tag. When used as single tag, the tag invokes an error page when the visitor is within denied range. As a container, the tag hides the wrapped content, but doesn't invoke an error page. A container can also take a \"else\":https://docs.textpattern.com/tags/else statement, which is served as an alternative content to denied visitors.\n\nh2. Attributes\n\n*message*\nError message shown to blocked visitors.\nExample: @message=\"Sorry, we can not do that.\"@ Default: @\"Forbidden.\"@\n\n*status*\nHTTP error status code returned to blocked visitors. The option is ignored when the tag is used as a container.\nExample: @status=\"404\"@ Default: @\"403\"@\n\n*from*\nIP-range's starting IP (or partial IP). Default is unset.\nExample: @from=\"127.0.0.1\"@ Default: @\"\"@\n\n*to*\nIP-range's ending IP (or partial IP). Default is unset.\nExample: @to=\"127.0.0.100\"@ Default: @\"\"@\n\n*allow*\nAllow visitors within the specified IP range. This is the default action.\nExample: @allow@ Default: @allow@\n\n*deny*\nDeny visitors within the specified IP range. Opposite of **allow**.\nExample: @deny@ Default: _undefined_\n\nh2. Examples\n\nh3. Using as a self-closing single tag\n\nbc. \u003crah::ip_range deny from=\"127.0.0.1\" to=\"127.0.0.100\" message=\"Access denied.\"/\u003e\n\nVisitors within the range of 127.0.0.1-127.0.0.100 are blocked will see an error page.\n\nh3. Using as a container\n\nbc. \u003crah::ip_range from=\"127.0.0.1\" to=\"127.0.0.100\"\u003e\n    \u003ca href=\"http://example.com\"\u003eImportant link\u003c/a\u003e.\n\u003ctxp:else /\u003e\n    Link is hidden.\n\u003c/rah::ip_range\u003e\n\nVisitors within the range 127.0.0.1-127.0.0.100 will see an important link, while others won't. Instead they are treated with _\"Link is hidden.\"_ message where the link would be.\n\nh2. Changelog\n\nh3. Version 0.5.0 - 2022/04/17\n\n* Register the tag for Textpattern \u003e= 4.7.0 compatibility.\n* Rename @fromip@ to @from@, @toip@ to @to@, split @method@ attribute to @allow@ and @deny@ boolean attributes.\n* Now requires Textpattern \u003e= 4.7.0.\n\nh3. Version 0.4 - 2012/07/13\n\n* Added: \"else\":https://docs.textpattern.com/tags/else (@\u003ctxp:else /\u003e@) tag support for container mode.\n* Changed: default HTTP status to _403 Forbidden_ from _503 Service Unavailable_.\n* Changed: default message to @Forbidden.@, @403_forbidden@ l18n string.\n* Changed: @message@ attribute doesn't apply when tag is used as a container, instead of \"else\":https://docs.textpattern.com/tags/else can be used.\n\nh3. Version 0.3 - 2011/06/29\n\n* Changed: parsing contents of @message@ isn't needed. Parser's straight quote feature can be used instead.\n* Changed: pass parameters to @txp_die()@ as strings instead of an array.\n\nh3. Version 0.2 - 2011/06/25\n\n* Added: container tag mode.\n\nh3. Version 0.1 - 2008/10/31\n\n* Initial release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocom%2Frah_ip_range","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgocom%2Frah_ip_range","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgocom%2Frah_ip_range/lists"}