
In one of our
posts of the “Our Web Analytics for a Startup” series, we mentioned that we are going to implement the functionality of the Q & A applications on the phpBB forum.
It's time to share the recipe. I’ll say right away that we ourselves did not use this decision as a result for a number of reasons, but perhaps it will be useful to someone.
Let's start in order, with Questions / Answers (equivalent to
StackExchange ). Implementing the right functionality was pretty easy. We have taken the
Topic Solved version 1.4.4 mod as a basis. In the delivery of the mod used the same image to mark the post as an answer and the entire topic as answered. Here is how the default topic looks like:
')
We decided that it is more convenient when the answer is marked as “Answer”, and the topic as “Answered” and therefore we replaced the standard images with our own. I must say that in developing the icon, we took from the Answers project from the company 37signals, which was closed about a year ago. This project was very close in functionality to what we wanted to do - there is no vote for questions and answers and only the author of the question can choose the right answer. They didn’t change anything else and finally got this result:
Those who like StackExchange functionality, where you can vote for questions and answers, will not have much difficulty to fork our project on GitHub and add the necessary functionality.
This mod adds a new section to the forum settings, in which the administrator controls whether this forum is used as Answers and related settings:
With Ideas, an analogue of
UserVoice , it turned out to be a little more difficult, but first I will tell you what our requirements were for them. So, we were faced with the task of giving users the opportunity to put forward their ideas about our product, other users should have the opportunity to both vote for someone's idea and comment on it. We also needed to be able to tag particularly successful ideas that deserved the implementation, with statuses like “In progress”, “Completed”, etc. To begin with, we naturally searched among the existing
official mods and found nothing. I must say that although by that time we used the phpBB-based forum itself for a long time, but there was no development experience for it. Therefore, the lack of a ready fashion has slightly upset us. So much so that we even thought about a separate script, the JS-part of which would be added to the page template and changed their appearance depending on whether the usual forum is being viewed at the moment or the one that is reserved for Ideas. However, the full moon passed and the scales leaned toward writing the traditional phpBB mod.
And here, as is often the case in life, we were unexpectedly lucky. Thanks to the person with the nickname
Alek $ , who suggested a combination of mods that almost completely implements what we need. Thus, we stopped at the Mode
Evaluation versions 1.0.8 and
Subject Prefix versions 1.2.1. As the name implies, the first allows you to vote for topics, and the second to mark them with various prefixes. Subject Prefix has a later version 1.2.2, but we didn’t work with it - some glitches appeared in the admin area, I don’t remember the details now. Mods were installed and the final solution was tested on the forum version 3.0.7-PL1.
Not without alterations. Subject Prefix fit into our requirements almost perfectly. From the very beginning, he knew how to show prefixes, which in the admin panel can be assigned the font color. However, for our purposes this was not enough, the statuses look much more vivid on a colored background, and therefore the mod was expanded to be able to indicate the background color under the status. This is how the admin page for managing the color of the label and prefix background looks like:
And this is what the page with the list of prefixes looks like:
Whether to use prefixes for this forum or not is determined by a new item in the forum properties:
After the prefixes have been created by the administrator and their use in the forum is allowed in the forum settings, they become available when editing a post:
In this case, the status can be assigned only to the first post in the topic. Everything would be fine, but this mod has absolutely no account of access rights, and therefore there is a certain restriction in its use. I will explain which one. Usually editing posts is available only to the author and moderators / admins of the forum. Thus, if the first post in the topic belongs to an ordinary user, then he can edit it and, accordingly, can also assign and change statuses. Therefore, this mod needs another change - at a minimum it is necessary to give the opportunity to change statuses only to administrators, and it would be better to make full rights management for all user groups.
Topic Evaluation also had to finish. Initially, voting takes place by clicking on a bar with asterisks, how many asterisks are selected, and this rating was assigned, that is, the rating is always positive. Accordingly, the rating is also shown with asterisks. We also wanted to be able to vote AGAINST, and the votes for and against could be given a different weight, configured from the config. For example, a vote FOR adds 10 points to the rating, and a vote AGAINST removes 5 points. What was done. Voting rights are managed quite flexibly for each user group, in the Topic Evaluation tab:
As a result, the topic with the vote and the prefix began to look like this:
And finally, a screenshot of the forum browsing page:
If you are building your phpBB-based community, download the code from
Github and use your own question-and-answer systems and ideas for health.