WordPress Posts =============== Version 0.22 Copyright (c) 2010 Ian Goldstein - All Rights Reserved http://www.iangoldstein.com DESCRIPTION ----------- This utility will display a set of WordPress Posts accessed using the RSS Feed form a WordPress blog. Formatting as well as caching of the retrieved RSS can be set as needed. FEATURES -------- - Uses URL to access any WordPress RSS feed - Can access multiple feeds - Can access blogs on multiple servers - Can convert WordPress [...] text in abstracts to meaningful text and/or link - Uses cache to store RSS feed data to minimize overhead and improve performance - Extremely simple installation, configuration and implementation - Customizable date and time formatting - Performs html entity conversion and utf8 decoding for output text - Complete customization of caching, output, etc. LICENSE ------- Hmmm... this needs to be thought out... DONATIONS --------- If you or your company make regular use of this software, please consider supporting Open Source development by donating to the authors or inquire about hiring them to consult on other projects. Donation links for the author(s) are as follows: Ian Goldstein https://sourceforge.net/donate/index.php?user_id=2543214 REQUIREMENTS ------------ The wpp.php system relies upon PHP, and thus you must be using .php files for your pages to use it. It has been written and tested under PHP 5, although it should work the same under PHP 4. INSTALLATION ------------ The wpp.php file should be installed in an accesssible directory on your webserver, so that it can be included by your pages when needed. Simple, huh? CONFIGURATION ------------- A configuration file named wpp_config.php can optionally be setup in the same directory as the wpp.php file. A sample is provided named wpp_config.php.sample, which can be copied as wpp_config.php and editted as needed. In the configuration file, any settings which need to differ from the default values should be adjusted and uncommented. A configuration file is not required, and if it does not exist, all default settings will be used. Alternatively, any configuration setting can be overridden by defining a constant named 'WPP_' plus the uppercase version of the setting name. For example, to set the cache_time configuration value to 180 using a constant, include the following in your page... Any such definitions must be done BEFORE including the wpp.php system, and will take precedence over any default values and any values in wpp_config.php. USAGE ----- In any page where you wish to include WordPress posts, you must first include the wpp.php file. For example, add this to your page... If wpp.php was installed in a different path than the one your page is in, be sure to specify it in the include statement as part of the path to wpp.php. At the point where you wish to insert the WordPress posts, include a call to the wpp() function, passing the appropriate parameters for the posts you want displayed. For example, the following would display the latest 3 news entries... Alternatively, you can call the get_wpp() function to retreive the posts as an array and handle all output and additional processing in your own PHP code. See the wpp() and get_wpp() function reference below for complete parameter details. wpp() This function will print the corresponding posts to the html output stream. If there are no posts, nothing will be printed. Syntax: wpp (feed, [count], [output], [separator], [config]) Parameters: feed Full URL to the RSS feed. This is a required parameter. count Number of posts to print. If not passed, or set to 0, prints all. output This is the text to output for each post. It can include HTML codes as well as insertion variables, which will be replaced with their corresponding values. If this value is not passed, or set to NULL it defaults to... {title} Insertion variables are in the form {var} and include... {title} post title {abstract} short synopsis from post {date} date of post {time} time of post {timestamp} timestamp of post {author} author of post {categories} delimited categories and/or tags {link} link to blog entry {comments} number of comments separator This text is output between posts. If not passed or NULL, it defaults to...
config This optional parameter provides the ability to override most configuration settings. It must be passed as an associative array of configuration settings along with their alternative values. For example, to use a cache expiration time of 120 seconds, you would pass this parameter as... array('cache_time' => 120) Multiple settings can be specified, and most configuration settings can be overridden. Global settings which cannot be overridden include... cache_path, cache_chmod, decode_utf8, convert_entities get_wpp() This function will return the corresponding posts as an array Syntax: get_wpp (feed, [count], [config]) --> posts Parameters: feed Full URL to the RSS feed. This is a required parameter. count Number of posts to return. If not passed, or set to 0, all are returned. config This optional parameter provides the ability to override most configuration settings. It must be passed as an associative array of configuration settings along with their alternative values. For example, to use a cache expiration time of 120 seconds, you would pass this parameter as... array('cache_time' => 120) Multiple settings can be specified, and most configuration settings can be overridden. Global settings which cannot be overridden include... cache_path, cache_chmod, decode_utf8, convert_entities Returns: An array of posts is returned. If there are no posts an empty array is returned. Otherwise, the array will contain a lists of posts, where each post is an associative array containing... title post title (text) abstract short synopsis from post (text) date date of post (text) time time of post (text) timestamp timestamp of post (text) postdate Unix timestamp of post (integer) author author of post (text) categories delimited categories and/or tags (text) link link to blog entry (text) comments number of comments (integer) TO DO ----- CHANGE LOG ----------