wiki:FaqPlugin

Version 21 (modified by Itamar Ostricher, 12 years ago) (diff)

Fixed link to GitHub repository

FAQ Management Plugin for Trac

Description


A Trac plugin to create FAQs and organize them in categories.
FAQs are actually Wiki pages, created automatically and using a naming convention that allows the plugin to display them in a tree view.
Categories and sub-categories allow for organizing the FAQs based on topics.

The plugin adds a "FAQs" tab in the upper-right Trac navigation menu. Clicking on it displays the main FAQs page shown in the following figure.
The FAQs home page aggregates all the FAQ wiki pages and displays them in a single page.
The page is divided in two halves:

  • The upper half shows only the category and FAQ titles. Clicking on any title links to the corresponding page.
  • The lower half shows the full category and FAQ page contents, as in a usual FAQ page.



Screenshot overview
FAQ Plugin overview


Creating a new FAQ category


To create a new FAQ category, enter the name for the category in the text field and click "Add a Category".



Creating a new FAQ category
Creating a FAQ Category - step 1

A new wiki page will be created and opened for editing.

The first line represents the category title. You can freely edit it, but do not remove it.

This is a normal Wiki page, so you can can use WikiFormatting here, as well as attach documents and images.

When you have finished editing the FAQ category description, save the wiki page.



Showing a FAQ category
Creating a FAQ Category - step 2


Creating a new FAQ


To create a new FAQ inside a particular category, first click on the category to open it, then enter the title for the FAQ in the appropriate text field and click "Add a FAQ".



Creating a new FAQ
Creating a FAQ - step 1

Like for FAQ categories, this action will also create a new wiki page and open it for editing.

This is a also normal Wiki page, so you can can use WikiFormatting here, as well as attach documents and images.



Creating a new FAQ 2
Creating a FAQ - step 2


Editing a FAQ


To modify a FAQ, you can usually edit the corresponding wiki page once opened.
Alternatively, you can do it directly from the tree view, clicking on the pencil icon that appears as soon as you go with the mouse on a FAQ.



Editing a FAQ
Editing a FAQ from the tree view


Security

The FAQ management capabilities are protected by a set of new Trac permissions:

  • FAQ_CREATE : Allows for creating and editing FAQs
  • FAQ_VIEW : Allows for viewing FAQs




Bugs/Feature Requests

Existing bugs and feature requests for FaqPlugin are here.

If you have any issues, create a new ticket.

Ticket Summary Status Severity Priority Type Owner Created Description
#9678 Problem with the menu when using the CMTeknik theme new normal normal defect Roberto Longobardi 12 years ago

If I use the CMTeknik theme, the menu is not formatted properly when selecting the FAQ entry. For other themes and menu entries everything looks fine. Please see the attachments.

#9976 Internal error with Postgresql database. assigned normal normal defect Roberto Longobardi 12 years ago

Clicking on the FAQ top menu option generates an Internal Server Error. The trac.log displays:

ProgrammingError: column "wiki.text" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT name, text, max(version) FROM wiki WHERE name LIKE 'F...
#11522 UnicodeError: source returned bytes, but no encoding specified new blocker normal defect Roberto Longobardi 10 years ago

From a fresh install, after applying the patch in #9976 for PostgreSQL, when I click on the main FAQs navigation button I get:

Trac detected an internal error:
UnicodeError: source returned bytes, but no encoding specified

Python callback:

File "build/bdist.macosx-10.9-intel/egg/trac/web/main.py", line 497, in _dispatch_request
  dispatcher.dispatch(req)
File "build/bdist.macosx-10.9-intel/egg/trac/web/main.py", line 233, in dispatch
  content_type)
File "build/bdist.macosx-10.9-intel/egg/trac/web/chrome.py", line 968, in render_template
  stream |= self._filter_stream(req, method, filename, stream, data)
File "/Library/Python/2.7/site-packages/Genshi-0.7-py2.7-macosx-10.9-intel.egg/genshi/core.py", line 133, in __or__
  return Stream(_ensure(function(self)), serializer=self.serializer)
File "build/bdist.macosx-10.9-intel/egg/trac/web/chrome.py", line 1147, in inner
  data)
File "build/bdist.macosx-10.9-intel/egg/faqplugin/wiki.py", line 66, in filter_stream
  return self._faq_category_wiki_view(req, formatter, page_name, stream)
File "build/bdist.macosx-10.9-intel/egg/faqplugin/wiki.py", line 91, in _faq_category_wiki_view
  HTML(tree_macro.expand_macro(formatter, None, ''))
File "/Library/Python/2.7/site-packages/Genshi-0.7-py2.7-macosx-10.9-intel.egg/genshi/input.py", line 442, in HTML
  return Stream(list(HTMLParser(BytesIO(text), encoding=encoding)))
File "/Library/Python/2.7/site-packages/Genshi-0.7-py2.7-macosx-10.9-intel.egg/genshi/core.py", line 273, in _ensure
  event = stream.next()
File "/Library/Python/2.7/site-packages/Genshi-0.7-py2.7-macosx-10.9-intel.egg/genshi/input.py", line 449, in _coalesce
  for kind, data, pos in chain(stream, [(None, None, None)]):
File "/Library/Python/2.7/site-packages/Genshi-0.7-py2.7-macosx-10.9-intel.egg/genshi/input.py", line 337, in _generate
  raise UnicodeError("source returned bytes, but no encoding specified")

Note that I'm using Trac 1.0.1 with PostgreSQL, see attached


Download


Download Egg files and the zipped source from the project on SourceForge.


Source


You can check out FaqPlugin from the repository on SourceForge using Git.


Recent Changes


11126 by seccanj on 2012-01-07 18:47:02
New hack FaqPlugin, created by seccanj
(more)

Author/Contributors

Author: seccanj
Maintainer: seccanj
Contributors:

Attachments (6)

Download all attachments as: .zip