Changes between Version 3 and Version 4 of doc/auth-server/ContentManagerTutorial

Show
Ignore:
Timestamp:
01/14/07 23:24:46 (14 years ago)
Author:
benoitg
Comment:

Add two remote site integration example, reformat

Legend:

Unmodified
Added
Removed
Modified
  • doc/auth-server/ContentManagerTutorial

    v3 v4  
    55 
    66 
    7 The content manager is both the most powerfull and the most misunderstood component of the wifidog auth server.  This document isn't the content manager manual, rather, it is a list of use common use cases, and how to use the contentn manager to meet them. 
     7The content manager is both the most powerfull and the most misunderstood component of the wifidog auth server.  This document isn't the content manager manual, rather, it is a list of use common use cases, and how to use the content manager to meet them. 
    88 
    99= Content display scenarios = 
    1010This first section is a list of simple scenarios, answering the questions "I want to do this, how do I do it?" 
    1111== Displaying images in rotation == 
    12  1. Link a BannerAddGroup where you want you images to go. 
    13  1. In "ContentGroup access control", make the ContentGroup non-reusable. 
    14  1. Add your images as elements of the ContentGroup. 
     12 1. Link a !BannerAddGroup where you want you images to go. 
     13 1. In "ContentGroup access control", make the !ContentGroup non-reusable. 
     14 1. Add your images as elements of the !ContentGroup. 
    1515 
    16 == Displaying a SINGLE piece of content at several (but not all) hotspots. 
    17 This is a very common scenario:  displaying a certain piece of content at all the hotspot in a certain neighbourhood, or all the hotspots of a ccertain type (cafe, bar, library, etc.). 
     16== Displaying a SINGLE piece of content at several (but not all) hotspots. == 
     17This is a very common scenario:  displaying a certain piece of content at all the hotspot in a certain neighborhood, or all the hotspots of a certain type (cafe, bar, library, etc.). 
    1818 1. Create a reusable content group linked network-wide (must be done by a network admin) 
    1919 1. Add your content as the content group's first (and only) element. 
     
    2222 
    2323== Displaying a piece (or pieces) of content only once to the user == 
    24 This is usefull for notices 
    25  1. Link a ContentGroup where you want your notice to go. 
    26  1. In "ContentGroup access control", make the ContentGroup non-reusable. 
    27  1. Add your notice as an element of the ContentGroup. 
    28  1. In "ContentGroup configuration"/"Can content be shown more than once to the same user?:" select "Content can only be shown once". 
     24This is useful for notices 
     25 1. Link a !ContentGroup where you want your notice to go. 
     26 1. In "!ContentGroup access control", make the !ContentGroup non-reusable. 
     27 1. Add your notice as an element of the !ContentGroup. 
     28 1. In "!ContentGroup configuration"/"Can content be shown more than once to the same user?:" select "Content can only be shown once". 
    2929 
    3030== Doing a "Treasure hunt" or "Pub crawl" == 
    3131This is an activity where you give the user clues for finding the next location (and next clue). 
    32  1. Link a new ContentGroup network-wide. 
    33  1. Make sure the ContentGroup is reusable 
    34  1. Add your clues as ContentGroup elements 
     32 1. Link a new !ContentGroup network-wide. 
     33 1. Make sure the !ContentGroup is reusable 
     34 1. Add your clues as !ContentGroup elements 
    3535 1. For each clue, add the node at which it is to be displayed 
    3636 
    3737=== Variant: Handling several paths === 
    3838If you want your user's paths to branch off (more fun, as users can't just all follow each other) or not all get the same clue, do this 
    39  1. In "ContentGroup configuration"/"When does the content rotate?" select "Content rotates each time you change node".  In this scenario, this means that the content will never actually rotate for a single user, which is what we want. 
     39 1. In "!ContentGroup configuration"/"When does the content rotate?" select "Content rotates each time you change node".  In this scenario, this means that the content will never actually rotate for a single user, which is what we want. 
    4040 1. Make sure that "In what order should the content displayed?" is "Randomly" 
    4141 1. Just add more than one clue assigned to the nodes where you want your users to branch off. 
    4242 
    43 Note that An alternative is to use a nested ContentGroup at each node. 
     43Note that an alternative is to use a nested !ContentGroup at each node. 
    4444 
    45 ===  Adding prises or special events in certain time-windows === 
    46 There are several ways to do this, but the simplest is to create a second, independent ContentGroup (also linked network-wide), in which the different special prizes (password for free beer, etc.) are listed (for each nodes they apply at).  For each content group element, list the start and end time of the special event. 
     45===  Giving prizes or advertizing special events in certain time-windows === 
     46There are several ways to do this, but the simplest is to create a second, independent !ContentGroup (also linked network-wide), in which the different special prizes (password for free beer, etc.) are listed (for each nodes they apply at).  For each content group element, list the start and end time of the special event. 
    4747 
    48 == Doing a content "walk"== 
     48== Doing a content "walk" == 
    4949This is basically an exhibit in which the user must physically change location to get the next piece. 
    50  1. Link a new ContentGroup network-wide. 
    51  1. In "ContentGroup configuration"/"When does the content rotate?" select "Content rotates each time you change node". 
     50 1. Link a new !ContentGroup network-wide. 
     51 1. In "!ContentGroup configuration"/"When does the content rotate?" select "Content rotates each time you change node". 
    5252 1. Add your pieces of content to the content group. 
    5353 
     
    7474 
    7575== Displaying parts of another website == 
     76Use the IFrame content type 
    7677 
    77 == Integrating with an existing locative CMS == 
     78== Integrating with another website or CMS == 
     79The SmartyTemplate content type allows passing auth server variables to a remote server if it accepts input as http GET parameters.  The following example show two approaches.  
     80=== IRC chat example using a simple HTML link to pass get variables === 
     81This example code allows using a [http://www.linux-quebec.org/cgi-bin/cgiirc/irc.cgi IRC web interface] to connect to the #wifidog channel directly.  You'd normally have to pick your username and the channel manually.  The following will create a link ('Chat with wifidog developers') that will get you directly into the #wifidog channel, telling other users where you are connecting from if you are physically at a hotspot. 
     82{{{ 
     83{if $userName} 
     84<a target='_new' href='http://www.linux-quebec.org/cgi-bin/cgiirc/irc.cgi?interface=nonjs&Nickname={$userName|remove_accents|urlencode}{if $realNodeName}{'|'|urlencode}{$realNodeName|remove_accents|urlencode}{/if}&Realname={$userName|remove_accents|urlencode}{if $realNodeName}{'@'|urlencode}{$realNodeName|remove_accents|urlencode}{/if}&Server={'irc.freenode.net'|urlencode}&Channel={'#wifidog'|urlencode}'> 
     85Chat with wifidog developers</a> 
     86{/if} 
     87}}} 
     88 
     89=== ShoutBox example using JavaScript to pass get variables === 
     90This code will send a copy of the users's shouts to another website, and open it in a new window.  It was developped to integrate ISF's network with [http://cwide.org/ CityWide].  To try it: 
     91 * Create a ShoutBox 
     92 * Add a SmartyTemplate in "Shout button 'onclick=' value" 
     93 * Paste the following in the SmartyTemplate, without newlines 
     94 
     95{{{ 
     96window.open('http://www.cwide.org/scripts/cwide_addMsgAndRedirect.php?hotspotID={$realNodeId}&hotspotName={$realNodeName|urlencode}&message='+escape(document.getElementById('shout_text').value)+'&ipAddress={$realNodeLastHeartbeatIP}&username={$userNam|urlencode}'); 
     97 
     98}}} 
    7899 
    79100== Displaying RSS feeds ==