WordPress Posts =============== Version 0.24 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 caching 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. To support caching, a writable directory is needed. 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? UPGRADING --------- The new wpp.php file can be copied over the old file. Compare wpp_config.sample.php against your existing config file for any new or changed options, and adjust your config file as needed. 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.sample.php, 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 a required file, and if it does not exist, default settings will be used for all options. 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. RSS DATA CACHING ---------------- If you want to enable caching of the rss data feeds you will need to create a directory to hold cached data. This directory must be writable by the webserver processes that will be running when the wpp.php code is executed. The directory does not need to be located within your webserver root directory, but it must be accessible during runtime. The path to it is setup in the configuration file and is set as either an absolute path, or a path relative to the location of the wpp.php file. Be sure to set the proper permissions for this directory so that it can be written to at runtime. A full discussion of permissions are beyond the scope of this document, but on a Unix/Linux/BSD system permissions of 0700 would limit access to the cache directory to only the owner of those files. If your webserver does not run php code as the owner, you may require permissions of 0750 or perhaps an even more permissive mode such as 0755. It is recommended you use a more restrictive permission such as 0700 or 0750 so that the files are not writable by others. 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. For example, if installed in a directory called 'wpp', use this... 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, as well as several other functions provided by the WPP Utility. See REFERENCE for a complete descriptions of the available functions and their syntax. TO DO ----- - Licensing terms - Write-up on www.iangoldstein.com with dedicated page, downloads, etc. - Command Line Interface (CLI) for use with non-php Scripting? - Access to WPP via object orientation - Feed Filtering - Additional debugging information? CHANGE LOG ---------- v0.24 - Improved implementation of "Read More" text addition to post abstracts - Split readmore_text into readmore_ellipsis/readmore_text for better output control - Avoids adding ellipsis if already present at end of abstract - Special handling if ellipsis is ..., …, … or … - Added readmore_mode to allow disabling or forced inclusion of "Read More" text - Added abstract_remove to allow remove of Plugin text from abstracts - Added wpp_version() function to return current WPP Utility version - Added REFERENCE documentation file v0.23 - Optimized post retrieval if RSS feed is referenced multiple times - Properly handles rss feeds with no results - Treats invalid rss feeds/urls as if no results - Added num_wpp() function to return number of posts - Added exist_wpp() function to return true/false if posts exist - Added optional text to print if no posts for wpp() function - Additional documentation regarding caching and cache directory - Added wpp_info() to display current settings for debugging - Added upgrading information in README documentation - Minor bug fixes v0.22 - Added get_wpp() function to return posts as an array - Removed support for named data configuration files - Retrieves number of comments for each post - Retrieves all categories/tags for each post - Added configuration option to set delimiter text when multiple categories/tags exist - Added ability to return categories as an array when calling get_wpp() - Added 'wpp__' as prefix to all internal functions to avoid any conflict with other code. - Restructured all internal functions - Added comments for all functions - Added README documentation file - Moved all configuration settings into a single wpp__config global variable - Configuration variables are now commented out in wpp_config.php, unless different than defaults - Adjust some configuration variable names for better clarity - Configuration variables no longer need "wpp_" prefix - Changed default readmore_text configuration setting for improved output - Calls to wpp() and get_wpp() can now override most config options - Added advanced option to disable UTF8 decoding - Added advanced option to disable HTML entity conversion v0.21 - Minor bug fixes v0.20 - First release v0.10 - Non-production/testing