Extension:ManualSitemap
From MediaWiki.org
Note: Since MediaWiki 1.6, the MediaWiki core has a Google site map generator which may be more appropriate than this extension. It is a command-line utility, and it is located at maintenance/generateSitemap.php in your MediaWiki directory. The command line is "php generateSitemap.php sitename" and is run from the maintenance directory at the server's command line interface. See Manual:generateSitemap.php for more information.
You should use this extension ONLY if you can't use original utility because of safe mode or some kind of another security settings.
|
Release status: stable |
|||
|---|---|---|---|
| Implementation | Special page | ||
| Description | Adds a special page to create Sitemaps. | ||
| Author(s) | François Boutines-Vignard, Jehy, Thomas (JehyTalk) | ||
| Last Version | 0.11 (2009-04-08) | ||
| MediaWiki | 1.13.0+ | ||
| License | GPL | ||
| Download | version 0.11 readme |
||
| Example | Generated sitemap | ||
|
|||
|
check usage (experimental) |
|||
Contents |
[edit] Disclaimer
This extension is a fixed version of abandoned extension Extension:Google Sitemap. Since it is not fixed for already 2 years, I took responsibility, fixed all known bugs and published it here. Also, I am going to fix and complete it in future. Many people, including me, can't use the maintenance scripts...
Please, credit Francois Boutines for original idea. I really hope that he will be back...
All the text below is taken from the original description. Please, if you have any questions - please look there first.
ManualSitemap is a small, non-intrusive Google Sitemap generator.
ManualSitemap Extension creates a Special:ManualSitemap page which allows you to automatically create and update a Google Sitemap for your Mediawiki site. This allows Google to explore your Mediawiki site smarter.
The Special:ManualSitemap page is designed for bureaucrats/administrators. It saves a XML Sitemap file called sitemap.xml (at the root of the wiki by default) and prints some reporting (quite similar to Special:Popularpages).
The XML file has the following properties:
- it is sorted by decreasing article popularity (ie. highest number of hits).
- it contains articles only : no redirection pages, nor any other special/external page (Google robots will probably do these).
- it does not include pages in the reserved Mediawiki namespace (nor talk pages).
In order to produce more relevant Sitemaps, ManualSitemap Extension can also estimate the revision frequency of your pages and associate them a priority according various schemes.
[edit] Installation
- Extract the archive into /extensions directory
- Add the following lines near the end in the LocalSettings.php file:
require_once($IP.'/extensions/ManualSitemap/ManualSitemap.php'); ## You DO NOT NEED anymore to place anything to /include/specials directory
[edit] New features in 1.0:
# Notify all web sites you want about the update of sitemap $ManualSitemap_Notify[] = 'http://www.google.com/webmasters/sitemaps/ping?sitemap='. urlencode('http:/your_web_site.ru/wiki/sitemap.xml'); # Exclude image pages from sitemap index: $ManualSitemap_ExcludeImages=1;
[edit] New features in 1.1 (by Thomas):
#Now there are two more settings the user can put into LocalSettings.php: $ManualSitemap_ServerBase = "http://www.thomas-schweitzer.de"; #With that all sitemap entries get this as their base url. If not set $wgServer is used $ManualSitemap_ExcludeSites[] = 'page title to exclude'; #or $ManualSitemap_ExcludeSites = array('page1 title to exclude', 'page2 title to exclude'); #to exclude some pages from the sitemap. The pages exclude name must be equal to the name/title shown at the Special:ManualSitemap site.
The last thing is a warning, if servers that fetch the sitemap, could not be notified automatically. Sometimes web hoster does not allow the fopen command to call urls (allow_url_fopen=false). Also a link where the user can manually inform the server like google will be shown.
[edit] Use
[edit] First step
Visit the new Special:ManualSitemap page. A link will be provided at the top of the ManualSitemap page. Give Google this link.
[edit] Set permissions
You must also create the file sitemap.xml in your wiki root directory, and chmod it (change permissions) to 777 before running Special:ManualSitemap.[1]
[edit] Updating sitemap
The Special:ManualSitemap page will build a Sitemap out of the 500 'most popular' articles (by accepting the limit, offset, and wpPriorityType[2] parameters, eg: Special:ManualSitemap&limit=500&offset=0&wpPriorityType=cubic).
To update the Sitemap, simply visit Special:ManualSitemap as a bureaucrat.[3]
Warning:
Beware when entering this page, because every time you visit this page, the page produces a new sitemap each time.
If you visit the most popular 500-1000 listed pages without returning to the top 500 list, this program will create a sitemap based on the 500-1000 pages, ignoring the first 500 pages.
[edit] Notes
- ManualSitemap Extension works with both MySQL and INNODB installations.
- ↑ Instructions on how to change permissions for CuteFTP, Voyager FTP, Leech FTP, Total Commander (Windows Commander), WS FTP. Using My network places, right click Sitemap.xml, then left click "Properties". Then check all 9 boxes, then click "Okay".
- ↑ Google complains if priority is constant.
- ↑ Or do some server-side trickery at your own risk.