This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Publish2

Description

The Publish2 WordPress plugin allows you to easily publish links, tweets, and videos (YouTube and Vimeo are currently supported) saved with Publish2 in your blog posts, sidebar widgets, and dedicated pages.

Publish2 is free set of web tools for journalists and newsrooms to share the best of the web with their readers. Publish2’s Social Journalism features make it easy to curate the real-time Web. Visit www.publish2.com to learn more.

Features:

  • With Link Assist in the blog post edit screen, you can access links, tweets, and videos that you saved to Publish2 and easily add them as inline links in the text of your post or displayed as a list. Insert tweets into your posts, or embed videos from YouTube or Vimeo.
  • Display links, tweets, and embeddable videos in a sidebar widget, as a list on any page, or by using <?php publish2(); ?> anywhere in your WordPress Theme. Customize the format and display of content.

Send feedback, questions, comments, and ideas to wordpress at publish2 dot com.

Screenshots

  • You can create a recommended list for your readers by adding links, tweets, and videos from Publish2 to your blog.

  • Enable Link Assist to access your links, tweets, and videos saved on Publish2 while you're writing a post. Add links, tweets, and videos to a blog post as inline text links or displayed as a list. Filter links by tags, journalist, content type, newsgroup, or newswire to find what you need.

FAQ

What is Link Assist, and how do I use it?

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.

How do I style my links with CSS?

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>
How do I use tokens to style my links?

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.
What variables does the `publish2()` function accept?

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]); ?>
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 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.

Why does the plugin need at least PHP 5.2?

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.

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 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.

Changelog

Version 1.5.1

  • Fixed issue where Link Assist wouldn’t load in certain server environments

Version 1.5

  • Maintenance improvements for new version of Publish2
  • Import single links or link roundups on a timely basis
  • Uses WP oEmbed class for media embeds
  • Various code refinements. Thanks Andrew Nacin for the review

Version 1.4.5

  • Minor bug fix

Version 1.4.4

  • Now backwards compatible to 2.6

Version 1.4.3

  • Support for quote functionality in widget and Link Assist
  • Configure Link Assist using tokens

Version 1.4.2

  • Minor bug fixes and speed improvements

Version 1.4

  • Link Assist offers native support for Social Journalism, including the ability to embed YouTube videos, add tweets, or add links with all of the saved details, and better navigation to switch between your Links, Links from your Network, or the Newswire
  • Displaying links on your website, either through the widget, PHP function, or on a page, better formats tweets and offers the option to embed YouTube links as videos

Version 1.1

  • Added Link Assist, a quick and easy way to bring the links you save to you when you’re writing a post
  • Minor bug fixes

Version 1.0

  • Initial release with widget, publish2() function, and the ability to append links at the bottom of a page

Contributors & Developers

This is open source software. The following people have contributed to this plugin.

Contributors

Browse the code