|
Cookbook /
WhosWhereSummary: Show Who's Where on your wiki
Version: 2009-03-08
Prerequisites: SQL5, SQLite, PDO, PHP5
Status: Experimental
Maintainer: Peter Bowers
Download: whoswhere.phpΔ
Discussion: WhosWhere-Talk
Questions answered by this recipe
DescriptionKeep track of and display Who's Where and what they're doing on your site. NotesPlace the markup (:whoswhere:) in the location where you want the information to be displayed. A table such as this will be displayed:
There are security implications to the use of this recipe. A hidden or secured group or page will be reported regardless of whether authorization is present. If that doesn't work for you site then you probably ought not to use this recipe. (Or else give me a suggestion how to limit it...) The markup can be extended with arguments determining a header and the detail lines for either non-authorized users or authorized users. For example:
(:whoswhere noauthheaderfmt="|| border=1\n|| ip address || author ||" noauthdetailfmt="|| {ip} || {author} ||":)
If a non-authorized user viewed a page with that markup they would see something like this:
However, an authorized viewer (someone who has logged in) would still see the default set of columns. There are 4 variables that can be set within the markup:
InstallationPlace whoswhere.phpΔ in your cookbook directory and include the usual
in your config.php. If desired, override configuration variables. Defaults follow:
$wwSeconds = 20*60; // display activity within the last 20 minutes
$wwExpire = 60*60*24; // keep info in the database for the last 24 hours
$wwDatabase = "sqlite:$WorkDir/whoswhere.sqlite.db"; // database type/location
$wwHeaderFmt = "|| border=1\n||! Who? ||! Where? ||! Doing What? ||! When?||";
$wwDetailFmt = '|| {allauth} || {pn} || {action} || {date} ago||';
$wwNoAuthDetailFmt = '';
$wwNoAuthHeaderFmt = '';
$wwFields = 'allauth|ip|authid|author|pn|action|date'; // {fields} that will be substituted
$wwNoAuthFields = '';
In every case of a $wwNoAuth* variable it will default to the authorized variable value as long as the NoAuth value is blank. In other words as long as $wwNoAuthFields is blank (the default) it will use the $wwFields even if the user is not logged in. Note in particular the potential for limiting which fields can be displayed for either authorized users ($wwFields) or non-authorized users ($wwNoAuthFields). If a field is requested which is no allowed (for instance, someone could ask for a sensitive field via the markup) then the field will appear, but it will simply not be substituted with an appropriate value. Release Notes
See AlsoContributorsRoadmap, Requested FeaturesCommentsSee discussion at WhosWhere-Talk
User notes?: If you use, used or reviewed this recipe, you can add your name. The following format is recognized:
* (+) Optional positive comment. Name, date * (-) Optional negative comment. Name, date These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |