Posts Tagged “Wordpress”

The Simple Press Forum plug-inis one of the most popular and sophisticated solutions to add a complete forum to your WordPress blog. I also use it in my Mark Knopfler Guitar Style Blog.You can automatically link a blog post with a forum discussion thread. Unfortunately it is only possible to establish this link between a new blog post and a new (empty) forum topic (which will be created automatically).

In my forum users started a discussion about one of the blog posts, and I now wanted to link the blog post with this forum topic. This is not possible within the Simple Press Forum. In this post I will describe how to achieve this.

Step for Step

1. Change in the WordPress backend to the editing mode ( posts –> Edit) and edit the post you want to link with the forum topic. This can be done at the bottom of the page, just check the box and update the blog post. There should be a link now in your post to a new (empty) forum topic of the same name, and a link back to the blog post in this forum topic.

2.Next you need to edit your database. Most providers give you the option to do so via phpmyadmin. If not, a Google search for e.g. “mysql database editing” should help.

Locate the key wp_sftopics (the prefix wp_  is a default which you might have changed when you installed your blog). Display all entries of this key, you will see a table in which each row corresponds to a forum topic. The lowest (last) row will probably correspond to the new forum topic which was linked to your blog post in step 1). There is a column called  blog_post_id, where most topics will display “0” (=not linked). The new topic will display the ID of the linked blog post here. Locate the existing forum topic you want to be linked with the blog post, and enter this ID here. In your forum topic there should appear a link to this blog post now.

Note the ID of this (the existing) forum topic, you will need it again in step 4).

3. Delete the complete last row (which is the new, empty forum topic). Don’t delete it in the Simple Press Forum, as this will also delete the link from your blog post.

4. What is left to do is to update the link from your blog post to the forum topic (it still points to the empty topic you just deleted in step 3). Open the key wp_postmeta and display all its entries. Probably there will be a long list, you are looking for the latest entry which will probably on the last page of entries.

You will see the values  meta_id , post_id (this is the ID of the blog post you want to link with the forum topic), metakey (here  “forumlink” should be displayed) and meta_value. Under meta_value I had “2@30”, with 30 being the ID of the forum topic that is currently linked to (still the empty topic). In my case I wanted to link to forum topic 25 instead (the ID you noted at the end of step 2) , so I had to change “2@30” into “2@25” (I don’t know what the 2 stands for). The link from your blog post should point to the desired forum topic now.

5.When the link to the new forum topic was created in step 1), a new, empty first forum post was automatically added to this thread. If e.g. your sidebar displays a list of the most recent forum posts, this empty post will appear here, which is why we want to delete it in the database now. You will find this empty post under the key wp_sfposts, probably the last in the list. Simple delete the complete row.

Comments 9 Comments »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.


Technorati Profile