| @@ -1,17 +1,17 @@ | ||
| 1 | 1 | FeedWordPress |
| 2 | 2 | ============= |
| 3 | 3 | |
| 4 | -* Author: [Charles Johnson](http://www.radgeek.com/contact) | |
| 5 | -* Version: 0.96 | |
| 4 | +* Author: [Charles Johnson](http://radgeek.com/contact) | |
| 5 | +* Version: 0.97 | |
| 6 | 6 | * Project URI: <http://projects.radgeek.com/feedwordpress> |
| 7 | -* License: GPL. See License below for copyright jots and tittles. | |
| 7 | +* License: GPL 2. See License below for copyright jots and tittles. | |
| 8 | 8 | |
| 9 | 9 | Introduction |
| 10 | 10 | ------------ |
| 11 | -FeedWordPress is an Atom/RSS aggregator for WordPress. It syndicates content | |
| 12 | -from newsfeeds that you select into your WordPress blog; if you syndicate | |
| 13 | -several newsfeeds then you can WordPress's posts database and templating | |
| 11 | +FeedWordPress is an Atom/RSS aggregator for WordPress 1.5. It syndicates content | |
| 12 | +from newsfeeds that you choose into your WordPress blog; if you syndicate | |
| 13 | +several newsfeeds then you can use WordPress's posts database and templating | |
| 14 | 14 | engine as the back-end of an aggregation ("planet") website. I originally |
| 15 | 15 | developed it because I needed a more flexible replacement for [Planet][] to |
| 16 | 16 | use at [Feminist Blogs][]. |
| 17 | 17 | |
| @@ -28,24 +28,70 @@ | ||
| 28 | 28 | hosts*.) |
| 29 | 29 | |
| 30 | 30 | [WordPress 1.5]: http://wordpress.org/development/2005/02/strayhorn/ |
| 31 | 31 | |
| 32 | -Installation & Requirements | |
| 33 | -You'll need a website with WordPress 1.5 installed and configured and FTP or | |
| 34 | -SFTP access to your web space. You'll probably also want to have either (1) | |
| 35 | -the ability to create cron jobs on your web host, or (2) a computer of your | |
| 36 | -own that has always-on Internet access. | |
| 32 | +Installation | |
| 33 | +------------ | |
| 34 | +### Requirements ### | |
| 37 | 35 | |
| 36 | +To use version 0.97 of FeedWordPress, you will need: | |
| 37 | + | |
| 38 | +1. an installed configured copy of WordPress 1.5.x. (It *won't work* with | |
| 39 | + WP 1.2 or WP 1.6 development builds.) | |
| 40 | + | |
| 41 | +2. FTP or SFTP access to your web host | |
| 42 | + | |
| 43 | +And you'll probably also want to have either: | |
| 44 | + | |
| 45 | +1. the ability to create cron jobs on your web host, or at least | |
| 46 | + | |
| 47 | +2. a computer of your own and always-on Internet access | |
| 48 | + | |
| 49 | +### Installation ### | |
| 50 | + | |
| 51 | +#### Upgrades #### | |
| 52 | + | |
| 53 | +To *upgrade* an existing installation of FeedWordPress to version 0.97: | |
| 54 | + | |
| 55 | +1. Download the FeedWordPress archive in zip or gzipped tar format and | |
| 56 | + extract the files on your computer. Replace your existing FeedWordPress | |
| 57 | + files with the new files. Be sure to upgrade `rss-functions.php` if you | |
| 58 | + use the optional MagpieRSS upgrade, or don't use it yet but do want to | |
| 59 | + syndicate Atom 1.0 feeds. | |
| 60 | + | |
| 61 | +2. **Immediately** log in to the WordPress Dashboard, and go to Options --> | |
| 62 | + Syndicated. Follow the directions to launch the database upgrade | |
| 63 | + procedure. The new version of FeedWordPress incorporates some | |
| 64 | + long-needed improvements, but old meta-data needs to be updated to | |
| 65 | + prevent duplicate posts and other possible maladies. If you're upgrading | |
| 66 | + an existing installation, updates and FeedWordPress template functions | |
| 67 | + *will not work* until you've done the upgrade. | |
| 68 | + | |
| 69 | +3. Take a coffee break while the upgrade runs. It should, hopefully, finish | |
| 70 | + within a few minutes even on relatively large databases. | |
| 71 | + | |
| 72 | +4. `update-feeds.php` has been overhauled to improve performance and ease | |
| 73 | + of use, and also to make errors easier to detect and eliminate. The | |
| 74 | + overhaul doesn't require any changes to your set up *if* you used | |
| 75 | + XML-RPC pings, or command-line PHP, to do scheduled updates. It *does* | |
| 76 | + affect you if you used curl or some other tool to send HTTP requests to | |
| 77 | + `update-feeds.php`: your old cron job will probably not work anymore. | |
| 78 | + See [Setting Up Feed Updates][] below to get scheduled updates back on | |
| 79 | + track. | |
| 80 | + | |
| 81 | +5. Enjoy your new installation of FeedWordPress. | |
| 82 | + | |
| 83 | +#### New Installations #### | |
| 84 | + | |
| 38 | 85 | 1. Install `feedwordpress.php` in your WordPress `plugins` directory |
| 39 | - and `update.php` in your WordPress `wp-content` directory. | |
| 86 | + and `update-feeds.php` in your WordPress `wp-content` directory. | |
| 40 | 87 | |
| 41 | 88 | 2. (Optional) Upgrade the copy of MagpieRSS packaged with WordPress by |
| 42 | 89 | installing the new `rss-functions.php` (archived in |
| 43 | 90 | `OPTIONAL/wp-includes`) into your WordPress `wp-includes` directory. |
| 44 | 91 | Upgrading MagpieRSS is necessary if you want to take advantage of |
| 45 | - support for multiple post categories, RSS enclosures, and multiple | |
| 46 | - character encodings. (Note, however, that support for | |
| 92 | + support for Atom 1.0, multiple post categories, RSS enclosures, and | |
| 93 | + multiple character encodings. (Note, however, that support for | |
| 47 | 94 | transliterating between character encodings is a very complex and |
| 48 | 95 | iffy prospect in some PHP environments, so if you intend to use |
| 49 | 96 | a lot of feeds with alternate encodings you should make sure that |
| 50 | 97 | your installation of PHP is up-to-date and that you keep a copy of |
| @@ -51,138 +97,163 @@ | ||
| 51 | 97 | your installation of PHP is up-to-date and that you keep a copy of |
| 52 | 98 | the old MagpieRSS around to compare results.) |
| 53 | 99 | |
| 54 | 100 | 3. Log in to the WordPress Dashboard and activate the FeedWordPress |
| 55 | - plugin. Go to Options --> Syndication to set up initial settings for | |
| 56 | - the syndication link category ("Contributors") by default and the | |
| 57 | - RPC secret word (blank by default, but you should probably set it to | |
| 58 | - something.) | |
| 101 | + plugin. | |
| 59 | 102 | |
| 60 | -4. Set up links for syndication from the WordPress Dashboard using | |
| 61 | - Links --> Syndicated or Links --> Import. | |
| 103 | +4. While you're at the Dashboard, once the plugin is activated, you can | |
| 104 | + go to Options --> Syndication and set (1) the link category that | |
| 105 | + FeedWordPress will syndicate links from (by default, "Contributors"), | |
| 106 | + and (2) a "secret word" for your RPC-XML updating interface. This | |
| 107 | + provides some light security by keeping passing ruffians from saying | |
| 108 | + "Update all the feeds" at will to your FeedWordPress installation. | |
| 62 | 109 | |
| 63 | -5. FeedWordPress is now *ready* to feed syndicated content into | |
| 64 | - WordPress. In order for it to actually receive that content, either | |
| 65 | - (1) have your contributors add WordPress's XML-RPC URI to their | |
| 66 | - blog's list of URIs to ping when they update posts, (2) set up a | |
| 67 | - cron job to check in on all the feeds on a regular basis, or (3) | |
| 68 | - both. If you do (2), you can either set up a job to run `php | |
| 69 | - update-feeds.php` on your web host, or set one up on any computer | |
| 70 | - with always-on Internet access to request `update-feeds.php` over | |
| 71 | - the web. | |
| 72 | - | |
| 73 | - If your copy of WordPress is installed at <http://www.zyx.com/blog>, | |
| 74 | - and you set the secret word for XML-RPC pings to "foo", then your | |
| 75 | - XML-RPC URI will be <http://www.zyx.com/blog/xmlrpc.php>, and the | |
| 76 | - URI to request for `update-feeds.php` to update all feeds will be | |
| 77 | - <http://www.zyx.com/blog/wp-content/update-feeds.php?shibboleth=foo> | |
| 110 | +5. Go to Links --> Syndicated to set up the list of sites that you want | |
| 111 | + FeedWordPress to syndicate onto your blog. (If you have the feeds you | |
| 112 | + want to aggregate in a service such as Bloglines, you may prefer to | |
| 113 | + export them to an OPML file and use WordPress's Links --> Import to | |
| 114 | + import them into the contributors category.) | |
| 78 | 115 | |
| 79 | -For detailed installation instructions, point your web browser to | |
| 80 | -<http://projects.radgeek.com/feedwordpress/install>. | |
| 116 | +#### Setting Up Feed Updates #### | |
| 81 | 117 | |
| 82 | -Basic Concepts | |
| 83 | -FeedWordPress is written as a plugin for [WordPress 1.5][]. It is designed | |
| 84 | -to store all the data it needs within the WordPress database and to make | |
| 85 | -that data easy to manage from within the WordPress Dashboard. | |
| 118 | +FeedWordPress is now ready to accept posts from its syndication sources. | |
| 119 | +Unfortunately, it doesn't yet know *when* to go get them. (**This may be true | |
| 120 | +even if you are upgrading an existing installation of FeedWordPress:** your old | |
| 121 | +cron job will still work if you used command-line PHP or blogging software pings | |
| 122 | +to do updates, but it will need to be fixed if you used curl or another tool to | |
| 123 | +send HTTP requests to `update-feeds.php`.) | |
| 86 | 124 | |
| 87 | -### Contributors / Newsfeeds ### | |
| 125 | +You can load in syndicated posts for the first time by pointing your web browser | |
| 126 | +to `update-feeds.php`. If you have WordPress installed at, say, | |
| 127 | +<http://www.zyx.com/blog> then you should point your browser to | |
| 128 | +<http://www.zyx.com/blog/wp-content/update-feeds.php> and log in as any user in | |
| 129 | +the user database. (You may want to create a new "dummy" user for doing | |
| 130 | +scheduled updates, using **Users --> Authors & Users --> Add New User**. Tell | |
| 131 | +FeedWordPress to update all feeds, and you'll get the first wave of posts | |
| 132 | +imported into the database. | |
| 88 | 133 | |
| 89 | -FeedWordPress uses the WordPress Links database to keep a list of the feeds | |
| 90 | -from which it will syndicate content. WordPress allows you to place links in | |
| 91 | -categories; FeedWordPress will treat all and only the links in one category | |
| 92 | -(by default, this is a category named "Contributors"; you can change the | |
| 93 | -category that FeedWordPress will use using Options --> Syndication). | |
| 134 | +Congratulations! You should now have an aggregator site full of delicious | |
| 135 | +syndicated content hot off of the newswires. Now you just need a way to *keep* | |
| 136 | +the content freshly updated. Unless you enjoy manually browsing to | |
| 137 | +`update-feeds.php` every hour on the hour, you'll probably want to do this by | |
| 138 | +setting up your site for automated updates. | |
| 94 | 139 | |
| 95 | -From WordPress's perspective, the list of Contributors are normal links, and | |
| 96 | -they can be manipulated like other links through the WordPress Dashboard. If | |
| 97 | -you need to add, remove, or change information for any contributors, you can | |
| 98 | -do so easily under Links --> Syndicated. If you want to distribute the labor | |
| 99 | -of adding, updating, and managing feeds, you can use the WordPress login and | |
| 100 | -access privileges system. Users with an access level of 5 or greater can | |
| 101 | -add, delete, and modify Contributors; users with an access level of 6 or | |
| 102 | -greater can change syndication options. | |
| 140 | +You can pull that off in one of two ways, or by a mixture of both: | |
| 141 | + | |
| 142 | +1. **The Blogging Software Ping Method:** You can get all of your | |
| 143 | + contributors to add you to the list of URIs that they notify of updates: | |
| 144 | + while FeedWordPress is activated, it will accept XML-RPC "recently | |
| 145 | + updated" pings in the standard format accepted by Weblogs.com, | |
| 146 | + Ping-O-Matic, Technorati, and other services. Most blogging software | |
| 147 | + allows users to add a URI to the list of URIs that get pinged on each | |
| 148 | + update. (See, for example, Options --> Writing --> Update Services in | |
| 149 | + WordPress, or Configuration --> Preferences --> Publicity / Remote | |
| 150 | + Interfaces / TrackBack in Movable Type.) | |
| 151 | + | |
| 152 | + If you can get a contributor to add your XML-RPC URI to her | |
| 153 | + services-to-ping list (if you have WordPress installed at | |
| 154 | + <http://www.zyx.com/blog>, say, the URI to add should be | |
| 155 | + <http://www.zyx.com/blog/xmlrpc.php>), then whenever she updates her | |
| 156 | + blog, her blogging software will ping your FeedWordPress installation, | |
| 157 | + and FeedWordPress will look up her feed to grab the new posts off of | |
| 158 | + it. | |
| 103 | 159 | |
| 104 | -When FeedWordPress looks for new posts, it does so by retrieving one or all | |
| 105 | -of the links from the Contributors category (depending on whether it has | |
| 106 | -been told to scan for new posts on one or all of the feeds). | |
| 160 | +2. **The Scheduled Update Job Method:** You may very well not be able to | |
| 161 | + get all your contributors to add your site to their blogging software's | |
| 162 | + ping list, and even if you do you may want to have a back-up option to | |
| 163 | + catch updates later even if the ping fails to go through on one | |
| 164 | + particular occasion. You'll need to create a scheduled job to | |
| 165 | + periodically check for updates on *all* the feeds. You'll need either | |
| 166 | + (a) the ability to create cron jobs on your web host or (b) access to | |
| 167 | + another computer with a reliable, always-on Internet connection. | |
| 168 | + | |
| 169 | + If you *can* create a crontab on your web host, then the best thing to | |
| 170 | + do is to create a cron job that will run update-feeds.php through the | |
| 171 | + PHP command-line interface. For example, if you have WordPress installed | |
| 172 | + in `~/www/wp` (where ~ is your home directory), you might insert the | |
| 173 | + following line into your crontab: | |
| 174 | + | |
| 175 | + 25 * * * * cd $HOME/www/wp/wp-content ; php -q update-feeds.php | |
| 107 | 176 | |
| 108 | -__Feed settings:__ All of the information for a syndicated feed is stored in | |
| 109 | -the WordPress Links database. Feeds in the category to be syndicated (by | |
| 110 | -default, "Contributors") use several fields of the standard WordPress Link | |
| 111 | -record: | |
| 177 | + If you *don't* have access to (a), you can still save the day using | |
| 178 | + another computer with always-on Internet access that sends a POST | |
| 179 | + request to the `update-feeds.php` URI on a regular schedule. So, for | |
| 180 | + example, if you have WordPress installed at <http://www.zyx.com/blog>, | |
| 181 | + and you have a dummy user in your WordPress database with the login name | |
| 182 | + 'login' and the password 'pass', then you could add the following line | |
| 183 | + to the crontab on a home Linux box: | |
| 184 | + | |
| 185 | + 25 * * * * curl --user login:pass http://www.zyx.com/blog/wp-content/update-feeds.php -d update=quiet | |
| 112 | 186 | |
| 113 | -- The RSS URI is used to store the URI for the feed to be syndicated. | |
| 114 | - (Note that this is *not* the same as the Link URI. The Link URI | |
| 115 | - points to the human-readable *front page* of the website that the | |
| 116 | - feed syndicates.) | |
| 187 | + The `-d update=quiet` switch ensures that (1) `update-feeds.php` will | |
| 188 | + receive an HTTP POST request rather than an HTTP GET request (which | |
| 189 | + is important, since it won't take any actions with side-effects -- such | |
| 190 | + as checking for new posts -- unless it receives an HTTP POST); it also | |
| 191 | + tells it to suppress the HTML output that it would generate for normal | |
| 192 | + web browsers, and only to output text if it encounters errors (this will | |
| 193 | + keep the number of e-mails you receive from the Cron Daemon to a | |
| 194 | + minimum). | |
| 117 | 195 | |
| 118 | -- The Link URI is used to store a URI to the human-readable front page | |
| 119 | - (*not* the feed!) of the syndicated website. FeedWordPress | |
| 120 | - automatically updates this URI using the URI that is reported by the | |
| 121 | - newsfeed whenever it checks the feed for new posts, so if the page | |
| 122 | - moves this will be reflected automatically on your Contributors | |
| 123 | - links list. | |
| 196 | + If you are using Windows XP and have a version of curl (such as the | |
| 197 | + version included in [Cygwin][]), you can create a Scheduled Task to | |
| 198 | + similar effect. | |
| 124 | 199 | |
| 125 | -- The Link Name is used to store the title of the syndicated website. | |
| 126 | - By default, FeedWordPress automatically updates the name of the link | |
| 127 | - whenever it checks for new posts, using the title that the | |
| 128 | - newsfeed reports (so that if a Contributor changes the title of her | |
| 129 | - website, this is reflected automatically on your Contributors links | |
| 130 | - list). This behavior can be turned off for all feeds through the | |
| 131 | - settings in Options --> Syndication. The default behavior can be | |
| 132 | - overridden for specific feeds using the feed setting | |
| 133 | - `hardcode name`. | |
| 200 | + [Cygwin]: http://www.cygwin.com/ | |
| 134 | 201 | |
| 135 | -- The Short Description is used to store the tagline of the syndicated | |
| 136 | - website. By default, FeedWordPress automatically updates the | |
| 137 | - description whenever it checks for new posts, using the tagline or | |
| 138 | - description that the newsfeed reports (so that if a Contributor | |
| 139 | - changes the tagline of her website, this is reflected automatically | |
| 140 | - on your Contributors links list). his behavior can be turned off for | |
| 141 | - all feeds through the settings in Options --> Syndication. The | |
| 142 | - default behavior can be overridden for specific feeds using the feed | |
| 143 | - setting `hardcode description`. | |
| 202 | +Basic Concepts | |
| 203 | +-------------- | |
| 204 | +FeedWordPress is written as a plugin for [WordPress 1.5][]. It is designed to | |
| 205 | +store all the data it needs within the WordPress database and to make that data | |
| 206 | +easy to manage from within the WordPress Dashboard. | |
| 144 | 207 | |
| 145 | -- The Link Notes are used to store a collection of manually-encoded | |
| 146 | - and automatically-generated settings that apply to this feed. The | |
| 147 | - format of settings in Link Notes is: | |
| 148 | - | |
| 149 | - key1: value1 | |
| 150 | - key2: value2 | |
| 151 | - feed/key1: value1 | |
| 152 | - feed/key2: value2 | |
| 153 | - | |
| 154 | - And so on. Values that are prefixed by 'feed/' are automatically | |
| 155 | - generated from feed data every time the feed syndicated by this link | |
| 156 | - is checked for updates. Values without the prefix are set manually | |
| 157 | - by the user. | |
| 208 | +### Contributors / Newsfeeds ### | |
| 158 | 209 | |
| 159 | -The Link Notes section can be used to add, remove, and change custom feed | |
| 160 | -settings. For example, if you want to *add* the feed setting for `unfamiliar | |
| 161 | -author` with the value `filter`, you can do so by going to Links --> | |
| 162 | -Syndicated, clicking the "Edit" link for the feed that you wish to add this | |
| 163 | -setting for, and then adding the following, on a line by itself, to the Link | |
| 164 | -Notes section: | |
| 210 | +FeedWordPress uses the WordPress Links database to keep a list of the feeds from | |
| 211 | +which it will syndicate content. WordPress allows you to place links in | |
| 212 | +categories; FeedWordPress will make use of all and only the links in one | |
| 213 | +category (by default, this is a category named "Contributors"; you can change | |
| 214 | +the category that FeedWordPress will use using **Options --> Syndication**). | |
| 165 | 215 | |
| 166 | - unfamiliar author: filter | |
| 216 | +From WordPress's perspective, the list of Contributors are normal links, and | |
| 217 | +they can be manipulated like other links through the WordPress Dashboard. | |
| 218 | +However, FeedWordPress provides a nicer interface for adding, removing, or | |
| 219 | +changing information for the Contributor Links from the WordPress Dashboard, | |
| 220 | +under **Links --> Syndicated**. | |
| 167 | 221 | |
| 168 | -To remove the setting, follow the same procedure, but find the line for the | |
| 169 | -feed setting that you want to remove and remove it. To change the value, | |
| 170 | -simply change the text that follows after the colon. | |
| 222 | +If you want to distribute the labor of adding, updating, and managing feeds | |
| 223 | +between several people, you can use the WordPress login andaccess privileges | |
| 224 | +system. Any users with an access level of 5 or greater can add, delete, and | |
| 225 | +modify Contributors; users with an access level of 6 or greater can change | |
| 226 | +syndication options. | |
| 171 | 227 | |
| 172 | -Most settings in the Link Notes have no effect on FeedWordPress, but you can | |
| 173 | -use them to store information for templates to retrieve using the | |
| 174 | -`get_feed_meta()` template function in a post context (see Template API | |
| 175 | -below). For example, many aggregator sites use a "face" image for each feed | |
| 176 | -to visually distinguish posts from different feeds. To implement a face | |
| 177 | -feature, you could add something like this to each feed's Link Notes, on a | |
| 178 | -line by itself: | |
| 228 | +When FeedWordPress looks for new posts, it retrieves one or all of the links | |
| 229 | +from the Contributors category (depending on whether it has been told to scan | |
| 230 | +for new posts on one or all of the feeds), determines which of them should be | |
| 231 | +polled for updates (based on how long it has been since the last time each feed | |
| 232 | +was polled for updates), and then uses an HTTP conditional GET to check for | |
| 233 | +updates at the "RSS URI" for each Link that it selects. Any new posts are added | |
| 234 | +to the database, and old posts that have been updated since the last poll are | |
| 235 | +updated to reflect the new version. | |
| 179 | 236 | |
| 180 | - face: http://www.zyx.com/mugs/ugly | |
| 237 | +__Feed settings:__ All of the information for a syndicated feed is stored in the | |
| 238 | +WordPress Links database, and can be easily edited using an interface that | |
| 239 | +FeedWordPress provides under **Links --> Syndicated**. (If you're curious about | |
| 240 | +the technical details of how the information is stored, you can find out more | |
| 241 | +under [API: How feed information is stored][].) | |
| 181 | 242 | |
| 182 | -The URI should be changed out for each feed to point to the appropriate | |
| 183 | -image, of course. Then, to use the setting from within a template: | |
| 243 | +You can use a feed's **Edit** link under **Links --> Syndicated** to affect how | |
| 244 | +FeedWordPress prcesses posts from that feed. (Most of these options can either | |
| 245 | +be set for *one particular feed* using **Links --> Syndicated --> Edit**, or set | |
| 246 | +as the default for *all feeds* using **Options --> Syndication**.) The **Edit** | |
| 247 | +link also allows you to set **Custom Feed Settings** for use in templates, | |
| 248 | +through the use of the [`get_feed_meta()`][get_feed_meta] template function in a | |
| 249 | +post context (see [Template API][]). For example, many aggregator sites use a | |
| 250 | +"face" image for each feed to visually distinguish posts from different feeds. | |
| 251 | +To implement a face feature, you could add a custom setting for each Contributor | |
| 252 | +Link, with the key of "face" and a URI such as "http://www.zyx.com/mugs/ugly" | |
| 253 | +for the value. (The URI should be changed out for each feed to point to the | |
| 254 | +appropriate image, of course.) Then, to use the setting from within a template, | |
| 255 | +add something like: | |
| 184 | 256 | |
| 185 | 257 | // In a post context |
| 186 | 258 | <?php $img = get_feed_meta('face'); if (strlen($img) > 0): ?> |
| 187 | 259 | <img src="<?=$img?>" alt="" /> |
| @@ -187,36 +258,31 @@ | ||
| 187 | 258 | <?php $img = get_feed_meta('face'); if (strlen($img) > 0): ?> |
| 188 | 259 | <img src="<?=$img?>" alt="" /> |
| 189 | 260 | <?php endif; ?> |
| 190 | 261 | |
| 191 | -... which will display the image, if any, whose URI is set in the "face" | |
| 192 | -setting for the feed that post comes from. If there is no "face" setting for | |
| 193 | -a particular feed, ``get_feed_meta()`` will return an empty string and no | |
| 194 | -image will be displayed. | |
| 262 | +... which will display the image, if any, whose URI is set in the "face" setting | |
| 263 | +for the feed that post comes from. If there is no "face" setting for a | |
| 264 | +particular feed, [`get_feed_meta()`][get_feed_meta] will return an empty string | |
| 265 | +and no image will be displayed. | |
| 195 | 266 | |
| 196 | -Not all feed settings are only for templates. Some affect how FeedWordPress | |
| 197 | -processes posts from that feed. Currently, the settings with special effects | |
| 198 | -on FeedWordPress are `cats`, `hardcode name`, `hardcode description`, | |
| 199 | -`hardcode categories`, `post status`, `comment status`, `ping status`, | |
| 200 | -`unfamiliar author`, and `unfamiliar categories`. For descriptions of their | |
| 201 | -effects, see Special Feed Settings below. | |
| 267 | + [API: How feed information is stored]: http://projects.radgeek.com/feedwordpress/api#how-feed-information-is-stored | |
| 202 | 268 | |
| 203 | 269 | ### Syndicated Posts ### |
| 204 | 270 | |
| 205 | 271 | Whenever FeedWordPress updates, it scans one or more of the feeds in its |
| 206 | 272 | Contributors list and adds any new posts that it finds to the WordPress |
| 207 | -database. Syndicated posts are displayed on your WordPress pages like any | |
| 208 | -other posts: they can be listed in archives by category, author, or date; | |
| 209 | -they can be found with the search box; and they are included in the newsfeed | |
| 210 | -of your blog. | |
| 273 | +database. Syndicated posts are displayed on your WordPress pages like any other | |
| 274 | +posts: they can be listed in archives by category, author, or date; they can be | |
| 275 | +found with the search box; and they are included in the newsfeed of your blog. | |
| 211 | 276 | |
| 212 | -In your WordPress templates (Presentation --> Theme Editor) you can access | |
| 213 | -special information about syndicated posts using functions provided by | |
| 214 | -FeedWordPress, such as `is_syndicated()`, `the_syndication_source()`, | |
| 215 | -`the_syndication_source_link()`, and `get_feed_meta()`. For example, here is | |
| 216 | -the template code that I use (in a post context) to display both the | |
| 217 | -author's name and the original source of the post in the templates for | |
| 218 | -[Feminist Blogs][]: | |
| 277 | +In your WordPress templates (**Presentation --> Theme Editor**) you can access | |
| 278 | +special information about syndicated posts using [functions provided by | |
| 279 | +FeedWordPress][Template API], such as [`is_syndicated()`][is_syndicated], | |
| 280 | +[`the_syndication_source()`][the_syndication_source], | |
| 281 | +[`the_syndication_source_link()`][the_syndication_source_link], and | |
| 282 | +[`get_feed_meta()`][get_feed_meta]. For example, here is the template code that | |
| 283 | +I use (in a post context) to display both the author's name and the original | |
| 284 | +source of the post in the templates for [Feminist Blogs][]: | |
| 219 | 285 | |
| 220 | 286 | <cite class="feed">from <?php the_author_posts_link()?><?php |
| 221 | 287 | if (is_syndicated() and (get_the_author() !== get_syndication_source())): |
| 222 | 288 | echo ' @ <a href="'; the_syndication_source_link(); echo '">'; |
| @@ -223,413 +289,159 @@ | ||
| 223 | 289 | the_syndication_source(); |
| 224 | 290 | echo '</a>'; |
| 225 | 291 | endif; ?></cite> |
| 226 | 292 | |
| 227 | -For more information on template functions, see Template API below. | |
| 293 | +For more information on template functions, see [Template API][]. | |
| 228 | 294 | |
| 229 | 295 | ### Categories ### |
| 230 | 296 | |
| 231 | -WordPress allows for posts to be placed in *categories*. Each syndicated | |
| 232 | -post that FeedWordPress adds to the WordPress database is placed into a set | |
| 233 | -of categories. FeedWordPress gets the list of category names to use from two | |
| 297 | +WordPress allows for posts to be placed in *categories*. Each syndicated post | |
| 298 | +that FeedWordPress adds to the WordPress database is placed into a set of | |
| 299 | +categories. FeedWordPress gets the list of category names to use from two | |
| 234 | 300 | sources: |
| 235 | 301 | |
| 236 | -1. Categories (or "tags") that the original author placed the post in | |
| 237 | - on her blog | |
| 302 | +1. Categories (or "tags") that the original author placed the post in on | |
| 303 | + her blog | |
| 238 | 304 | |
| 239 | -2. Categories that you set explicitly for each feed using the `cats` | |
| 240 | - feed setting. For example, if you wanted all the posts from Alas, A | |
| 241 | - Blog to be placed in the "Pacific Northwest" category and the | |
| 242 | - "Cartoonists" category (in addition to any categories that they were | |
| 243 | - placed in on Alas, A Blog), you could do this by going to Links --> | |
| 244 | - Syndicated, clicking the "Edit" link for Alas, A Blog, and adding | |
| 245 | - the following line to the Link Notes section: | |
| 246 | - | |
| 247 | - cats: Pacific Northwest:Cartoonists | |
| 305 | +2. Categories that you set explicitly for each feed using the | |
| 306 | + **Categories** checkbox under **Links --> Syndicated --> Edit**. For | |
| 307 | + example, if you wanted all the posts from Alas, A Blog to be placed in | |
| 308 | + the "Pacific Northwest" category and the "Cartoonists" category (*in | |
| 309 | + addition to* any other categories that they were placed in on Alas, A | |
| 310 | + Blog), you could do this by creating the categories, going to **Links | |
| 311 | + --> Syndicated**, clicking the "Edit" link for Alas, A Blog, and | |
| 312 | + checking those two categories under the checkbox captioned "Categories." | |
| 248 | 313 | |
| 249 | - (The colon separates one category name from the next.) | |
| 250 | - | |
| 251 | 314 | Given the list of category names, FeedWordPress looks for categories in the |
| 252 | 315 | WordPress database with the same name as either (1) the category name, or |
| 253 | 316 | (2) one of the "aliases" listed in the category description. |
| 254 | 317 | |
| 255 | -__Aliases:__ Different often authors use slightly different names for | |
| 256 | -categories that mean the same thing (contributors to Feminist Blogs, for | |
| 257 | -example, used categories including "Feminism", "feministy stuff", "Women's | |
| 258 | -Issues", "Gender Issues", "Gender Equality", and so on). If you want | |
| 259 | -FeedWordPress to treat one category name as a synonym for another, you can | |
| 260 | -do so by creating an "alias" for the category. For example, to make | |
| 261 | -FeedWordPress treat posts that are placed in the category "feministy stuff" | |
| 262 | -as if they had been placed in the category "Feminism", go to Manage --> | |
| 263 | -Categories, find the category "Feminism" and click the "Edit" link for it, | |
| 264 | -and then add the following to the Description field, on a line by itself: | |
| 318 | +__Aliases:__ Different often authors use slightly different names for categories | |
| 319 | +that mean the same thing (contributors to Feminist Blogs, for example, used | |
| 320 | +categories including "Feminism", "feministy stuff", "Women's Issues", "Gender | |
| 321 | +Issues", "Gender Equality", and so on). If you want FeedWordPress to treat one | |
| 322 | +category name as a synonym for another, you can do so by creating an "alias" for | |
| 323 | +the category. For example, to make FeedWordPress treat posts that are placed in | |
| 324 | +the category "feministy stuff" as if they had been placed in the category | |
| 325 | +"Feminism", go to **Manage --> Categories**, find the category "Feminism" and | |
| 326 | +click the "Edit" link for it, and then add the following to the Description | |
| 327 | +field, on a line by itself: | |
| 265 | 328 | |
| 266 | 329 | a.k.a.: feministy stuff |
| 267 | 330 | |
| 268 | -You can add as many aliases as you like. You can also add any other text | |
| 269 | -that you like to the Description without interfering with FeedWordPress's | |
| 270 | -ability to use the aliases. Each alias must be on a line by itself. | |
| 331 | +You can add as many aliases as you like. You can also add any other text that | |
| 332 | +you like to the Description without interfering with FeedWordPress's ability to | |
| 333 | +use the aliases. Each alias must be on a line by itself. | |
| 271 | 334 | |
| 272 | -__Unfamiliar categories:__ By default, if one of the category names that a | |
| 273 | -newsfeed provides is unfamiliar -- that is, if there is not yet any category | |
| 274 | -with that name (or with that name as an alias) in your WordPress database -- | |
| 275 | -then by default FeedWordPress will *automatically create* a new category | |
| 276 | -with that name and place the current post in it. The default behavior can be | |
| 277 | -changed, using either the global settings in Options --> Syndication or the | |
| 278 | -`unfamiliar categories` feed setting (see Feed Settings above), so that | |
| 279 | -unfamiliar categories will not be added to the database. If you choose to | |
| 280 | -disable the creation of new categories, you can also choose whether or not | |
| 281 | -FeedWordPress should syndicate posts that do not match *any* of the | |
| 282 | -categories that are currently in the database. | |
| 335 | +__Unfamiliar categories:__ If one of the category names that a newsfeed provides | |
| 336 | +is *unfamiliar* -- that is, if there is not yet any category in your WordPress | |
| 337 | +database that either has that name, or uses that name as an alias -- then by | |
| 338 | +default FeedWordPress will *automatically create* a new category with that name | |
| 339 | +and place the current post in it. The default behavior can be changed so that | |
| 340 | +unfamiliar categories will *not* be added to the database, using the | |
| 341 | +**Unfamiliar categories** setting, either for *all* feeds (under **Options --> | |
| 342 | +Syndication**) or for *one particular feed* (under **Links --> Syndicated**). | |
| 283 | 343 | |
| 284 | -One of the uses of this feature is filtering posts by category: if you want | |
| 285 | -to your blog to syndicate only the posts in one particular category from a | |
| 286 | -feed that has several categories, you could do so by creating a category by | |
| 287 | -that name, adding the new feed(s), and then adding the following line to the | |
| 288 | -Link Notes section of the feed(s) that you want to filter: | |
| 344 | +If you choose to disable the creation of new categories, either for all feeds or | |
| 345 | +for one particular feed, then you can also choose whether or not FeedWordPress | |
| 346 | +should syndicate posts that do not match *any* of the categories that are | |
| 347 | +currently in the database. This allows you to do some simple filtering of posts | |
| 348 | +by category: if you want to your blog to syndicate only the posts in one | |
| 349 | +particular category from a feed that has several categories, you could do so by | |
| 350 | +creating a category by that name, adding the new feed(s), and then setting | |
| 351 | +**Unfamiliar categories** under **Links --> Syndicated --> Edit** to "don't | |
| 352 | +create new categories and don't syndicate posts unless they match at least one | |
| 353 | +familiar category". | |
| 289 | 354 | |
| 290 | - unfamiliar categories: filter | |
| 355 | +Since only posts in categories that are in your database will be included, and | |
| 356 | +only the category or categories that you wanted posts from has been added to | |
| 357 | +your database, this will filter out all the posts that aren't in the category or | |
| 358 | +categories that you defined ahead of time. (Similarly, you could set up | |
| 359 | +FeedWordPress so that *all* the feeds are filtered by author by creating the set | |
| 360 | +of users named after the authors you want to syndicate, and then setting the | |
| 361 | +default behavior for *all* feeds at **Options --> Syndication**). | |
| 291 | 362 | |
| 292 | -Since only posts in categories that are in your database will be included, | |
| 293 | -and only the category or categories that you wanted posts from has been | |
| 294 | -added to your database, this will filter out all the posts that aren't in | |
| 295 | -the category or categories that you defined ahead of time. (Similarly, you | |
| 296 | -could set up FeedWordPress so that *all* the feeds are filtered by author by | |
| 297 | -creating the set of users named after the authors you want to syndicate, and | |
| 298 | -then setting the default behavior for *all* feeds at Options --> | |
| 299 | -Syndication). | |
| 363 | +If you need a category filter with more complex logic, you can always create a | |
| 364 | +`syndicated_item` filter in PHP (see [Plugin API][]) that manipulates the | |
| 365 | +`['categories']` array of a syndicated item. | |
| 300 | 366 | |
| 301 | -If you need a category filter with more complex logic, you can always create | |
| 302 | -a `syndicated_item` filter in PHP (see Plugin API below) that manipulates | |
| 303 | -the `['categories']` array of a syndicated item. | |
| 304 | - | |
| 305 | 367 | ### Authors ### |
| 306 | 368 | |
| 307 | 369 | Most newsfeeds include information about the author of the items on them. |
| 308 | 370 | (If a feed doesn't, then FeedWordPress will create an author's name based on |
| 309 | -the title of the feed from which the item was taken.) This information is | |
| 310 | -used to determine the WordPress user that the post will be attributed to. | |
| 311 | -Given the name of the author, FeedWordPress looks for authors in the | |
| 312 | -WordPress database with the same name as either (1) their login, (2) their | |
| 313 | -first name, (3) their nickname, (4) their full name, or (5) one of the | |
| 314 | -"aliases" listed in the user's profile. | |
| 371 | +the title of the feed from which the item was taken.) This information is used | |
| 372 | +to determine the WordPress user that the post will be attributed to. Given the | |
| 373 | +name of the author, FeedWordPress looks for authors in the WordPress database | |
| 374 | +with the same name as either (1) their login, (2) their first name, (3) their | |
| 375 | +nickname, (4) their full name, or (5) one of the "aliases" listed in the | |
| 376 | +user's profile. | |
| 315 | 377 | |
| 316 | 378 | __Aliases:__ If there is an author who posts under more than one name (for |
| 317 | 379 | example, one of our contributors at [Feminist Blogs][] posts on several |
| 318 | 380 | different blogs, sometimes using her full name and sometimes using only her |
| 319 | -first name), then you can ensure that FeedWordPress will attribute those | |
| 320 | -posts to the same author by creating "aliases" for the author. For example, | |
| 321 | -to make FeedWordPress treat posts by "Joseph Cardinal Ratzinger" and posts | |
| 322 | -by "Pope Benedict XVI" as having the same author, go to Users --> Authors & | |
| 323 | -Users, click on the "Edit" link for Pope Benedict XVI, and add a line like | |
| 324 | -this to the Profile text: | |
| 381 | +first name), then you can ensure that FeedWordPress will attribute those posts | |
| 382 | +to the same author by creating "aliases" for the author. For example, to make | |
| 383 | +FeedWordPress treat posts by "Joseph Cardinal Ratzinger" and posts by "Pope | |
| 384 | +Benedict XVI" as having the same author, go to **Users --> Authors & Users**, | |
| 385 | +click on the "Edit" link for Pope Benedict XVI, and add a line like this to the | |
| 386 | +Profile text: | |
| 325 | 387 | |
| 326 | - a.k.a.: Joseph Cardinal Ratzinger | |
| 388 | + a.k.a.: Joseph Cardinal Ratzinger | |
| 327 | 389 | |
| 328 | -You can add as many aliases as you like. You can also add any other text | |
| 329 | -that you like to the Profile without interfering with FeedWordPress's | |
| 330 | -ability to use the aliases. Each alias must be on a line by itself. | |
| 390 | +You can add as many aliases as you like. You can also add any other text that | |
| 391 | +you like to the Profile without interfering with FeedWordPress's ability to use | |
| 392 | +the aliases. Each alias must be on a line by itself. | |
| 331 | 393 | |
| 332 | 394 | __Unfamiliar authors:__ By default, if the author named by the newsfeed is |
| 333 | 395 | unfamiliar -- that is, if there is no-one with that name registered in the |
| 334 | -WordPress author's database -- then by default FeedWordPress will | |
| 335 | -automatically create a new user account with the given name and attribute | |
| 336 | -the post to the new user. The default behavior can be changed, using either | |
| 337 | -the global settings in Options --> Syndication or the `unfamiliar author` | |
| 338 | -feed setting (see Feed Settings above), so that posts by unfamiliar authors | |
| 339 | -will either be attributed to a default author (instead of creating a new | |
| 340 | -user account to attribute them to), or filtered out and not syndicated at | |
| 341 | -all. | |
| 396 | +WordPress author's database -- then by default FeedWordPress will automatically | |
| 397 | +create a new user account with the given name and attribute the post to the new | |
| 398 | +user. The default behavior can be changed, using either the global settings in | |
| 399 | +**Options --> Syndication** or the [feed settings][] under **Links --> | |
| 400 | +Syndicated --> Edit**, so that posts by unfamiliar authors will either be | |
| 401 | +attributed to a default author (instead of creating a new user account to | |
| 402 | +attribute them to), or filtered out and not syndicated at all. | |
| 342 | 403 | |
| 343 | -One of the uses of this feature is filtering posts by author: if you want to | |
| 344 | -your blog to syndicate only the posts by one particular author from a feed | |
| 345 | -that has several authors, you could do so by creating a user account with | |
| 346 | -that author's name, adding the new feed(s), and then adding the following | |
| 347 | -line to the Link Notes section of the feed(s) that you want to filter: | |
| 404 | +One of the uses of this feature is to filtering posts by author: if you want to | |
| 405 | +your blog to syndicate only the posts by one particular author from a feed that | |
| 406 | +has several authors, you could do so by creating a user account with that | |
| 407 | +author's name, adding the new feed(s), and then setting **Unfamiliar authors** | |
| 408 | +under **Links --> Syndicated --> Edit** to "don't syndicate the post". Since | |
| 409 | +only posts by authors that are in your database will be included, and only the | |
| 410 | +author that you wanted posts from has been added to your database, this will | |
| 411 | +filter out posts by anyone else on the feeds with that setting. (Similarly, you | |
| 412 | +could set up FeedWordPress so that *all* the feeds are filtered by author by | |
| 413 | +creating the set of users named after the authors you want to syndicate, and | |
| 414 | +then setting the default behavior for *all* feeds at **Options --> | |
| 415 | +Syndication**). | |
| 348 | 416 | |
| 349 | - unfamiliar author: filter | |
| 350 | - | |
| 351 | -Since only posts by authors that are in your database will be included, and | |
| 352 | -only the author that you wanted posts from has been added to your database, | |
| 353 | -this will filter out posts by anyone else on the feeds with that setting. | |
| 354 | -(Similarly, you could set up FeedWordPress so that *all* the feeds are | |
| 355 | -filtered by author by creating the set of users named after the authors you | |
| 356 | -want to syndicate, and then setting the default behavior for *all* feeds at | |
| 357 | -Options --> Syndication). | |
| 358 | - | |
| 359 | -If you need an author filter with more complex logic than this allows, you | |
| 360 | -can always create a `syndicated_item` filter in PHP (see Plugin API below) | |
| 361 | -that manipulates the `['author_name']` or `['dc']['creator']` elements of a | |
| 417 | +If you need an author filter with more complex logic than this allows, you can | |
| 418 | +always create a `syndicated_item` filter in PHP (see [Plugin API][]) that | |
| 419 | +manipulates the `['author_name']` or `['dc']['creator']` elements of a | |
| 362 | 420 | syndicated item. |
| 363 | 421 | |
| 364 | -Special Feed Settings | |
| 365 | -Most feed settings (see Feed Settings above) have no effect on FeedWordPress | |
| 366 | -itself, but can be useful because they can be accessed from templates using | |
| 367 | -the `get_feed_meta()` template function in a post context (see Feed Settings | |
| 368 | -above for an example). However, you can use some feed settings to affect how | |
| 369 | -FeedWordPress will process posts from that particular feed. Currently, these | |
| 370 | -special settings are: | |
| 371 | - | |
| 372 | -- `cats:` a colon-separated list of default categories for any post | |
| 373 | - coming from this feed. So, for example, a this line in its Notes | |
| 374 | - section: | |
| 375 | - | |
| 376 | - cats: computers:web | |
| 377 | - | |
| 378 | - ... will make FeedWordPress place any posts syndicated from that | |
| 379 | - feed in the "computers" and "web" categories. Note that by default, | |
| 380 | - FeedWordPress will place them in those categories *in addition to* | |
| 381 | - any categories that the author of the post put them in on her own | |
| 382 | - website. If you want to place posts from a feed *only* in the | |
| 383 | - categories you explicitly set, then you should use the `cats` | |
| 384 | - setting together with the `unfamiliar categories` setting. (See | |
| 385 | - Categories above and `unfamiliar categories` below for the | |
| 386 | - nitty-gritty.) | |
| 387 | - | |
| 388 | -- `hardcode name: (yes|no)` | |
| 389 | - | |
| 390 | - By default, FeedWordPress updates the value of the Link Name field | |
| 391 | - automatically to reflect the title that is reported by a syndicated | |
| 392 | - feed--so that if one of your contributors changes the title of her | |
| 393 | - website, the change will be reflected on your Contributors list | |
| 394 | - after the next update. If you want to stop this behavior (so that | |
| 395 | - you can set the title of a Contributor link manually -- e.g. so that | |
| 396 | - you can use an abbreviated form for reasons of space), you can | |
| 397 | - change the default behavior for *all* feeds using the settings in | |
| 398 | - Options --> Syndication. If you want to override the default | |
| 399 | - behavior for only *one* feed, you can use the `hardcode name` feed | |
| 400 | - setting. If FeedWordPress updates the title of all feeds by default, | |
| 401 | - but you wish to use a manually-set title for one particular feed, | |
| 402 | - you can add a line like this to the Link Notes section of the feed | |
| 403 | - that you want to manually set the title for: | |
| 404 | - | |
| 405 | - hardcode name: yes | |
| 406 | - | |
| 407 | - Similarly, if FeedWordPress uses your manually-entered titles for | |
| 408 | - all feeds by default, but you wish to use an automatically updated | |
| 409 | - title for one particular feed, you can add a line like this to the | |
| 410 | - Link Notes section of the feed that you want to manually set the | |
| 411 | - title for: | |
| 412 | - | |
| 413 | - hardcode name: no | |
| 414 | - | |
| 415 | - If `hardcode name` is absent, or set to a value other than `yes` or | |
| 416 | - `no`, FeedWordPress will follow the default behavior set under | |
| 417 | - Options --> Syndication. | |
| 418 | - | |
| 419 | -- `hardcode description: (yes|no)` | |
| 420 | - | |
| 421 | - By default, FeedWordPress updates the value of the Link Description | |
| 422 | - field automatically to reflect the tagline or description that is | |
| 423 | - reported by a syndicated feed--so that if one of your contributors | |
| 424 | - changes the tagline for her website, the change will be reflected on | |
| 425 | - your Contributors list after the next update. If you want to stop | |
| 426 | - this behavior (so that you can set the tagline of a Contributor link | |
| 427 | - manually -- e.g. so that you can use it to provide information of | |
| 428 | - another sort or use an abbreviated form for reasons of space), you | |
| 429 | - can change the default behavior for *all* feeds using the settings | |
| 430 | - in Options --> Syndication. If you want to override the default | |
| 431 | - behavior for only *one* feed, you can use the `hardcode description` | |
| 432 | - feed setting. If FeedWordPress updates the description of all feeds | |
| 433 | - by default, but you wish to use a manually-set description for one | |
| 434 | - particular feed, you can add a line like this to the Link Notes | |
| 435 | - section of that particular feed: | |
| 436 | - | |
| 437 | - hardcode description: yes | |
| 438 | - | |
| 439 | - Similarly, if FeedWordPress uses your manually-entered descriptions | |
| 440 | - for all feeds by default, but you wish to use an automatically | |
| 441 | - updated description for one particular feed, you can add a line like | |
| 442 | - this to the Link Notes section of that particular feed: | |
| 443 | - | |
| 444 | - hardcode description: no | |
| 445 | - | |
| 446 | - If `hardcode description` is absent, or set to a value other than | |
| 447 | - `yes` or `no`, FeedWordPress will follow the default behavior set | |
| 448 | - under Options --> Syndication. | |
| 449 | - | |
| 450 | -- `hardcode url: (yes|no)` | |
| 451 | - | |
| 452 | - By default, FeedWordPress updates the value of the Link URI field | |
| 453 | - automatically to reflect the link to the front page of the website | |
| 454 | - you are syndicating, as reported by the syndicated feed--so that if | |
| 455 | - one of your contributors changes the front page of her website (from | |
| 456 | - <http://www.zyx.com/blog/> to <http://www.zyx.com/>, say), the | |
| 457 | - change will be reflected on your Contributors list after the next | |
| 458 | - update. If you want to stop this behavior (so that you can set the | |
| 459 | - human-readable URI that a Contributor link points to manually), you | |
| 460 | - can change the default behavior for *all* feeds using the settings | |
| 461 | - in Options --> Syndication. If you want to override the default | |
| 462 | - behavior for only *one* feed, you can use the `hardcode url` feed | |
| 463 | - setting. If FeedWordPress updates the human-readable URI of all | |
| 464 | - feeds by default, but you wish to use a manually-set URI for one | |
| 465 | - particular feed, you can add a line like this to the Link Notes | |
| 466 | - section of that particular feed: | |
| 467 | - | |
| 468 | - hardcode url: yes | |
| 469 | - | |
| 470 | - Similarly, if FeedWordPress uses your manually-entered URIs for all | |
| 471 | - feeds by default, but you wish to use an automatically updated URI | |
| 472 | - for one particular feed, you can add a line like this to the Link | |
| 473 | - Notes section of that particular feed: | |
| 474 | - | |
| 475 | - hardcode url: no | |
| 476 | - | |
| 477 | - If `hardcode url` is absent, or set to a value other than `yes` or | |
| 478 | - `no`, FeedWordPress will follow the default behavior set under | |
| 479 | - Options --> Syndication. | |
| 480 | - | |
| 481 | -- `hardcode categories: (yes|no)` | |
| 482 | - | |
| 483 | - **This setting has been deprecated.** If set to `yes` it is now | |
| 484 | - treated as equivalent to `unfamiliar categories: default`. (See | |
| 485 | - below.) | |
| 486 | - | |
| 487 | -- `post status: (publish|draft|private)` | |
| 488 | - | |
| 489 | - By default, FeedWordPress sets all new syndicated posts to be | |
| 490 | - published immediately. If you want syndicated posts to have some | |
| 491 | - other status (for example, to hold them as drafts for moderation, or | |
| 492 | - to hold them as private posts), you can change the default behavior | |
| 493 | - using Options --> Syndication. If you want to override the default | |
| 494 | - post status for syndicated posts from *one particular feed*, you | |
| 495 | - can do so using the `post status` feed setting. So, for example, if | |
| 496 | - you have FeedWordPress set to publish new syndicated posts | |
| 497 | - immediately, but you want posts from one particular feed to be put | |
| 498 | - into the drafts pile for moderation, you can do so by placing the | |
| 499 | - following line in the Link Notes section of that feed's Contributor | |
| 500 | - link: | |
| 501 | - | |
| 502 | - post status: draft | |
| 503 | - | |
| 504 | -- `comment status: (open|closed)` | |
| 505 | - | |
| 506 | - By default, FeedWordPress sets all new syndicated posts to be | |
| 507 | - closed for comments--if users want to comment on posts then it's | |
| 508 | - often best for them to comment on the *original* website rather than | |
| 509 | - your syndication site. But if you want syndicated posts to be open | |
| 510 | - for comments, you can change the default behavior for all syndicated | |
| 511 | - posts using the settings in Options --> Syndication. If you want to | |
| 512 | - override the default comment status for *one particular feed*, you | |
| 513 | - can do so using the `comment status` feed setting. So, for example, | |
| 514 | - if you have FeedWordPress set not to open up new syndicated posts | |
| 515 | - for comments, but you want posts from *one particular feed* to be | |
| 516 | - opened for comments, then you can do so by placing the following | |
| 517 | - line in the Link Notes section of that feed's Contributor link: | |
| 518 | - | |
| 519 | - comment status: open | |
| 520 | - | |
| 521 | -- `ping status: (open|closed)` | |
| 522 | - | |
| 523 | - By default, FeedWordPress sets all new syndicated posts *not* to | |
| 524 | - accept PingBack or TrackBack link notifications ("pings"). If you | |
| 525 | - want syndicated posts on your syndication site to accept pings, you | |
| 526 | - can change the default behavior for all syndicated posts using the | |
| 527 | - settings in Options --> Syndication. If you want to override the | |
| 528 | - default ping status for *one particular feed*, you can do so using | |
| 529 | - the `ping status` feed setting. So, for example, if you have | |
| 530 | - FeedWordPress set not to accept pings for new syndicated posts, but | |
| 531 | - you want posts from *one particular feed* to accept pings, then you | |
| 532 | - can do so by placing the following line in the Link Notes section of | |
| 533 | - that feed's Contributor link: | |
| 534 | - | |
| 535 | - ping status: open | |
| 536 | - | |
| 537 | -- `unfamiliar authors: (create|default|filter)` | |
| 538 | - | |
| 539 | - By default, FeedWordPress creates new author accounts whenever it | |
| 540 | - finds a new post that is by an author whose name is not already in | |
| 541 | - the WordPress database, and uses that account for this post and any | |
| 542 | - future posts by an author of that name. FeedWordPress also allows | |
| 543 | - you to attribute posts by unfamiliar authors to a *default* user | |
| 544 | - account (currently, this means the System Administrator account), | |
| 545 | - *instead of* creating a new author, or simply not to syndicate posts | |
| 546 | - by unfamiliar authors (thus only syndicating posts by authors who | |
| 547 | - are already in the database). | |
| 548 | - | |
| 549 | - Which of these FeedWordPress does by default can be set using the | |
| 550 | - settings in Options --> Syndication. You can also override the | |
| 551 | - default behavior for specific feeds by adding the `unfamiliar | |
| 552 | - author` feed setting to the Link Notes section of a feed. For | |
| 553 | - example, to ensure that FeedWordPress filters out posts by | |
| 554 | - unfamiliar authors for one particular feed, add the setting: | |
| 555 | - | |
| 556 | - unfamiliar author: filter | |
| 557 | - | |
| 558 | - To ensure that FeedWordPress assigns posts by unfamiliar authors to | |
| 559 | - the default user account instead of creating a new user account, add | |
| 560 | - the setting: | |
| 561 | - | |
| 562 | - unfamiliar author: default | |
| 563 | - | |
| 564 | - If you changed the default behavior under Options --> Syndication | |
| 565 | - but want to ensure that FeedWordPress creates new author accounts | |
| 566 | - for unfamiliar authors on one specific feed, add the setting: | |
| 567 | - | |
| 568 | - unfamiliar author: create | |
| 569 | - | |
| 570 | - If the setting is anything other than `create`, `default`, or | |
| 571 | - `filter`, FeedWordPress will ignore the setting and follow the | |
| 572 | - default behavior that you specified under Options --> Syndication. | |
| 573 | - | |
| 574 | -- `unfamiliar categories: (create|default|filter)` | |
| 575 | - | |
| 576 | - By default, FeedWordPress creates categories whenever it finds a new | |
| 577 | - post that is placed in categories whose names are not already in the | |
| 578 | - WordPress database. FeedWordPress allows you to change this | |
| 579 | - behavior, so that it will *not* create new category names. It also | |
| 580 | - allows you to choose whether or not posts must match *at least one* | |
| 581 | - familiar category to be syndicated at all. | |
| 582 | - | |
| 583 | - Which of these FeedWordPress does by default can be set using the | |
| 584 | - settings in Options --> Syndication. You can also override the | |
| 585 | - default behavior for specific feeds by adding the `unfamiliar | |
| 586 | - categories` feed setting to the Link Notes section of a feed. For | |
| 587 | - example, to ensure that, when adding new posts from *one particular | |
| 588 | - feed*, FeedWordPress does *not* create new categories, and filters | |
| 589 | - out any posts that don't match *at least one* of the categories that | |
| 590 | - you have already defined, add the setting: | |
| 591 | - | |
| 592 | - unfamiliar categories: filter | |
| 593 | - | |
| 594 | - To ensure that FeedWordPress does *not* create new categories, but | |
| 595 | - *will* still syndicate categories even if they don't match any of | |
| 596 | - the pre-defined categories, add the following to the feed settings: | |
| 597 | - | |
| 598 | - unfamiliar categories: default | |
| 599 | - | |
| 600 | - If you changed the default behavior under Options --> Syndication | |
| 601 | - but want to ensure that FeedWordPress creates new categories for | |
| 602 | - posts from one particular feed, add the setting: | |
| 603 | - | |
| 604 | - unfamiliar categories: create | |
| 605 | - | |
| 606 | - If the setting is anything other than `create`, `default`, or | |
| 607 | - `filter`, FeedWordPress will ignore the setting and follow the | |
| 608 | - default behavior that you specified under Options --> Syndication. | |
| 609 | - | |
| 610 | 422 | Template API |
| 611 | 423 | ------------ |
| 612 | -When activated, FeedWordPress makes the following functions available for | |
| 613 | -use by themes/templates: | |
| 424 | +When activated, FeedWordPress makes the following functions available for use by | |
| 425 | +themes/templates: | |
| 614 | 426 | |
| 615 | -* ``is_syndicated()``: in a post context, returns ``TRUE`` if the post | |
| 616 | - was syndicated from another website, or ``FALSE`` if it was | |
| 617 | - originally posted here | |
| 427 | +* ``is_syndicated()``: in a post context, returns ``TRUE`` if the post was | |
| 428 | + syndicated from another website, or ``FALSE`` if it was originally | |
| 429 | + posted here | |
| 618 | 430 | |
| 619 | -* ``get_syndication_permalink()``: in a post context, returns the URI | |
| 620 | - of the permalink for this post *on the website it was syndicated from* | |
| 431 | +* ``get_syndication_permalink()``: in a post context, returns the URI of | |
| 432 | + the permalink for this post *on the website it was syndicated from* | |
| 621 | 433 | |
| 622 | -* ``the_syndication_permalink()``: in a post context, outputs the | |
| 623 | - value returned by ``get_syndication_permalink()`` | |
| 434 | +* ``the_syndication_permalink()``: in a post context, outputs the value | |
| 435 | + returned by [``get_syndication_permalink()``][get_syndication_permalink] | |
| 624 | 436 | |
| 625 | -* ``get_syndication_source_link()``: in a post context, returns the | |
| 626 | - URI of the front page (*not* the feed) of the website this post was | |
| 627 | - syndicated from | |
| 437 | +* ``get_syndication_source_link()``: in a post context, returns the URI of | |
| 438 | + the front page (*not* the feed) of the website this post was syndicated | |
| 439 | + from | |
| 628 | 440 | |
| 629 | -* ``the_syndication_source_link()``: in a post context, outputs the | |
| 630 | - URI returned by ``get_syndication_source_link()`` | |
| 441 | +* ``the_syndication_source_link()``: in a post context, outputs the URI | |
| 442 | + returned by | |
| 443 | + [``get_syndication_source_link()``][get_syndication_source_link] | |
| 631 | 444 | |
| 632 | 445 | * ``get_syndication_source()``: in a post context, returns the |
| 633 | 446 | human-readable title of the website that a syndicated post was |
| 634 | 447 | syndicated from |
| @@ -634,36 +446,36 @@ | ||
| 634 | 446 | human-readable title of the website that a syndicated post was |
| 635 | 447 | syndicated from |
| 636 | 448 | |
| 637 | 449 | * ``the_syndication_source()``: in a post context, outputs the value |
| 638 | - returned by ``get_syndication_source()`` | |
| 450 | + returned by [``get_syndication_source()``][get_syndication_source] | |
| 639 | 451 | |
| 640 | -* ``get_syndication_feed():`` in a post context, returns the URI of | |
| 641 | - the feed (*not* the front page) that this post was syndicated from | |
| 452 | +* ``get_syndication_feed():`` in a post context, returns the URI of the | |
| 453 | + feed (*not* the front page) that this post was syndicated from | |
| 642 | 454 | |
| 643 | 455 | * ``the_syndication_feed()``: in a post context, outputs the value |
| 644 | - returned by ``get_syndication_feed()`` | |
| 456 | + returned by [``get_syndication_feed()``][get_syndication_feed] | |
| 645 | 457 | |
| 646 | -* ``get_feed_meta($key)``: in a post context, returns the value, if | |
| 647 | - any, of the feed setting ``$key`` for the feed that this post was | |
| 648 | - syndicated from | |
| 458 | +* ``get_feed_meta($key)``: in a post context, returns the value, if any, | |
| 459 | + of the feed setting ``$key`` for the feed that this post was syndicated | |
| 460 | + from | |
| 649 | 461 | |
| 650 | 462 | By default, FeedWordPress also places a filter on the standard functions |
| 651 | -``get_permalink()`` and ``the_permalink()`` that substitutes the URI | |
| 652 | -returned by ``get_syndication_permalink()`` for the URI generated by | |
| 653 | -WordPress. This means that by default the permalinks listed on your website | |
| 654 | -and in your newsfeed will link to the location of the posts on the source | |
| 655 | -website, *not* to their location on your website. You can switch this | |
| 656 | -behavior on or off at Options --> Syndication in the WordPress Dashboard. | |
| 463 | +``get_permalink()`` and ``the_permalink()`` that substitutes the URI returned by | |
| 464 | +[``get_syndication_permalink()``][get_syndication_permalink] for the URI | |
| 465 | +generated by WordPress. This means that by default the permalinks listed on your | |
| 466 | +website and in your newsfeed will link to the location of the posts on the | |
| 467 | +source website, *not* to their location on your website. You can switch this | |
| 468 | +behavior on or off at **Options --> Syndication** in the WordPress Dashboard. | |
| 657 | 469 | |
| 658 | -### Plugin API ### | |
| 659 | - | |
| 660 | -FeedWordPress creates five hooks through the WordPress plugin architecture | |
| 661 | -that you can plug in to using PHP WordPress plugins, to supplement ordinary | |
| 662 | -FeedWordPress behavior, or to filter posts according to criteria that you | |
| 663 | -set. The hooks are the action ``feedwordpress_update``, the action | |
| 664 | -``feedwordpress_check_feed``, the action ``feedwordpress_update_complete``, | |
| 665 | -the filter ``syndicated_item``, the filter ``syndicated_post``, the action | |
| 470 | +Plugin API | |
| 471 | +---------- | |
| 472 | +FeedWordPress creates five hooks through the WordPress plugin architecture that | |
| 473 | +you can plug in to using PHP WordPress plugins, to supplement ordinary | |
| 474 | +FeedWordPress behavior, or to filter posts according to criteria that you set. | |
| 475 | +The hooks are the action ``feedwordpress_update``, the action | |
| 476 | +``feedwordpress_check_feed``, the action ``feedwordpress_update_complete``, the | |
| 477 | +filter ``syndicated_item``, the filter ``syndicated_post``, the action | |
| 666 | 478 | ``post_syndicated_item``, and the action ``update_syndicated_item``. |
| 667 | 479 | |
| 668 | 480 | For more information, see <http://projects.radgeek.com/feedwordpress/api>. |
| 669 | 481 | |
| @@ -668,28 +480,30 @@ | ||
| 668 | 480 | For more information, see <http://projects.radgeek.com/feedwordpress/api>. |
| 669 | 481 | |
| 670 | 482 | License |
| 671 | 483 | ------- |
| 672 | -The FeedWordPress plugin is copyright (c) 2005 by Charles Johnson. It uses | |
| 673 | -code derived or translated from: | |
| 484 | +The FeedWordPress plugin is copyright (c) 2005 by Charles Johnson. It uses code | |
| 485 | +derived or translated from: | |
| 674 | 486 | |
| 675 | -- [wp-rss-aggregate.php][] by [Kellan Elliot-McCrea](mailto:kellan@protest.net) | |
| 676 | -- [HTTP Navigator 2][] by [Keyvan Minoukadeh](mailto:keyvan@k1m.com) | |
| 677 | -- [Ultra-Liberal Feed Finder][] by [Mark Pilgrim](mailto:mark@diveintomark.org) | |
| 487 | +- [wp-rss-aggregate.php][] by [Kellan Elliot-McCrea](kellan@protest.net) | |
| 488 | +- [MagpieRSS][] by [Kellan Elliot-McCrea](kellan@protest.net) | |
| 489 | +- [HTTP Navigator 2][] by [Keyvan Minoukadeh](keyvan@k1m.com) | |
| 490 | +- [Ultra-Liberal Feed Finder][] by [Mark Pilgrim](mark@diveintomark.org) | |
| 678 | 491 | |
| 679 | 492 | according to the terms of the [GNU General Public License][]. |
| 680 | 493 | |
| 681 | -This program is free software; you can redistribute it and/or modify it | |
| 682 | -under the terms of the [GNU General Public License][] as published by the | |
| 683 | -Free Software Foundation; either version 2 of the License, or (at your | |
| 684 | -option) any later version. | |
| 494 | +This program is free software; you can redistribute it and/or modify it under | |
| 495 | +the terms of the [GNU General Public License][] as published by the Free | |
| 496 | +Software Foundation; either version 2 of the License, or (at your option) any | |
| 497 | +later version. | |
| 685 | 498 | |
| 686 | -This program is distributed in the hope that it will be useful, but WITHOUT | |
| 687 | -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
| 688 | -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
| 689 | -more details. | |
| 499 | +This program is distributed in the hope that it will be useful, but WITHOUT ANY | |
| 500 | +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | |
| 501 | +PARTICULAR PURPOSE. See the GNU General Public License for more details. | |
| 690 | 502 | |
| 691 | 503 | [wp-rss-aggregate.php]: http://laughingmeme.org/archives/002203.html |
| 504 | + [MagpieRSS]: http://magpierss.sourceforge.net/ | |
| 692 | 505 | [HTTP Navigator 2]: http://www.keyvan.net/2004/11/16/http-navigator/ |
| 693 | 506 | [Ultra-Liberal Feed Finder]: http://diveintomark.org/projects/feed_finder/ |
| 507 | + | |
| 694 | 508 | [GNU General Public License]: http://www.gnu.org/copyleft/gpl.html |
| 695 | 509 | |