“Special Recent Posts FREE Edition” Documentation


“Special Recent Posts FREE Edition”

Created: 29/08/2012
By: Luca Grandicelli
Email: lgrandicelli@gmail.com
Twitter: @lucagrandicelli

Thank you for downloading the Special Recent Posts FREE Edition plugin. If you have any questions that are beyond the scope of this help file, please feel free to email me via my contact form page here. Thanks so much!


Table of Contents

  1. Introduction
  2. Requirements
  3. Installation
  4. Upgrade Notes
  5. How the Special Recent Posts plugin works
  6. Configuration
  7. Using Shortcodes/PHP Code
  8. F.A.Q
  9. Translating
  10. Support

A) HTML Introduction - top

Special Recent Posts FREE Edition is a very powerful plugin/widget for WordPress which displays your recent posts with thumbnails. You can dynamically re-size thumbnails to any desired dimension, drag multiple widget instances and configure each one with its specific settings. You can also use custom PHP code or shortcodes to insert the widget in any part of your theme.


B) Requirements - top

These are the main required settings:


C) Installation - top

Manual installation is easy and takes fewer than five minutes.

  1. Download the plugin, unpack it and upload the 'special-recent-posts' folder to your wp-content/plugins directory.
  2. Activate the plugin through the 'Plugins' menu in WordPress.
  3. Check for correct permissions (0775 or 0777) on cache folder under special-recent-posts/cache
  4. Go to Settings > Special Recent Posts FREE Edition to configure the basic options.
  5. On the widgets panel, drag the Special Recent Posts widget onto one of your sidebars and configure its specific settings.
  6. You're done. Enjoy.

D) Upgrade Notes - top

Since Special Recent Posts FREE Edition v 1.9.6 most of the logic has been completely redesigned and rewritten. So if you're upgrading from a version prior to 1.9.6, many of your old settings might be overwritten.

SO PLEASE MAKE SURE YOU MAKE A BACKUP OF YOUR OLD CUSTOM CSS AND TAKE NOTE OF YOUR WIDGET SETTINGS!

If the upgrade process fails or if you're experiencing troubles with the plugin behaviour, please consider to completely uninstall the previous version and then re-install Special Recent Posts FREE Edition from scratch. Anyway the plugin will try to do its best to preserve your old widget settings.

NOTES FOR MANUAL UPGRADE
If you wish to manually upgrade to version 1.9.6, please read the following steps:
  1. Deactivate the old version in the Wordpress Plugin panel
  2. Delete the old version in the Wordpress Plugin panel
  3. Upload the new special-recent-posts folder to the Wordpress plugin directory under wp-content/plugins
  4. Refresh the Wordpress plugin page
  5. Activate the new version.

E) How Special Recent Posts plugin works - top

Special Recent Posts basically retrieves a list of recent posts assigning a thumbnail to each entry. The thumbnail generation process is one of the key features that makes SRP “special”. The image re-size process is done completely on-the-fly and generated thumbnails are stored in a special cache folder for later display and less load on server.

For first, SRP tries to fetch a post featured image. If this exists, it will be displayed. If this doesn't, then the plugin will try to fetch the first image from the post content. If this step fails too, a custom no-image thumbnail will be displayed. If you're having troubles with thumbnail display, please read the F.A.Q

Note: Caching is mandatory. This means that if the cache folder doesn't exists or is unwritable, the whole plugin won't work.


F) Configuration - top

The Basic Settings
These settings are available under the Settings->Special Recent Posts FREE Edition panel. This is the main place where global options apply to the whole plugin.

The Widget Settings
This is the core of the Special Recent Posts FREE Edition plugin. Here you can configure quite everything about your recent posts. The widget panel is divided into several sections, where each one take care of different settings. Notes: In the plugin folder there is a configuration file called srp-config.php. PLEASE DO NOT MODIFY THIS FILE DIRECTLY.

G) Using Shortcodes/PHP Code - top

This is a great feature that lets users to insert the Special Recent Posts FREE Edition widget in all non-widget handled parts of their Wordpress theme.

PHP Mode Using PHP code is very simple. Just put these few lines of code where you'd like the widget to appear:
<?php
if(function_exists('special_recent_posts')) {
	special_recent_posts($args);
}
?>
where $args is an array of the following options:
// Change widget title (default: 'special recent posts')
'widget_title' => text

// Display thumbnails? (default: 'yes')
'display_thumbnail' => 'yes' | 'no'

// Hide widget title? (default 'no')
'widget_title_hide' => 'no'

// Set thumbnail width (default 100)
'thumbnail_width' => digit

// Set thumbnail height (default 100)
'thumbnail_height' => digit

// Link thumbnails to post? (default: 'yes')
'thumbnail_link' => yes' | 'no'

// Set thumbnail rotation mode (default 'no')
'thumbnail_rotation' => 'no|cw|ccw'

// Set default displayed post types (default: 'post')
'post_type' => 'post' | 'page

