Automatically Add RSS Aggregated Feeds as Posts to Wordpress 2.2
Here is a how to showing how to add RSS Feed Aggregation to Wordpress 2.2.
Required: Wp-o-matic, Wordpress-2.2
First, let us not find out what kind of fun it is to replace work without a backup.
About the wp-o-matic 0.2 beta archive. It was made on a mac and I had to use a program other than the built in Windows XP Zip Folders to extract the archive entirely. WinRar extracted without difficulty but I still had to erase the extra .DS_Store files and __MACOSX directory.
Wp-o-matic version 0.2 beta had a problem in the mysql field description. This was my first stumbling block. Fix this first even if your tables use the default wp_ prefix.
Now locate the directory your theme is stored in and open index.php. Somewhere in index.php you should find <?php the permalink() ?> next to ‘read more’, depending on the theme you use. Change this to say:
<?php $a_wprss_link=get_post_custom_values(”wprss_link”); if(!empty($a_wprss_link)){echo $a_wprss_link[0];}else{the_permalink();} ?>
This uses the get_post_custom_values() to pull the link data from the post created by Wp-o-matic. If there is nothing in this field then the regular permalink is used.
Good. If you haven’t already uploaded the wpomatic folder to your plugin directory do that now.
Turn on the plugin. If your database tables do not start with wp_ and you get an error here reguarding the database, read the part above that you skipped over a little to fast. Other errors are likely directory permission settings. Try chmodding to 777.
Then go to Options/wp-o-matic and enter in a feed to test. If all goes well you have a working RSS Aggregation system.
Now the interface does not let you enter complicated urls like http://news.search.yahoo.com/news/rss;_ylt=A9j8eu.hUnlGwfcAtRfQtDMD; ylu=X3oDMTA3MTBsZGZsBHNlYwNhZG0-?ei=UTF-8&p=chrysler &c=&eo=UTF-8, so if you have phpMyAdmin installed use it to load the url. Wp-o-matic will then be able to pull feeds where it wasn’t before.
If you want would like to add a target=_blank for outside links only then enter the following inside the <a href> defination next to the code we entered above. Note the code we entered above will be sourounded by quotes so you need to paste this outside of those quotes so this doesn’t become part of the link.
<?php $a_wprss_link=get_post_custom_values(”wprss_link”); if(!empty($a_wprss_link)){echo ‘target=_blank’;} ?>
The idea here is to always open rss links in a seperate window and open internal links in the same window.
Let me know if this helps.