Opened 14 years ago
Closed 14 years ago
#8068 closed enhancement (fixed)
Patch to add "answered" status flag to the forums and timeline
Reported by: | Michael Medin | Owned by: | Radek Bartoň |
---|---|---|---|
Priority: | normal | Component: | DiscussionPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
Since I wanted a way to indicate that questions (on my forum) have been answered I added a status filed which translates to a icon indicator so it is simple to know when a topic has been answered or not.
This is kind of hard to describe but in essence you can toggle "answered" and once a topic is answered it will get a "check box" on top of the regular yellow icon. Really useful if you ask me.
You can see it in action here: http://www.nsclient.org/nscp/discussion/forum/1 and http://www.nsclient.org/nscp/timeline (look for a green checkbox over the yellow bubble).
The patch is created using svn diff so let me know if that is an incorrect syntax. *NOTICE* this changes the database so create a backup first as there is no "downgrade" (ie. it will not remove the extra column from the topic table). The alteration to the database is very slim (just adds a column to the topic table).
The icon did not seem to make it into the patch to I attached it separately.
Script to remove the column from the database (ie. if you want to uninstall, but this is manual work and not very tested so take care, and always do a backup):
BEGIN TRANSACTION; CREATE TEMPORARY TABLE t1_backup(id integer PRIMARY KEY, forum integer, time integer, author text, subscribers text, subject text, body text); INSERT INTO t1_backup SELECT id, forum, time, author, subscribers, subject, body FROM topic; DROP TABLE topic; CREATE TABLE topic ( id integer PRIMARY KEY, forum integer, time integer, author text, subscribers text, subject text, body text); INSERT INTO topic SELECT id, forum, time, author, subscribers, subject, body FROM t1_backup; DROP TABLE t1_backup; COMMIT;
*please note* this is only visible in timeline and "compact" forum view as that is what I use so set:
[discussion] default_topic_display = compact
Michael Medin
Attachments (3)
Change History (7)
Changed 14 years ago by
Attachment: | answered-flag.diff added |
---|
Changed 14 years ago by
Attachment: | answered-flag.2.diff added |
---|
Changed 14 years ago by
Attachment: | discussiona.png added |
---|
comment:1 Changed 14 years ago by
Type: | defect → enhancement |
---|
comment:2 Changed 14 years ago by
comment:3 Changed 14 years ago by
Status: | new → assigned |
---|
Thank you for the patch! Very nice feature indeed. When I'll find some free time, I'll review it and give you the opportunity to commit it with your nick tagged on. Then I'll make some further corrections/finishments.
comment:4 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Implemented in a different way from changeset r9764.
A few notes to the implementer/maintainer:
Michael Medin