Tags:
create new tag
, view all tags

Where-Is Plugin

Where is a person? Show where and when TWiki users were last seen

Introduction

whereis-64.png
It it is useful to know where members of an organization are, especially with employees traveling between offices and visiting clients. This plugin makes it easy to see where users are, or where they have been recently while accessing the TWiki site.

Locations are tracked by IP address. A location can be named, such as "Cupertino office", "Tokyo office", "Brian's home office", etc. A new location is automatically established if the GeoLookupPlugin is installed and enabled.

User Interface

whereis-dialog2.png
A dialog is shown when a user visits the TWiki site from an unknown location. The user can specify a name for the location.

The location data is shown as follows:

  • User profile pages show the user's last location and time next to the person's name.
  • whereis-left-button-gray.png button in the left topic margin, linking to the WhereIs topic.
  • The WhereIs topic shows user location data.

The WhereIs topic has two tabs:

  • The "Recently Seen" tab shows recent user locations.
  • The "Locations" tab shows known locations.

recently-seen.png
The "Recently Seen" tab shows the locations of the 20 most recent users. The limit can be changed.

The "Locations" tab shows a table with known locations and users last seen at each location. Users can update their current location; site administrators can update all locations and can add new locations. Hover over a row to update the location.

Syntax Rules

There is none for end users. Site administrators can customize the functionality.

Site Admin Documentation

Read this if you want to customize the functionality of the plugin.

This plugin handles a WHEREIS variable. All interaction is done via this variable. The functionality is determined by an action parameter.

WHEREIS{ action="recordlocation" } - record the location

%WHEREIS{ action="recordlocation" }% records the location of the logged in user. No additional parameters are supported. No action is done if the user is not authenticated.

This variable needs to be called to record user location. It can be done by enabling the whereis skin template, which contains the variable. Example setting in TWikiPreferences:

  • Set SKIN = whereis, topmenu, pattern

Alternatively, add the variable anywhere to a skin template within the body tags.

Please note that the whereis skin template and the tagme skin template clash and can't be used together. If you want to use tagging and this plugin you need to manually merge the content of template/view.tagme.tmpl into template/view.whereis.tmpl, and set the SKIN to whereis, topmenu, pattern.

WHEREIS{ action="setlocation" } - set location name

%WHEREIS{ action="setlocation" }% sets the name of a location associated with the IP address of the logged in user. Additional parameters:

Parameter Explanation Default
address="..." IP address IP address of logged in user
location="..." Location name  

WHEREIS{ action="showlocation" } - show user location

%WHEREIS{ action="showlocation" }% shows the location and time of a user. Additional parameters:

Parameter Explanation Default
user="..." WikiName of user logged in user
lastseenmsg="..." Last seen message. Variables:
$wikiname - WikiName of the user, such as JimmyNeutron
$wikiusername - Web.WikiName of user, such as Main.JimmyNeutron
$spacedname - spaced-out WikiName of user, such as Jimmy Neutron
$location - name of location
$ago - elapsed time
{LastSeenMsg} configure setting
notseenmsg="..." Not yet seen message.
• Same $wikiname, $wikiusername and $spacedname variables as above.
{NotSeenMsg} configure setting

WHEREIS{ action="editlocations" } - show and edit known locations

%WHEREIS{ action="editlocations" }% shows a table with known locations and users last seen at each location. Hover over a row to update a location. Use the last row to add a location. Additional parameter:

Parameter Explanation Default
limit="..." Limit number of recent entries "100"

WHEREIS{ action="showrecent" } - show recent location

%WHEREIS{ action="showrecent" }% shows recent locations and times of users. Additional parameters:

Parameter Explanation Default
limit="..." Limit number of recent entries "20"
header="..." Table header "| User | At location | Last seen |"
format="..." Format of a table row. Variables:
$wikiname - WikiName of the user
$wikiusername - Web.WikiName of user
$spacedname - spaced-out WikiName of user
$location - name of location
$ago - elapsed time
"| $wikiusername | $location |  $ago |"

Plugin data

The IP address data and user access data is stored in the plugin's working area at twiki/working/work_areas/WhereIsPlugin.

IP address data is stored in files named addr-<ip>.txt, e.g. one file per recorded IP address. This data is used to map from IP address to location name.

User access data is stored in files named addr-<wikiname>.txt, e.g. one file per user. This data is used to record the most recent access time and IP address of a user.

Plugin Installation & Configuration

