Easily incorporate your Publish2 links into your WordPress site and blog posts.
Link Assist allows you to quickly and easily add links you've saved with Publish2 to a blog post as inline links. Link Assist displays links from any Publish2 link feed as a sidebar on the WordPress post edit page. Enable Link Assist on your WordPress user profile ('Your Profile' under the Users menu) and by checking 'Enable Link Assist while editing posts' and adding the URL of your Publish2 links. Once enabled, Link Assist will appear on the post edit page, allowing you to quickly scan through links, tweets, and videos, filter with tags, and add them to your post with one click.
If you're using the basic checkbox options to select which link elements to display, the plugin renders HTML with unique CSS classes to define how your links are displayed. Here is sample HTML to use as a guide:
<h4><span class="publish2_header">What I'm Reading</span></h4> <h4><a href="http://newssite.com/article" class="publish2_story_headline">Sample Headline</a></h4> <p><span class="publish2_story_publication_name">newssite.com</span> | <span class="publish2_story_publication_date">July 13, 2009</span></p> <p><a href="http://www.publish2.com/journalists/daniel-bachhuber" class="publish2_journalist_profile">Daniel Bachhuber</a> says: <span class="publish2_story_description">This is an insightful article, highly recommended.</span></p> <p>Tags: <a href="http://www.publish2.com/journalists/daniel-bachhuber/tag1" class="publish2_story_tags">Tag1</a>, <a href="http://www. publish2.com/journalists/daniel-bachhuber/tag2" class="publish2_story_tags">Tag2</a> <p><a href="http://www.publish2.com/journalists/daniel-bachhuber/links">More of Daniel's Links</a></p>
Select 'Advanced Options' when configuring the display of the Publish2 links on Pages or on Settings page for PHP function (on widget configuration, Advanced Options appear below the basic options). Advanced Options lets you use tokens (i.e.
%headline%) to change the order of your link elements, as well as wrap each link element in specific HTML tags. You can also add custom CSS classes for granular control over styling. For example:
<p>%source%</p> <h3 class="publish2_headline">%headline%</h3> <p>%date%</p> <p>%comment%</p> <p>%tags%</p>
The following tokens are accepted:
%headline%- The title of the link
%source%- The publication name of the link
%date%- The publication date of the link
%journalist%- The journalist who saved the link on Publish2
%comment%- The comment that the journalist added to the the link
%tags%- All of the tags that were added to the link when saved
%video%- Embeds a YouTube video with customizable width.
If you're using the PHP function in your theme or template to display Publish2 links, it can be customized from the defaults by passing the following parameters:
<?php publish2($feedlink[str], $link_count[int], $headline[bool], $date[bool], $journalist[bool], $comment[bool], $tags[bool], $link_format[str]); ?>
If the plugin gives you a 'Bad URL' error, this means that the URL you've entered isn't a valid source of data from the Publish2 website. The plugin accepts URLs from any Publish2 page that has a feed, which includes individual journalist link pages, social link pages, Newsgroup link pages, and Newswire pages. All tag pages also have a feed.
The plugin uses Publish2's JSON feeds to import link data. The JSON module that PHP uses was not included as a default until PHP 5.2. If you're running a version earlier than PHP 5.2, then you need to install the JSON module or upgrade to the latest version of PHP.
file_get_contents() are two of the options that the Publish2 WordPress plugin uses to pull data from Publish2 link feeds. 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.