This plugin adds a
<txp:feed> tag to Textpattern that allows you to display feeds in your wiki.
Replace the old
simplepie.inc with the latest one downloaded from http://simplepie.org/downloads/downloads. Uninstall the old plugin and reinstall the latest version via the link above.
For the purposes of these instructions, we're going to make a few assumptions. We're going to assume that you have installed Textpattern to
http://blog.example.com, which would mean that the Textpattern administration folder lives at
http://blog.example.com/textpattern/, and that your Textpattern
lib folder lives at
- simplepie.inc is the main directory of the SimplePie package available here: http://simplepie.org/downloads/.
- The Textpattern plugin simplepie_textpattern_1.2.2.zip
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 Textpattern plugin simply makes it available to your blog pages.
This means that this file will be uploaded to
This means that after you create the
simplepie_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.
- Log into your Textpattern control panel, click on the “admin” tab, then the “plugins” tab.
- Copy-paste the contents of
simplepie_textpattern.txtinto the form and click “upload”.
- You should see some colorized PHP code. Scroll to the bottom of the page, and click “install”.
- You should see the SimplePie Plugin for Textpattern listed in your plugins list. On the right-hand side of the row, you'll see the word “no” under the “Active” column. Click “no” to change it to “yes”, meaning that the plugin is now enabled.
If you need more help installing Textpattern plugins, check out the Textpattern plugin installation instructions.
SimplePie and the SimplePie Plugin for Textpattern are now installed.
SimplePie Plugin for Textpattern adds one tag to your Textpattern installation: the
<txp:feed> tag. Here's how you use it:
Changes from version 1.2.1 to 1.2.2 highlighted in bold.
To load a feed on your Textpattern pages, simply wrap the feed URL with
<txp: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. If ”-1” is entered no title is displayed (removes the built-in title too). Defaults to blank.
Define the html header used for the title (eg h4) defaults to h3.
Defines the list type. Eg listtype=“ol” will give an ordered list. Defaults to “ul”.
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/textpattern/simplepie_plugin_for_textpattern.txt · Last modified: 2011/03/06 03:56 (external edit)