Difference between revisions of "Documentator"

From Fab Lab Wiki - by NMÍ Kvikan
Jump to: navigation, search
m
m
Line 19: Line 19:
  
 
==Check in==
 
==Check in==
 +
 +
[[Image:checkin.jpg]]
  
 
(1) User logs in with their ProtoSpace website user account. At account creation, we record and keep the non-changing demographic data as part of the user profile (only to be shown to lab adminstrative personnel)
 
(1) User logs in with their ProtoSpace website user account. At account creation, we record and keep the non-changing demographic data as part of the user profile (only to be shown to lab adminstrative personnel)
Line 32: Line 34:
  
 
==Check out==
 
==Check out==
 +
 +
[[Image:checkout.jpg]]
  
 
(1) User logs in.
 
(1) User logs in.

Revision as of 12:57, 25 April 2011

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

Files

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

==> unzip [Imports.zip]

Concept

Check in

Checkin.jpg

(1) User logs in with their ProtoSpace website user account. At account creation, we record and keep the non-changing demographic data as part of the user profile (only to be shown to lab adminstrative personnel)

(2) User can start a new project, or continue one of their existing projects.

At this stage, we only ask the user to fill in a few details on the project they intend to be working on at the lab: project name, short description and machines intended to use.

User action is logged for the lab administrative personnel – who who did what, when and with which machines.

(3) Check in is all done, some welcoming text is shown to user who may now enter the lab and start working on their project. The check in station automatically logs the user out and redirects back to the login screen for the next visitor walking in.


Check out

Checkout.jpg

(1) User logs in.

(2) User can choose which one of their projects they completed that day.

(3) User completes more detailed description of their project: including picture, design source file and a full description of their project – a FabMoment.

(4) Check out is done – the FabMoment is published and shown on the user profile page as well as ProtoSpace FabMoments page (and beyond…)

Documentator automatically logs the user out and redirects back to the login screen.


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)

Modules

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)


Core

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

Contrib

  • 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
  • CAPTCHA - latest
  • Views
    • Views UI

Custom

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

Imports

Rules

  • At /admin/rules/ie/import import rules.txt (found in imports.zip package)


Workflow

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


  • Add workflow: admin/build/workflow/add
 FabMoment editing
  • Add state 1: admin/build/workflow/state/2
 checkin - FabMoment draft started
  • Add state 2: admin/build/workflow/state/2
 checkin - Fabmoment being edited today
  • Add state 3: admin/build/workflow/state/2
 Gepubliceerd
  • Set "fm" content type to have FabMoment editing workflow
  • go to workflow editing (on top of the page) to add permissions for users to transfer content between states - admin/build/workflow/edit/2
 (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


Checkin & checkout pages

  • at admin/content/import, import pages.txt (import.zip) (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 admin/content/import import content_profile.txt (found in package imports.zip)
  • 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


FabMoment

  • at admin/content/import import content_fm.txt (found in package imports.zip)
  • edit the permissions to enable regular logged-in users to create, view, edit, delete the fm type nodes (only their own)


Views

  • 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


Theme

  • 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


Configuration

Misc configuration

User

  • create user accounts without admin approval
  • for this, a must unless you want a thousand spammer accounts created: Configure CAPTCHA (or any variation of it) to be used for user registration
  • at admin/user/settings make sure that:
    • Visitors can create accounts and no administrator approval is required. is selected
    • Require e-mail verification when a visitor creates an account is unchecked