PresenceAwareness

Summary: User-based authentication, a list of online logged users, tools to register and manage users and send posts via Jabber
Version: 1.1
Prerequisites: Last tested on PmWiki version: 2.0.beta54
Status:
Maintainer: Alessandro Sisto

NOTE: This script is based on UserAuth

Questions answered by this recipe

What does this script do?

Answer

It provides a User-based authentication like UserAuth, a list of online logged users, easy tools to register and to manage users, to send posts via Jabber.

Notes

Download

presence provides:

cookbook/presence.php
cookbook/presence-list.php
cookbook/presence-usertool.php
cookbook/presence-admintool.php
cookbook/presence-sendposts.php
cookbook/presence/HtPasswd.php
cookbook/presence/UserSessionVars.php
cookbook/presence/class.userslist.php
cookbook/presence/xajax.inc.php
cookbook/presence/presence.css
cookbook/jabberposts/class.jabber.php
cookbook/jabberposts/class.jabberposts.php

Description

  • presence.php: enables user-based authentication, like UserAuth;
  • presence-list.php: shows online users list by the markup (:xajax:); (optional)
  • presence-admintool.php: tool for administrator, create a new account, delete user...; (optional)
  • presence-usertool.php: enables users to create a new accounts and to modify profiles; (optional)
  • presence-sendposts.php: it sends posts, in various way, I developed only via Jabber; (optional)

Dependencies

presence.php
|
--- presence-list.php
|
--- presence-admintool.php

|
--- presence-usertool.php

presence-sendposts.php

Installation

  • Unpack tar.gz file in your Cookbook directory
  • Include the scripts in config.php:
require_once("cookbook/presence.php");
require_once("cookbook/presence-admintool.php");
require_once("cookbook/presence-usertool.php");
require_once("cookbook/presence-list.php");
require_once("cookbook/presence-sendposts.php");
  • Load your PmWiki. once to create the default files (.htpasswd, .onlineusers, .sendposts).
  • The first activation tries to creates .htpasswd (.onlineusers, .sendposts) in the "local" subdirectory of your pmwiki installation directory.
Ensure that this directory is owned by the web server user, if no the files will not be automatically created, so you have to create these file manually and set the right permissions.
  • Login as administrator, action=admin, default user and password for admin are "Admin" "Admin", and change password using the admin form.
  • Now you are ready to go.

Instructions

  • Administrator:
    to admin use the action=admin, this display the Administration Tool, you can manage users (ie. add, remove, modify)
  • User:
    to register a new user use the action=newuser
    once logged in to change your profile use action=chprof
  • Userlist:
    You can display the online users list using markup (:xajax:) Note: enable JavaScript
  • Sendposts:
    Every 2 hours sends notification of modified page

Releases

Release v1.1: corrected javascript generation.

Comments

hi, alessandro, very nice work! Would be very nice if in the presence list would be links to the Profiles page. I will try to do that. Even more nice would be a link that opens the messenger noskule October 30, 2005, at 07:57 AM

  • it seems that only logged-in users can see the presence of other users. Is there a way to change that so that all users can see it?
  • Yes, use Cookbook.PresenceAwarenessLight?, list is always available (alessandro, November 2, 2005 at 04.11 PM)

hi alessandro, I came over a problem by trying to make links from the user and the page he is working on. The presence-list.php dont display the page where the user is working on, if $EnablePathInfo = 1; . Is there a workaround for that? grz Profiles November 21, 2005, at 08:15 AM

hi, I love this plugin, and its been great for organising everything. However I had problems with the xajax inside brackets command. I finally traced this down to class.userslist.php starting with a < ? tag instead of a < ? php tag (spaces entered to stop accidental parse errors). This can cause all sorts of problems and was even locking up php or apache for me. TheFlyingPengwyn? January 17, 2007, at 09:31 PM

After following the installation instructions I get this error (from FF)
xajax_UpdateOnlineUsers is not defined: xajax_UpdateOnlineUsers(location.search.substr(1)); (PKHG)

you forgot to mention that the first activation (tries to) creates .htpasswd in the local directory, so if that has not good rights the recipe will fail. (PKHG).

The redirect from action=login only works for users with admin rights. When users don't have admin rights, it does not redirect to the page and says "Insufficient privileges to perform action." The login works, but the user has to click on another link before it activates. Any ideas would be great. (Steven)

Is anyone still maintaining this file? There should be quite a few updates to it such as what Steven mentioned above, some English fixed and possibly a way to add more fields to the self registration form. -Chris

See Also

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.