@title;noquote@ @context;noquote@

Q-Wiki Documentation

(c) 2013 by Benjamin Brink
po box 20, Marylhurst, OR 97036-0020 usa
email: kappa@dekka.com

Open source License under GNU GPL

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see .

introduction

Q-Wiki is an OpenACS wiki using a templating system that allows tcl procedures to be used in a web-based publishing environment without being tied to other applications, such as ecommerce.

Q-Wiki is derived from OpenACS' ecommerce package with feedback from administrators that have voiced interest in having some kind of strictly filtered ACS developer support dynamics for user content.

features

Pages automatically have revisioning ie multi-undo.

Pages must be trashed before being deleted. Trashed pages can be untrashed. Trashed pages are not published.

Users with create permission can also trash their own creations.

No UI javascript is used, so technologies with limited UI or computing power can use it.

Tcl procedures pass through two filters: a list of glob expressions stating which procedures are allowed to be used, and a second list of specifically banned procedures.

A package parameter can switch the TCL/ADP rendering of content on or off.

The wiki web-app consists of a single q-wiki tcl/adp page pair and an extra unused "flags" field, which makes the app easily modifiable for custom applications.

Comments, keywords, and page description fields are included with each page for web-based publishing SEO optimization.

Extensible. More fields can be added to the page for customized applications.

An example dynamic template to hint at its capabilities:


<%
    set contributors_list [qw_contributors]
    set pretty_contributors_list [template::util::tcl_to_sql_list $contributors_list]
    set user_id [lindex $contributors_list 0]
    set user_name [person::name -person_id $user_id] 
    set pages_of_user_list [qw_user_contributions $user_id] 
    set pages_of_user [template::util::tcl_to_sql_list $pages_of_user_list]
%>
<p>
  Wiki last edited on: <%= [lindex [qw_most_recent_edit_stats ] 1] %>
</p>
<p>
  Contributor user numbers: \@pretty_contributors_list\@
</p>

<p>
  Most recent contributor, \@user_name\@, 
  made these contributions: \@pages_of_user\@.
</p>

And here's the output for a test installation:

Wiki last edited on: 2013-03-12 17:46:20.250505+00

Contributor user numbers: '667'

Most recent contributor, Admin for or97 net, made these contributions: '10222', '10221', '10220', '10219', '10218', '10217', '10216', '10215', '10214', '10213', '10212', '10211', '10210', '10209', '10208', '10207', '10206', '10205', '10204', '10203', '10202', '10201', '10200', '10199', '10198', '10197', '10196', '10195', '10194', '10193'.


An example showing how to extend Q-wiki for customized applications.

file list and example changes:

An example simlar to this has been fully implemented in a package called cl-custom at https://github.com/tekbasse/cl-custom

Templates

Q-wiki can be setup as a template for tables (and lists and forms) as well as pages for wiki and ecommerce catalog apps.

Q-wiki page content stores html for displaying a row. $1 $2 $3 .. $9 are used to reference variable values by column number. $1 is value for column 1 etc.

A standard table row might have content like this:

<tr> <td>$1</td> <td>$2</td> <td>$3</td> </tr>

However, TABLEs are too wide for convenient display on many small devices.

Lists and DIVs that wrap using responsive style techniques are preferred.

Standard workflow is to aply changes to code where html is hardcoded. Hardcoded html makes code updates for admins a laborious task; Admins have to re-integrate html changes into each updated code release. In addition to the extra workload, there's always a risk that something will break in the upgrade.

How can style be adjusted without hard-coding customizations?

By keeping customizations in the db. One way is by referencing page content using Q-wiki API. And building a report (list, table etc) using OpenACS procs.

qw_template_custom_read allows column orders to be customized on up to a per user case. This information can then be used to build reports with column in different orders etc. Each case is set with qw_template_custom_set .