=== Publish2 === Tags: link journalism, JSON, widgets Contributors: danielbachhuber Requires at least: 2.5 Tested up to: 2.7 Stable Tag: 1.0 Displays link journalism from Publish2 on your WordPress-powered website == Description == The Publish2 Wordpress plugin allows you to publish your link journalism, links from a Newsgroup, or content from the Newswire anywhere you'd like on your WordPress-powered website. Features: * Add links from your link journalism, Newsgroups, or the Newswire to your WordPress blog. * Display links in a widget installed in your sidebar, as a list on any page, or by using anywhere you can use PHP in your WordPress Theme. * Customize the number of links that display. * Choose which elements of the link to display using checkboxes (basic) or tokens like %headline% (advanced). For the latest information, visit the website: http://www.publish2.com/extend/wordpress/ == Installation == Getting the plugin up and running is a simple three-step process: 1. Download the plugin. Extract the files and copy them to the 'publish2' folder into '/wp-content/plugins/' 2. Activate the plugin through the 'Plugins' menu in the WordPress administration panel 3. Set up the source URL and display options, and choose where to display the links: ** To configure the PHP function, select Publish2 under the Settings menu. To use the PHP function, place anywhere you can use PHP in your WordPress Theme. ** To configure the sidebar widget, select Widgets under the Appearance menu. Click Add on the Publish2 widget. Once the Publish2 widget appears under Current Widgets, click Edit. ** To configure the page links, go to an existing page or add a new page. Scroll down to Publish2 Settings to select the display options and turn the link display on or off. Note: The Publish2 plugin requires at least PHP 5.2 with either file_get_contents or cURL enabled. It will disable itself automatically if either of these requirements aren't met. == Frequently Asked Questions == = How do I style my links with CSS? = If you're using checkboxes to select which link elements to display, the plugin offers unique CSS classes to define how your links are displayed. Using tools like Firebug or CSSEdit are good ways to identify classes you'll need to change. = How do I use tokens to style my links? = Select "Advanced Options" when configuring the display of the widget, page links, or PHP function. Then you can use tokens (i.e. %headline%) to change the order of your links, and basic HTML to style those links. If you'd like to make the links visually distinct from your website, you can wrap the tokens in different classes and style those classes with CSS. As an example:

%headline%

%source%%date%

%journalist% said: %comment%

%tags%

= What variables does the publish2() function accept? = If you're using the PHP function in your theme or template to display your links, it can be customized from the defaults by passing the following parameters: = Why does the plugin tell me I've entered a "Bad URL"? = If the plugin gives you a "Bad URL" error, this means that the URL you've entered isn't a proper source of data from the Publish2 website. The plugin accepts URLs from any Publish2 page that has a JSON link feed. For all intents and purposes, this is any Link Journalism, Newsgroup, or Newswire tag page. = Why does the plugin need at least PHP 5.2? = The plugin uses JSON to pull information from Publish2 to your WordPress-powered website. The JSON module PHP uses didn't come as a default until PHP 5.2. If you're running a version earlier than PHP 5.2, then your best bet would be to either upgrade to the latest version of PHP or install the JSON module. = Why won't the plugin work if I don't have file_get_contents() or cURL enabled? = cURL and file_get_contents() are two of the options that the WordPress plugin uses to pull information from Publish2. At least one of these functions is required for the plugin to work. If either the Publish2 Settings page or the sidebar widget give you an error message, you'll probably have to contact your server administrator.