// Set default displayed post status (default: 'publish')
'post_status' => 'publish' | 'private' | 'inherit' | 'pending' | 'future' | 'draft' | 'trash'

 // Set max number of posts to display (default: 5)
'post_limit' => digit

// Set displayed post content type (default: 'content')
'post_content_type' => 'content' | 'excerpt'

// Set displayed post content length (default: 100)
'post_content_length' => digit

// Set displayed post content length mode (default: 'chars')
'post_content_length_mode' => chars|words|fullexcerpt

// Set displayed post title length (default 100)
'post_title_length' => digit

// Set displayed post title length mode (default: 'chars')
'post_title_length_mode' => chars|words|fulltitle

// Set post order (default: 'DESC')
'post_order' => 'DESC' | 'ASC

// Set post offset (default: 0)
'post_offset' => digit

// Set random mode (default: 'no')
'post_random' => 'no' | 'yes'

// Hide current post from visualization when in single post view? (default: 'yes')
'post_current_hide' => 'yes' | 'no'

// Set layout content mode (default: 'titleexcerpt')
'post_content_mode' => 'titleexcerpt' | 'titleonly'

// Display post date? (default: 'yes')
'post_date' => 'yes' | 'no'

// Filter posts by including post IDs (default: none)
'post_include' => comma separated list of digits

// Exclude posts from visualization by IDs (default: none)
'post_exclude' => comma separated list of digits

// Filter post by Custom Post Type (default: none)
'custom_post_type' => comma separated list of custom post types

// Set the default 'No posts available' text (default: 'No posts available')
'noposts_text' => text

// Set allowed tags to display in the excerpt visualization.
'allowed_tags' => blankspace separated list of html tags

// Set string break text (default: [...])
'string_break' => text

// Set path to optional image string break.
'image_string_break' => text

// Link (image)string break to post?
'string_break_link'  => 'yes' | 'no

// Set post date format. (default: 'F jS, Y')
'date_format' => text

// Filter posts by including categories IDs. (default: none)
'category_include' => comma separated list of digits

// When filtering by caqtegories, switch the widget title to a linked category title (default: 'no')
'category_title' => 'no', 'yes'

// Add the 'no-follow' attribute to all widget links.
'nofollow_links' => 'no' | 'yes'

Example: Show last 5 posts in random order filtering by category IDs 3 and 7. (PHP mode)

<?php
// Defining widget options.
$args = array(
	'post_limit'       => 5,
	'post_random'      => 'yes',
	'category_include' => 3, 7
);

// Function call.
special_recent_posts($args);
?>
NOTE: Versions prior to 1.9.6 make use of a different notation for parameters, with a prefix like this: SRP_ All the old parameteres will be reckognized by the new version for compatibility reasons, but i suggest you to switch to the new names.


H) F.A.Q - top

How do i edit the CSS?

The stylesheet is located at wp-content/plugins/special-recent-posts/css/css-front.css

Plugin shows no thumbnails
This issue might be caused by several problems. Check the following list.

Category/Post filtering isn't working
In order to properly filter posts by categories, you must provide a numeric value which is the Category ID. Every Wordpress category has an unique Identification number, and this can be found doing the following steps:

  1. Go in the Posts->Categories panel
  2. Mouse over a category name.
  3. Look at the status bar at the very bottom of your browser window. There you will find a long string containing a parameter called tag_ID and its following value.
  4. Take note of that number, which is the relative Category ID to insert in the Special Recent Posts FREE Edition filtering panel.
NOTE: Please remember that this procedure is also valid for post filtering.


H) Translating - top

Special Recent Posts FREE Edition makes use of the common gettext system for translating content, which is the same used by Wordpress. If you wish to translate the Special Recent Posts FREE Edition plugin to your language, please consider the following steps:

  1. Download and install POEDIT at http://www.poedit.net/
  2. Launch POEDIT and click on File → New Catalog
  3. On the Project Info tab, fill in only the first 4 fields.
  4. On the Paths tab, fill in the first text field with the physical path to the special recent posts FREE Edition folder, inside the WP plugin folder. (Example: C:\mywordpress\wp-content\plugins\special-recent-posts\)
  5. On the Keywords tab, click the button called “new item” and insert the “_e” (without quotes) string
  6. Do the same for the “__” string (without quotes)
  7. Click Ok.
  8. Then a list of all English strings found is prompted.
  9. Translate each string to your desired language.
  10. Save the catalog as srplang-YOUR-LOCALE-CODE.mo (Example, for italian: srplang-it_IT.mo)
  11. Mail me the two generated files at lgrandicelli@gmail.com specifying the language you've used.
If you're having issues or for further details on how properly translate gettext content, please refer to the official Wordpress documentation here, or do a Google search about it.

H) Support - top

For any support or suggestion please mail me at lgrandicelli@gmail.com, or follow me on Twitter at @lucagrandicelli I'll try to reply as soon as possible.
Sincerely, Luca Grandicelli