You do not need to install anything on the browser to use this plugin. These instructions are for the administrator who installs the plugin on the TWiki server.

  • For an automated installation, run the configure script and follow "Find More Extensions" in the in the Extensions section.

  • Or, follow these manual installation steps:
    • Download the ZIP file from the Plugins home (see below).
    • Unzip WhereIsPlugin.zip in your twiki installation directory. Content:
      File: Description:
      data/TWiki/WhereIsPlugin.txt Plugin topic
      data/TWiki/WhereIs.txt Report topic
      pub/TWiki/WhereIsPlugin/*.gif and *.png Image files
      templates/view.whereis.tmpl Skin template
      templates/whereisdialog.tmpl New location dialog box template
      templates/whereiseditlocations.tmpl Edit location table template
      lib/TWiki/Plugins/WhereIsPlugin.pm Plugin Perl module
      lib/TWiki/Plugins/WhereIsPlugin/Core.pm Plugin Perl module
      lib/TWiki/Plugins/WhereIsPlugin/Config.spec Configure spec file
    • Set the ownership of the extracted directories and files to the webserver user.

  • Plugin configuration:
    • Run the configure script and enable the plugin in the Plugins section.
    • Configure additional plugin settings in the Extensions section if desired.

  • Enable location tracking:
    • Add the whereis skin template to the SKIN path. Example setting in TWikiPreferences:
      • Set SKIN = whereis, topmenu, pattern
    • There are alternatives, see site admin docs above

  • Show location in user profiles:
    • Edit UserProfileHeader and add the user location next to the user's name:
      ---+!! %FORMFIELD{ "FirstName" topic="%INCLUDINGTOPIC%" }% %FORMFIELD{ "LastName" topic="%INCLUDINGTOPIC%" }% <span style="font-size: 60%"> %FORMFIELD{ "StatusUpdate" topic="%INCLUDINGTOPIC%" }% &mdash; [[%SYSTEMWEB%.WhereIs][<img src="%PUBURLPATH%/%SYSTEMWEB%/WhereIsPlugin/whereis.gif" alt="" title="Where is?" width="16" height="16" border="0" />]] %WHEREIS{ user="WhereIsPlugin" }%</span>

  • Test if the configuration is successful:
    • Visit your user profile topic - it should show your location.
    • Visit WhereIs - it should show locations of recent users.

Plugin Info

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Where is a person? Show where and when TWiki users were last seen

Plugin Author: TWiki:Main.PeterThoeny
Copyright: © 2014-2015 Wave Systems Corp.
© 2014-2015 TWiki:Main.PeterThoeny
© 2014-2015 TWiki:TWiki.TWikiContributor
License: GPL (GNU General Public License)
Sponsor: Wave Systems Corp.
Plugin Version: 2015-01-07
2015-01-07: TWikibug:Item7568: Add Help tab to WhereIs topic
2014-09-24: TWikibug:Item7527: Web-based deletion of locations; allow broader IP address ranges x.x in addition to x.x.x and x.x.x.x
2014-07-03: TWikibug:Item7527: Update names of known locations; add new location in WhereIs topic; performance tuning
2014-07-02: TWikibug:Item7527: Show known locations in WhereIs topic; doc improvements
2014-07-01: TWikibug:Item7527: Show dialog box prompting user to specify a name for unknown locations
2014-06-30: TWikibug:Item7527: Initial version
TWiki Dependency: $TWiki::Plugins::VERSION 1.2
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
Plugin Benchmark: GoodStyle nn%, FormattedSearch nn%, WhereIsPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/WhereIsPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/WhereIsPluginDev
Appraisal: http://TWiki.org/cgi-bin/view/Plugins/WhereIsPluginAppraisal

Related Topics: WhereIs, TWikiPlugins, AdminDocumentationCategory, TWikiPreferences

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatmd5 WhereIsPlugin.md5 r10 r9 r8 r7 r6 manage 0.2 K 2015-01-08 - 00:29 PeterThoeny  
Compressed Zip archivetgz WhereIsPlugin.tgz r10 r9 r8 r7 r6 manage 177.2 K 2015-01-08 - 00:29 PeterThoeny  
Compressed Zip archivezip WhereIsPlugin.zip r10 r9 r8 r7 r6 manage 183.3 K 2015-01-08 - 00:29 PeterThoeny  
Unknown file formatEXT WhereIsPlugin_installer r5 r4 r3 r2 r1 manage 4.0 K 2015-01-08 - 00:29 PeterThoeny  
Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r11 - 2015-01-08 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2016 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.