The (new) website of Algo+LMA is based on the dokuwiki wiki engine.
Inspite of the fact that it is not a true CMS, dokuwiki was selected among various options because of its simplicity and because we considered all available CMS as too complex for a simple site like ours. A posteriori, this might not have been the best choice, but at this point we have invested already a lot of work on this system. In particular, the template we are using was written from scratch to match the aspect of the original algo website and to force dokuwiki to work more similarly to a true CMS. Also we wrote many plugins for making editing less cumbersome in pages where many repeated items are listed.
I have modified and extended the original data plugin. The basic ideas are unchanged. Therefore, I suggest to read the original documentation.
We now have the ability to list the data not only in form of a table but also repeating a generic template for each data record. An example can be found in the group members page:
---- datalist ---- cols : %pageid%,title,fullname,link_title,birthday_dt,join_dt,left_dt,.... sort : listgroup filter : status=active filter : table=members ====== <div class="people_page"> <p> @@avatar@@ <a href="@@pageurl@@">@@title@@ @@fullname@@</a> <br/> @@position@@ <br/> tel: @@tel@@ </p> </div> ========
The first part is similar to the syntax for datatable
. In particular it is very important to list all the fields that need to be fetched
from the database using the cols :
keyword. The html template for formatting the records is defined between the two ==========
lines.
@@field_name@@
are the placeholder for the data fields.
Alternatively, the template can also be on an external file in order to make it easier to keep different listings visually consistents. For example, for the
seminars page, we use an external template so that we can use it for the seminar listing of each
single year.
---- datalist ---- cols : date_dt, speaker, affiliation, title, time, room sort : ^date filter : date > 2008-08-31 filter : date < 2009-09-01 filter : table=seminars ======== template:datatemplates:seminarlist ----
The template code for the seminars is the following:
<dt> @@date@@ </dt> <dd> @@speaker@@, @@affiliation@@<br/> <a href="@@pageurl@@">@@title@@</a><br/> <if time> Time and Place: @@time@@ at <a href="http://plan.epfl.ch/?room=@@room@@">@@room@@</a> <br/> </if time> <a href="@@pageurl@@">details</a> </dd> ====== <style type="text/css"> .intsem dt { margin-top: 1em; } .intsem dd { margin-left: 2em; } </style> <dl class="intsem"> ====== </dl>
Note that it is composed in 3 parts: the first is the template for the records while the second and the third are the header and footer of the listing.
I wrote a plugin for fetching the bibliographic data from the infoscience database. The syntax is the following:
<infoscience key="value" key="value" ... key="value"/>
Possible search keys are:
units
(a space separated list of lab names (in our case it will always be “algo lma”). author
year
yearfrom
: starting year for a range of yearsyearto
: ending year for a range of yearset_id
: for selecting only a given set (does not quite work…)collection
: for selecting the kind of publication. The most common ones are ARTICLE
, CONF
, BOOK
, CHAPTER
, PATENT
, THESIS
, REPORT
, STUDENT
search
: for a custom search using the infoscience syntax. This will override any other key.While the following are keys for formatting options
asort
: field name for ascending sorting of recordsdsort
: field name for descending sorting of recordslimit
: limit the number of results to at most value
recordshtml_style
: the output format for html output (e.g. LIS_year
, google
, lcav
, lsir
, etc.)bibtex_style
: the output format for bibtex output (e.g. alpha
, plain
, abbrvnat
, etc.)For example if we want only the journal papers that Amin wrote in 2006, we should do something like the following:
<infoscience units="algo lma" author="shokrollahi" year="2006" collection="ARTICLE"/>
Is for easily formatting the list of algo visitors.
Syntax:
<visitor NAME | picture> DESCRIPTION TEXT </visitor>
Example:
<visitor Prof. Michael Luby|{{:en:group:visitors:luby2.jpg}}> Mike is a co-founder and Chief Technology Office of Digital Fountain. He visited ALGO in February 2004. Most of our research during that time concentrated on Fountain Codes and their applications. </visitor>
The picture can be conveniently included using the media button of the editor (the forth from the right)
Similarly to the visitor plugin, this is for listing presentations.
Syntax:
<presentation: TITLE | AUTHOR | EVENT DESCRIPTION | PDF MEDIA > ABSTRACT </presentation>
Example:
<presentation: Raptor Codes | A. Shokrollahi | Presentation to Swisscom Innovations 2006 | {{:en:output:presentations:swisscom-jan-06.pdf|}}> Talk intended for a general audience with networking background. The talk concluded with several demos, which are not available on the web at this point. </presentation>
Also here, the pdf file of the presentatino canbe uploaded and included using the media button of the editor.
visitor
and presentation
only work if the first
tag (<presentation: TITLE | AUTHOR | EVENT DESCRIPTION | PDF MEDIA >
)
is all in one line.
Projects are all in the en:projects:detail namespace (e.g. this one). Add your project there and it will then be listed in the right place depending on its status and its target.
The source for a typical project page looks like the following:
---- dataentry project ---- title : PROJECT_TITLE contactname: YOUR_NAME contactmail_mail: YOUR_EMAIL_ADDRESS contacttel: YOUR_TELEPHONE_NUMBER contactroom: YOUR_ROOM_NUMBER type : bachelor semester | master semester | master thesis status : available | taken | completed created_dt : YYYY-MM-DD taken_dt : YYYY-MM-DD completed_dt : YYYY-MM-DD by : STUDENT_NAME output_media : MEDIA_ADDRESS_TO_FINAL_REPORT table : projects ====== template:datatemplates:project ---- PROJECT_DESCRIPTION_OR_ANYTHING_ELSE_USEFUL
Similarly to a project page, the member page contains a part that is shown when the page itself is requested, and a dataentry section where we put information to be used in the member or past-member listing.
Example:
{{ :en:group:members:rimg_amin1.jpg|Portrait of Amin}} Amin received his German Diplom in Mathematics at the University of Karlsruhe in 1988, his PhD in Computer Science at the University of Bonn in 1991, and his Habilitation in Basic Sciences, also etc. ---- dataentry member ---- title : Prof. fullname : Amin Shokrollahi birthday_dt : join_dt : left_dt : webpage_url : http://www.shokrollahi.com portrait_media : en:group:members:rimg_amin1.jpg avatar_img64 : en:group:members:rimg_amin1.jpg email_mail : amin.shokrollahi@epfl.ch tel : +41 21 693 75 12 position : Head of ALGO and LMA listgroup : a status : active table : members ----
The status
field will determine the whether the person will be listed in member or past-member page.
The images are generated using this gimp template.
{{
and the image address. In our template, a
right aligned image is placed on the right partially above the colored band like the picture with the book
in this page.
By default the list of links in the side navigation bar is (randomly) sorted. The default ordering can be altered by adding a comment like the following in the source of the linked pages:
/* sortweight 10 */
The higher the weight, the closer to the top the link is shown. The default weight is zero.