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