Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:private:howto [2010/09/13 16:30]
127.0.0.1 external edit
en:private:howto [2016/06/23 11:26]
Line 1: Line 1:
-====== Algo Wiki Howto ====== 
-===== Basics ===== 
-The (new) website of Algo+LMA is based on the [[http://​www.dokuwiki.org/​dokuwiki|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. 
- 
-===== Dataplugin ===== 
-I have modified and extended the original [[http://​www.dokuwiki.org/​plugin:​data|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 [[:​en:​group:​members|group members]] page: 
- 
-<​code>​ 
- 
----- 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>​ 
-======== 
- 
-</​code>​ 
- 
-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 
-[[en:​group:​seminars|seminars]] page, we use an [[datatemplates:​seminarlist|external template]] so that we can use it for the seminar listing of each  
-single year. 
- 
-<​code>​ 
- 
----- 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 
----- 
- 
-</​code>​ 
- 
-The template code for the seminars is the following: 
- 
-<​code>​ 
- 
-<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> 
- 
-</​code>​ 
- 
-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. 
- 
-===== Infoscience ===== 
-I wrote a plugin for fetching the bibliographic data from the [[http://​infoscience.epfl.ch|infoscience database]]. 
-The syntax is the following: ​ 
- 
-<​code>​ 
- 
-<​infoscience key="​value"​ key="​value"​ ... key="​value"/>​ 
- 
-</​code>​ 
- 
-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 years 
-    - ''​yearto'':​ ending year for a range of year 
-    - ''​set_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 records 
-    - ''​dsort'':​ field name for descending sorting of records 
-    - ''​limit'':​ limit the number of results to at most ''​value''​ records 
-    - ''​html_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: 
- 
-<​code> ​ 
- 
-  <​infoscience units="​algo lma" author="​shokrollahi" ​ 
-                       ​year="​2006"​ collection="​ARTICLE"/>​ 
- 
-</​code>​ 
- 
-===== Other plugins ===== 
- 
-==== visitor ==== 
-Is for easily formatting the list of algo visitors. ​ 
- 
-Syntax: ​ 
- 
-<​code>​ 
- 
-<visitor NAME | picture> 
-DESCRIPTION TEXT 
-</​visitor>​ 
- 
-</​code>​ 
- 
-Example: 
- 
-<​code>​ 
- 
-<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>​ 
- 
-</​code>​ 
- 
-The picture can be conveniently included using the media button of the editor ​ 
-(the forth from the right) 
- 
-==== presentation ==== 
-Similarly to the visitor plugin, this is for listing presentations. 
- 
-Syntax: 
- 
-<​code>​ 
- 
-<​presentation:​ TITLE | AUTHOR | EVENT DESCRIPTION | PDF MEDIA > 
-ABSTRACT 
-</​presentation>​ 
- 
-</​code>​ 
- 
-Example: 
- 
-<​code>​ 
- 
-<​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>​ 
- 
-</​code>​ 
- 
-Also here, the pdf file of the presentatino canbe uploaded and included using the media button of the editor. 
- 
-<​note>​ 
-Presently, ''​visitor''​ and ''​presentation''​ only work if the first  
-tag (''<​presentation:​ TITLE | AUTHOR | EVENT DESCRIPTION | PDF MEDIA >''​) 
-is all in one line. 
-</​note>​ 
- 
-===== Conventions and Templates ===== 
-==== Project ==== 
-Projects are all in the //​en:​projects:​detail//​ namespace (e.g. [[en:​projects:​details:​gio01|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: 
- 
-<​code>​ 
----- 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 
- 
-</​code>​ 
- 
-==== Member ==== 
-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: 
- 
-<​code>​ 
- 
-{{  :​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 
----- 
- 
-</​code>​ 
- 
-The ''​status''​ field will determine the whether the person will be listed in member or past-member page. 
- 
-The images are generated using {{:​en:​group:​members:​rimg_template.xcf|this}} gimp template. 
- 
-<​note>​ 
-**Note:** the first thing on the top of the page is an image  
-(created as usual with the //Add Image and other files// button of the editor). ​ 
-But, has you have learned from dokuwiki syntax, it is a //right aligned// image: there is at least one space 
-between the ''​{{''​ 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. 
-</​note>​ 
- 
-==== Side Navigation Sorting ==== 
-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: 
- 
-<​code>​ 
- 
-/* sortweight 10 */ 
- 
-</​code>​ 
- 
- The higher the weight, the closer to the top the link is shown. The default weight is zero.