Rah_sitemap is a sitemap plugin for Textpattern CMS. Easily build valid Sitemap.org XML sitemaps for search engines, including Google. Supports categories, sections, articles and even custom URLs. All settings can be managed from clean interface. No dive to code required.
A cup of coffee
List of features
- Simple interface under Textpattern > Extensions > Sitemap: build, view, modify and customize sitemap.
- Filter, include and exclude section, category and article URLs from the sitemap.
- Create and insert custom URLs to the sitemap with couple simple clicks.
- No need to create files nor set permissions, instead just use the plugin and eventually submit the sitemap URL to Google (via Webmaster tools) or other searh engine.
- Sitemap is automatically gzipped as much as possible — at least if server supports gzipping.
- Textpattern 4.0.7+
- PHP 5+ (or 4.3.0 when custom timestamp format is used)
- Optional: PHP zlib extension
- Textpattern 4.0.8+
- PHP 5.1.2+
Installation and usage
The general behavior stands: paste the plugin code to the plugin installer textarea and run the automatic setup. Then just activate the plugin and you are ready to use the sitemap.
You can locate rah_sitemap’s user-interface panel from Textpattern > Extensions > Sitemap. From there you can modify preferences and view the sitemap.
Permlink schemes and rules
Rah_sitemap version 0.4 included a new feature: permlink settings. These setting, found in the panel, will let you define the permlink form for the URLs in the Sitemap. This is a ideal tool for matching the URLs to your own .httaccess rules or a plugin created custom URL rules. If you want to use in-build urls defined by Textpattern itself, you can leave these setting unset.
These URL settings are used for articles that appear in the sitemap. To form the URLs you can use any individual article context’s
<txp:/> tag. Big shots like
<txp:if_article_id /> and so on.
Example Article permlink URL:
<txp:site_url />sections/<txp:section/>/articles/<txp:article_id />/<txp:article_url_title />
These URL settings are used for Category links that appear in the sitemap. To form the URLs you can use plain category context TXP tags
<txp:category /> and
<txp:if_category />. The plugin also provides two extra tagish tags,
[id] which will basically output category’s type and id.
Example Category permlink URL:
<txp:site_url />view/category/[id]/<txp:category link="0" title="0" />
These URL settings are used for section links that appear in the sitemap. To form the URLs you can use the two section tags,
<txp:section /> and
<txp:site_url />section/<txp:section />
- Added: adds site URL to relative article permlinks. Basically a fix for gbp_permanent_links.
- Changed: from permlinkurl_id() to permlinkurl(). Greatly reduced the amount of queries generating article permlinks makes.
- Fixed issues appearing with the installer when MySQL is in strict mode. Thank you for reporting, Gallex.
- Slightly changed backend’s installer call; only check for installing if there is no preferences available.
- Fixed: now correctly parses category tags in category URLs. Thank you for reporting, Andreas.
- Now compression level field’s label now links to the correct field id.
- Now suppresses E_WARNING/E_STRICT notices in live mode caused by Textpattern’s timezone code when some conditions are met (TXP 4.2.0, PHP 5.1.0+, TXP’s Auto-DST feature disabled, TXP in Live mode). Error suppression will be removed when TXP version is released with fully working timezone settings.
- Now generates UNIX timestamps within the SQL query, not with PHP.
- Changed sliding panels’ links (
aelements) into spans.
- Fixed: now deleting custom url leads back to the list view, not to the editing form.
- Removed some leftover inline styles from v0.6.
- Rewritten the code that generates the sitemap.
- New admin panel look.
- Now custom permlink modes and custom urls are escaped. Users can input unescaped URLs/markup from now on.
- Now custom URL list shows the full formatted URL after auto-fill instead of the user input.
- Now custom URLs that start with www. are completed with http:// protocol.
- Now all urls that do not start with either http, https, www, ftp or ftps protocol are auto-completed with the site’s address.
- Custom url editor got own panel. No longer the form is above the URL list.
- Added ability to manually turn gzib compression off and change the compression level.
- Added setting to set zlib.output_compression off. See here, thank you for reporting superfly.
- Preferences are now trimmed during save.
- From now on all new installations have default settings defined that will automatically exclude link, file and image categories from the sitemap. This won’t effect updaters.
- Changed sitemap’s callback register from pre
pretextto callback after it (callback is now
$pretextis set before the sitemap and thus more plugins might work within permlink settings and custom urls.
- When using TXP’s clean URLs, requesting
/sitemap.xmlURLs will return the sitemap, not just the
/?rah_sitemap=sitemap. This will of course require existing fully working clean urls.
- Added customizable timestamp formats.
- Cleaned backend markup.
- Combined individual preference queries.
- Added support for custom permlink rules: Now you can easily set any kind of permlink rules for articles, section and categories.
- Added option to exclude future articles.
- Added option to exclude past articles.
- Added option to exclude expired articles.
- Moved Custom URL UI to it’s own page.
- Added multi-delete feature to Custom URL UI.
- Improved Custom URL UI.
- Removed default static appending domain from Custom URL input field.
- Changed TXP minimum requirement to version 4.0.7 (and above). Note that the plugin still works with older TXP versions (down to 4.0.5) if the Exclude Expired articles -option is left empty (unset).
- Fixed view url that still (from version 0.2) included installation address before link.
- Added option to insert URLs that are outside Textpattern install directory.
- Fixed option to exclude categories directly by type: added forgotten link type.
- Added option to exclude/include sticky articles.
- Added option to exclude categories directly by type.
- Fixed bug: now shows all categories, and not only article-type, in admin panel.
- Fixed bug: removed double install query (didn’t do a thing, just checked table status twice).
- Fixed article listing bug caused by nasty little typo: now only 4 and 5 statuses are listed.
- First release.