UserVoice and StackExchange inside phpBB

UserVoice and StackExchange inside phpBB

In one of our posts from “Own web analytics for startups” series, we mentioned that we are going to implement Questions & Answers, and Ideas/Feedback functionality inside an open source forum – phpBB.

It’s time to share the recipe. I must say that in the end we decided not use this solution for a number of reasons, but perhaps someone will find it useful.

I will start with the Questions/Answers functionality (StackExchange analog). It was quite easy to implement it in phpBB. We took the mod Topic Solved version 1.4.4 as a basis. It used the same images to mark the post as an answer and the whole topic as answered. The topic is a question in this case. This is how answered question looks like in forum view:

Answered topic
We have decided that it is more user-friendly, when a response (reply inside a thread/topic) is marked as “Answer” and a topic as “Answered”. Therefore, we replaced the default images on our own. I must say that we took icons from 37signals Answers, which they closed about a year ago. 37signals Answers had very similar functionality to what we wanted to do – there is no vote on questions and answers and only the author of the question can select the right answer. We haven’t changed anything else in this phpBB mod and received the following result:

For those who love the functionality of StackExchange, where you can vote on questions and answers – just fork our project on GitHub and add this functionality.
This mod adds a new configuration section into php admin UI where administrator can set a new forum as Q/A forum and tweak it:

Ideas/Feedback (UserVoice analog) implementation turned to be a bit harder of a task, but let me first describe what we wanted from it. We wanted to allow users to post their ideas and feedback about a product or service you provide with other users being able to vote up/down as well as add comments. Also, we needed a functionality that allows portal owners to mark particularly good ideas which had gained implementation statuses such as “In progress”, “Completed” etc. to tell users what was rejected and why, and what is in the works now. To begin, we naturally looked for existing phpBB mods and found nothing. I must say that we used phpBB for quite a long time by then but we had no experience in mod development for it and were a little disappointed with having nothing to tweak. We even were thinking about adding JS code into phpBB pages via template, which will change page layout, if a visitor is looking at Ideas/Feedback forum. However, the full moon has passed, and the balance tipped to traditional phpBB mod creation.

Then, as so often happens in life, we got lucky. Thanks to the man with the nickname Alek$, which suggested a combination of mods, which together, were almost all we wanted. We used the mods Topic Evaluation version 1.0.8 and version 1.2.1 of Subject Prefix. As the name implies, Topic Evaluation allows you to vote for topics, and Subject Prefix to mark them with different prefixes. Subject Prefix had a more recent version 1.2.2, but we did not manage to get it to work – there were some glitches in the admin panel which I cannot exactly remember now. Mods were installed and tested on phpBB 3.0.7-PL1.

There were some alterations. Subject Prefix mod fit into our requirements almost perfectly. From the beginning, it was able to show a prefix in color, which can be predefined in phpBB admin panel. However, it was not enough for us, we thought that a much clearer and cleaner status will be on a colored background. We extended this mode to be able to specify a background color for a status. Here is the administrator page to control the color of text and background for a prefix:

And here’s how a page with all created prefixes/statuses looks like in admin panel:

When you create a new forum in phpBB you can set it to be your feedback/ideas forum and you can have more than one – for each product, feature, subscription level, employees only etc.:

After the prefixes/statuses and an Ideas forum have been created by the administrator – statuses are visible when you edit a thread/topic starter:

A status can only be assigned to the first post in a topic (thread starter). This is not a bad thing, but this mod has no control over access rights to a status, which limits its use as is. Let me explain. Usually a post can be edited by an author or forum’s moderator/admin. In this case, a user can edit their own post (which is feedback or a suggestion/idea) and a status is part of a post. Therefore, this mod needs additional tweaking to hide status changes from normal users posting ideas/feedback, or editing it.

We also had to tweak the Topic Evaluation mod. Originally, its voting feature works when a user clicks on a line with stars. The more stars that are selected – the better the score. Evaluation is always positive in this implementation and topic rating is also shown with stars. We wanted to be able to vote up and down, and give different ratios to different user group’s votes from the phpBB admin panel. For example a vote up adds 10 points but a vote down substructs only 5. This was all done. Voting rights are managed flexibly for each user group in the Topic Evaluation tab in admin panel:

As a result, a topic in Ideas/Feedback forum created with two tweaked mods looked like this:

And finally, a screenshot from Ideas/Feedback forum view:

If you build your community on phpBB and want to give it a try – download the code from Github and create your own StackOverflow site and UserVoice in phpBB.

Alex Savchenko

Print this post | Home

Comments are closed.