=== Plugin Name ===
Contributors: kambiz.k
Requires at least: 2.5.0
Tested up to: 3.5.1
Stable tag: 1.3.2

Defines a fully customizable sidebar widget and shortcode to show the most recent phpBB posts.

== Description ==

This plugin defines a sidebar widget and a shortcode [phpbb] to show the most recent posts of phpBB 2.x or 
phpBB 3.x forums.

The plugin submits only one SQL query to gather all the required information from phpBB. Your phpBB 
tables can be located on the same database of your WordPress tables, another database, or even another host.

The look of both widget and shortcode are fully customizable. This plugin uses two templates to display 
forum's posts, one for new topics and another for replies. So that, you have complete freedom to define 
your own display format for phpBB posts. Besides that, you can specify posts on which phpBB forum should 
or should not be listed.

If you have more than one forum, you can use multiple instances of phpBB widget on your sidebar.

== Installation ==

1. Upload wp-recent-phpbb.zip to your WordPress plugins directory, usually `wp-content/plugins/` and unzip the file.  
   It will create a `wp-content/plugins/wp-recent-phpbb/` directory.
   
2. Activate WP-Recent-phpBB plugin through the 'Plugins' menu in WordPress.

== Frequently Asked Questions ==

N/A

== Screenshots ==


== Usage ==

To use WP-Recent-phpBB plugin as a sidebar widget:

1. Activate WP-Recent-phpBB plugin. 

2. Go to 'Design -> Widgets'. 

3. You can add 'phpBB Recent Posts' widget by clicking on the 'Add' link besides it.

4. Click 'Save Changes', but it's not yet done. Because more than one instance of this widget can be used on 
   one sidebar, if you try to configure it before saving, the widget may disappear. I guess it is a WordPress 
   bug because the same happens for Text and RSS widgets.

5. After adding the widget, you must configure it by clicking on the 'Edit' link beside it.

  5.a. If your WordPress and phpBB tables are on different databases, you must set the proper values for the 
       following fields:
       
          - DB Host: It's the address of your MySQL server. In most cases, 'localhost' is the valid value.
          - DB Name: This is the name of your MySQL database.
          - DB User: This is your MySQL user name.
          - DB Password: It's password of your MySQL user.
          
  5.b. Enter prefix of phpBB tables in 'Table Prefix' field. As default, 'phpbb_' is the table prefix of phpBB tables.
  
  5.c. It is very important to use 'phpBB URL' field to specify path to your bulletin board, otherwise the widget cannot 
       generate correct links to your bulletin board.
       
  5.d. Use 'Number of posts to show' field to specify how many posts should be displayed on the widget.
  
  5.e. This widget uses two templates for formating phpBB posts. One template is for posts which create a new topic 
       and is specified by 'Template for new topic' field. The other template is for posts which are in response of 
       other posts and is specified by 'Template for reply'. If you want to ignore posts in each of these categories, 
       leave the appropriate field as blank. You can use HTML and following template variables to format each post:
       
          - {POST_URL}: URL of the post
          - {POST_EXCERPT}: Excerpt of the post (the first 20 words of the post's content)
          - {POST_DATE}: Date of the post (date format is determined according to your WordPress settings)
          - {POST_TIME}: Time of the post (time format is determined according to your WordPress settings)
          - {POST_SINCE}: Time elapsed since publishing the post
          - {TOPIC_URL}: URL of the post's topic
          - {TOPIC_TITLE}: Title of the post's topic
          - {FORUM_URL}: URL of the post's forum
          - {FORUM_TITLE}: Title of the post's forum
          - {USER_URL}: URL of the poster's profile
          - {USER_NAME}: The poster's user name
          
  5.f. You can use 'Forums to include' field to provide a comma separated list of forum IDs that you want to list 
       their recent posts only.
       
  5.g. Alternatively, you can use 'Forums to exclude' field to provide a comma separated list of forum IDs that you
       don't want their posts appear in the list.
       
  5.h. You can use 'Users to floow' field to provide a comma separated list of usernames that you want to list 
       only their recent posts only.
       
  5.i. Alternatively, you can use 'Forums to exclude' field to provide a comma separated list of forum IDs that you 
       don't want their posts appear in the list.

  5.j. You can ask the widget to show a link to your bulletin board using the appropriate checkbox. 
  
  5.k. Optionally you can customize the link to your bulletin board using 'Title of link to phpBB' field.

  5.l. You can also indicate on which pages the widget should not be visible.
  
6. Click 'Save Changes'.

7. If you have more phpBB bulletin boards to display on your sidebar, add another 'phpBB Recent Posts' widget and 
   configure it as above.

To use WP-Recent-phpBB plugin as shortcode in your pages or posts:

1. Activate WP-Recent-phpBB plugin. 

2. Type [phpbb] in a content area of a page or post. You can also use shortcode attributes to customize the 
   recent phpBB posts. For example the following shortcode shows the most two recent posts from phpBB.

   [phpbb link="http://www.example.com/forum/" limit="2"]

   Here is the list of available attributes:

      db_host:
      Host name of phpBB database server.
      Defaults to Wordpress database host. 

      db_name:
      Database name of phpBB database.
      Defaults to Wordpress database name.

      db_user:
      User name of phpBB database. 
      Defaults to Wordpress database user name. 

      db_pass:
      Password of phpBB database. 
      Defaults to Wordpress database password. 

      table_prefix:
      Prefix of phpBB table names.
      Defaults to 'phpbb_'. 

      link:
      URL to the phpBB bulletin board.
      Defaults to none.

      limit:
      Maximum number of phpBB posts to display.
      Defaults to 5. 

      template_new:
      The template for showing the new posts.
      See item 5.5 of the widget installation for details.

      template_reply:
      The template for showing the reply posts.
      See item 5.5 of the widget installation for details.

      forum_include:
      Comma separated list of forum IDs to include in the output.
      Defaults to all forums. 

      forum_exclude:
      Comma separated list of forum IDs to exclude from the output.
      Defaults to none. 

      user_include:
      Comma separated list of usernames to include in the output.
      Defaults to all forums. 

      user_exclude:
      Comma separated list of usernames to exclude from the output.
      Defaults to none. 

      show_link:
      Whether the link to the phpBB bulletin board should be displayed ('1') or not ('0').
      Defaults to '1'.

      link_title:
      Title of the link to the phpBB bulletin board if show_link attribute is on.
      
3. Publish/Save your post or page.
   
== Infos ==

If you have any comment or question regarding this plugin, please visit the plugin's page at 
http://www.delphiarea.com/products/wordpress-plugins/wp-recent-phpbb/

Credits:
  Jan Moeller <http://www.casalogic.dk>