|Main page||SimplePie Plugin for Mediawiki|
|Author||Ryan Parman (Original)|
|Plugin Version||1.2.1 (Discontinued)|
|Compatible Mediawiki version||1.7.x and newer|
|Required SimplePie version||1.0.x|
Because I don't use Mediawiki anymore, I'm discontinuing development on this plugin. If you are interested in taking over development, please let me know at the forums. Alternatively, there are other Mediawiki plugins that you can use instead of this one.
This plugin adds a
<feed> tag to Mediawiki that allows you to display feeds in your wiki.
Replace the old
simplepie_mediawiki.php with the new one.
For the purposes of these instructions, we're going to make a few assumptions. We're going to assume that you have installed MediaWiki to
http://wiki.example.com, which would mean that the MediaWiki extensions folder lives at
http://wiki.example.com/extensions/, and that your MediaWiki settings file lives at
When you download them, make sure you know where you've downloaded them to. Once you've done that, unzip them. The full SimplePie library is what powers everything, and the Mediawiki plugin simply makes it available to your wiki pages.
This means that these two files will be uploaded to
This means that after you create the cache folder, it will live at
This setting varies from webhost to webhost. In the past, I've used iPowerWeb, and they required file permissions of
777 in order to be server-writable. Currently, I use Dreamhost, and they need permissions to be set to
755 to be server-writable. Again, if you're not sure, either go ask your host or you can try various settings yourself. The three to try are
The specific process of how you change your file permissions differs from FTP application to FTP application. On Windows I use FlashFXP, where you find the remote file or folder that you want to change the permissions of, you right-click on it, and choose Attributes (CHMOD). On Mac OS X I use Transmit, where you find the remote file or folder that you want to change the permissions of, you right-click (or ctrl-click for you one-button-mousers) on it, and choose Get Info. Your specific FTP application will most likely be something similar.
Open up your
LocalSettings.php file which lives at
http://wiki.example.com/LocalSettings.php. At the very bottom of the file, but above the closing PHP tag (?>), add this line:
SimplePie and the SimplePie Plugin for Mediawiki are now installed.
SimplePie Plugin for MediaWiki adds one tag to your MediaWiki installation: the
<feed> tag. Here's how you use it:
To load a feed on your MediaWiki pages, simply wrap the feed URL with
<feed>tags. Doing this with no attributes will display the default way:
- An <h3> containing the feed's title, linked back to the originating site.
- An ordered list, containing all of the news items in the feed.
- The news item's title, linked back to the originating post.
- The full HTML description for each news item.
Limits the number of items returned. If you set this value to 5, then you'll get back the 5 most recent posts. If there's a feed with fewer than 5 posts, SimplePie will return all of them. Defaults to all.
Determines whether the description should be shown or not. If set to false, descriptions are omitted, and the ordered list will display only the linked item titles with no special formatting. Defaults to true.
Displays the date of the news item. Accepts anything that's allowed in PHP's date() function. Defaults to blank.
Strips all tags from the item's description and limits the number of characters that are displayed. Accepts any numeric value. If more characters are allowed than are in the description, the entire description will be displayed. If the text wasn't cut at the end of a sentence (ending with a period, exclamation point, or question mark), an ellipsis will be added to the end of the text. Defaults to all characters.
Determines whether the built-in feed title is displayed or not. Defaults to true.
Displays a custom title in place of the feed's built-in title. Defaults to blank.
Displays a custom error message for when there is a problem retrieving the feed. Defaults to the standard error messages.
If you want to apply special CSS styles to the feed display, here's some basic markup that represents what is generated.
<div class="simplepie"> <h3><a href="http://example.com">Example Site</a></h3> <ol> <li><strong><a href="...">Item Title 1</a> <span class="date">29 May 2006</span></strong><br /> The description for the item.</li> <li><strong><a href="...">Item Title 2</a> <span class="date">28 May 2006</span></strong><br /> The description for the item.</li> <li><strong><a href="...">Item Title 3</a> <span class="date">27 May 2006</span></strong><br /> The description for the item.</li> </ol> </div>
plugins/mediawiki/simplepie_plugin_for_mediawiki.txt · Last modified: 2011/03/06 03:56 (external edit)