Difference between revisions of "Documentator"

From Fab Lab Wiki - by NMÍ Kvikan
Jump to: navigation, search
m (Workflow)
m (Theme)
Line 101: Line 101:
* Copy page templates to your theme folder (e.g. sites/all/themes/my_fablab/)
* Copy page templates to your theme folder (e.g. sites/all/themes/my_fablab/)
page-checkin2.tpl.php              page-fabmoments.php
  page-checkin2.tpl.php              page-fabmoments.php
page-checkin3.tpl.php              page-fm.tpl.php
  page-checkin3.tpl.php              page-fm.tpl.php
page-checkin.tpl.php              page-node-add-fm.tpl.php
  page-checkin.tpl.php              page-node-add-fm.tpl.php
page-checkout2.tpl.php            page-node-add-profile.tpl.php
  page-checkout2.tpl.php            page-node-add-profile.tpl.php
page-checkout3.tpl.php            page-user-profile-profile.tpl.php
  page-checkout3.tpl.php            page-user-profile-profile.tpl.php
page-checkout.tpl.php              page-user-register.tpl.php
  page-checkout.tpl.php              page-user-register.tpl.php

Revision as of 12:20, 25 April 2011

A placeholder for eventually completing the documentation on the Documentator station at ProtoSpace (Fablab Utrecht, NL)


Various bits and pieces

  • templatetweaks.txt
  • css.txt
  • view_fabmoments_checkin.txt
  • view_fabmoments_checkin.txt
  • content_profile.txt
  • content_fm.txt
  • checkinout_pages.txt
  • rules.txt
  • checkin_log.tar



We're using Drupal, so this writeup is about all the nuts and bolts of Drupal 6 configuration needed to pull off the idea. (other platforms for providing something similar might be developed in the future, depending on need/demand. (you can let me know about need / demand, just email anu at fabfolk dot com)


A number of Drupal contributed modules were used to produce different parts of the functionality required by the "kiosk" stands A custom module for logging user actions (launched by conditions set by the Rules module) was created. Complete list of modules used (the number may seem large, but many of them are commonly used in any regular Drupal installation)


  • PHP filter - needed for some of the processing in the checkin/checkout pages
  • Path - needed for setting paths for the checkin & checkout pages


  • Workflow - for catching system events that can launch actions (such as publishing a FabMoment or logging lab visit)
  • Rules - for managing the documentation (FabMoment) states - things should not be published
    • Rules Admin UI
  • CCK
    • Content Copy
    • Text field
    • Option Widgets
  • Content Profile
    • Content Profile User Registration
  • Node export - useful for importing checkin / checkout page content)
  • Token - for replacing tokens in redirection paths
  • Views
    • Views UI


  • checkin_log - provides actions that can be launched via rules for logging user activity and display logs in a block


Checkin & checkout pages

  • at admin/content/import, import pages.txt (Node Export needs to be enabled for imports and PHP filter for being able to save these pages that contain a little bit of PHP properly)
    • text is in Dutch, translations upon request (anu at fabfolk dot com)
    • Reset the paths (Path module needs to be enabled)
      • (node title) Inchecken -> (path) checkin
      • Wat ga je vandaag maken? -> checkin2
      • Welkom -> checkin3
      • Uitchecken -> checkout
      • Mijn recente FabMoments -> checkout2
      • Bedankt! -> checkout3

Content profile

Content profile module enables user profile to be created as nodes. This was during prototyping as I thought viewing user activity would have been possible by constructing a view showing node revisions combined with user information - turns out it was not possible (in a re-do, I'd probably go for just using the user profile)

  • at ... import content.txt
  • Permissions: at (user permissions table) set (anon&auth users can create content profile)
  • The import should have taken care of this content type acting as user profile
  • at admin/content/node-type/profile
    • Checked: Use this content type as a content profile for users
    • Checked: Use on Registration
    • Hide form fields: Title
    • some additional steps might be needed to hide Title & Body fields from users, more information here


  • Views - we're using Views 3 alpha due to some past site management choices, Views 2 should work just as well. For importing my views however you need Views 3 alpha.

Add views at admin/build/views/ admin/content/node-type/profile Machine readable name for the block: checkout_fabmoments Machine readable name for the block: checkin_fabmoments

  • Add the view blocks to be displayed on checkin and checkout pages at admin/build/block/list
    • Show Checkin & Checkout block on content area
    • Only show them on specific pages
    • checkin block -> checkin2
    • checkout block -> checkout2


  • At /admin/rules/ie/import import rules.txt


  • Copy page templates to your theme folder (e.g. sites/all/themes/my_fablab/)
 page-checkin2.tpl.php              page-fabmoments.php
 page-checkin3.tpl.php              page-fm.tpl.php
 page-checkin.tpl.php               page-node-add-fm.tpl.php
 page-checkout2.tpl.php             page-node-add-profile.tpl.php
 page-checkout3.tpl.php             page-user-profile-profile.tpl.php
 page-checkout.tpl.php              page-user-register.tpl.php


  • Unfortunately workflows are not exportable, so creating a workflow through the admin interface is needed

 FabMoment editing
 checkin - FabMoment draft started
 checkin - Fabmoment being edited today
  • Set "fm" content type to have FabMoment editing workflow
 (creation)	→	checkin - FabMoment draft started
 checkin - Fabmoment being edited today	→	checkin - FabMoment draft started
 checkin - FabMoment draft started	→	checkin - Fabmoment being edited today
 checkin - FabMoment draft started	→	Gepubliceerd
 Gepubliceerd	→	checkin - Fabmoment being edited today
 Gepubliceerd	→	checkin - FabMoment draft started


  • Import FabMoment content type (our temporary one is called fm - content_fm.txt
  • edit the permissions to enable regular logged-in users to create, view, edit, delete the fm type nodes (only their own)



Anatomy of a (ProtoSpace) FabMoment: ...




A number of templates were used to "skin" the user interface to be as simple as possible so that users could not fall off the system by clicking the wrong thing at the wrong time

  • ...