Home  ›  Components Panel  ›  Blog Linking

Blog Linking

The Forum ☛ Options ☛ Blog Linking Options administration panel is where you configure how blog linking works. Blog Linking allows you the option to automatically create a new Topic in the Forum with the content of a blog post. The opposite of this is also available – creating a blog post from a new Forum Topic. Permissions to allow this can be turned on in the Permission sets. You also have an option to automatically display the Posts from a linked Forum Topic as comments on the linked blog post. The topic posts are appended to the comments or can replace the comments if your turn off the WP comment form.

Post Linking


Post Linking allows you the option to automatically create a new topic with the content of a blog post. The opposite of this is also available – creating a blog post from a new forum topic. Permissions to allow this can be turned on in the User Group Permission Sets. To create such links, users must have the relevant forum permissions and the capability to create WP posts or pages.

Auto-Create

With Auto-Creation turned on the blog linking form that displays in the WP new post/page panel will be automatically checked and, if left checked, will create a new topic in the default forum. This option can be overridden on the blog link form.

Default Forum

The forum selected will be used as the default target for auto-created linked topics. A different forum can be selected at the blog Post creation time.

Post Edit Updating

Leaving this option checked will ensure that should the post be edited and updated then change will be reflected in the forum topic. This works both ways. This option can be overridden on the blog link form.

Type

As an option to Post Linking, you can decide to only create an excerpt of the blog post in the new forum topic. if you wish to do this, check the option and enter the word count you wish the excerpt to be truncated to.

Show Topic Posts as Comments


By turning on this option, you will be able to display the posts from a linked topic as comments on the linked blog post. In order to use this feature, you will need to be able to look at and potentially edit your WordPress theme’s comments template file (normally comments.php).

If your theme comments template uses the older, pre WordPress 2.7 ‘comment loop’, the topic posts will be appended to the end of the WP post comments. Or if you wish to completely replace the WordPress comments with the SPF linked topic posts, you can remove the comment entry form from your comment template and only the SPF linked topic posts will be shown.

If your theme comment templates uses the newer WordPress 2.7+ wp_list_comments() function, you may need to edit the argument list.

Using Display Mixed in Standard Comment Block

If your comments template does not pass any arguments to the wp_list_comments() function or has a ‘type=all’ or ‘type=comment’ argument, the SPF linked topic posts will show up as comments interspersed with the WordPress comments, sorted by date.

Topic Posts will be sent to the WordPress function with a type of ‘comment’.

Using Display in Separate Comment Block

If your comments template does pass an argument of ‘type=xxxx’, this allows separation of the comments by type. So you will likely see an argument of ‘type=comment’ plus potentially additional calls with different types. If this is the case, you have a couple of options. You can add another comment section (duplicate) styled much like your section with ‘type=comment’, but instead this time, pass an argument of ‘type=forum’. This will give you the WordPress comments in a section, followed by the SPF linked topic posts. Or if you want to completely replace the WordPress comments with the SPF linked topic posts, you can simply change the ‘type=comment’ argument to ‘type=forum’ and remove the comment entry form and only the SPF linked topic posts will be shown.

It should be noted then when a type of ‘forum’ is chosen, wp_list_comments() will NOT display avatars. This is a limitation of WordPress not a limitation of SPF.

Hide Duplicates

If you are showing topic posts as comments and creating topic posts from comments without deleting the original then two copies of these will be displayed in the blog post comment list – the original blog comment and the replicated topic post. In these circumstances you will probably want to hide the duplicate topic posts created automatically from blog comments. The Hide Duplicates option will do this.

Using forum linked topic posts as comments does not support the WP threading option.

Create Topic Posts from Comments

Create New Topic Posts from Blog Post Comments

Once enabled, a new topic post will automatically be created in the linked topic with the comment content. This will occur when the comment is approved or at the time the comment is made if the comment needs no approval.

Delete Original Comment Upon Topic Post Creation

If enabled, the original comment will be deleted at the time the topic post is created. Use this with care as once the comment is removed it can not be restored. This option is intended for those that wish the forum to completely replace their commenting system.
There is no harm in leaving the original comment records other than database storage.

Update Topic Post on Comment Edit or Delete

If enabled, this option will update topic posts when the original comment is edited.

Before using these options in public it is recommended they be tested on your site as other plugins that operate on post and comment creation can effect the results.

Link Display Text


If you are using Post Linking, you can determine the link text that displays both in the blog post and the forum topic post. These link back to each other.

You can let Simple:Press Forum create the forum topic link (on the blog post) automatically. A template tag – sf_blog_linked_tag() – is also available as an alternative. You can also choose to display the link at the top or bottom (default) of the blog post.

Finally, you can select to only show the link in single page view.

For the blog post link, various data items can be inserted by using the supplied place holders. These are:

  • %ICON% – The forum skins blog link icon.
  • %FORMNAME% – The name of the forum containing the linked topic.
  • %TOPICNAME% – The name of the topic itself.
  • %POSTCOUNT% – The number of topic posts that have been made.
  • %LINKSTART% – Starting position of the actual link. If not used the link will start at the beginning of the text.
  • %LINKEND% – Ending position of the actual link. If not used the link will stop at the end of the text.

For the forum topic link, an icon and link positioning can be inserted by using the supplied place holders. These are:

  • %ICON% – the forum skins blog link icon.
  • %BLOGTITLE% – the title of the blog post.
  • %LINKSTART% – Starting position of the actual link. If not used the link will start at the beginning of the text.
  • %LINKEND% – Ending position of the actual link. If not used the link will stop at the end of the text.

Article written by Luffer on January 29, 2010 and last modified by Luffer on April 26, 2010