You are not logged in Log in Join
You are here: Home » Members » gawel » Wiki » WhoOnline

Log in
Name

Password

 
 

WhoOnline

Features

This product is use to store who is online in a Zope Site.

After a configurable idle time, user is considered as inactive.

Install

First download the last release.

Untar the release in your $INSTANCE_HOME/Products directories.

Restart Zope

Go in then ZMI and add a Who Online Product.

Install for CMF/Plone

Create an External Method at the root of your CMFSite? :

    Id: WhoOnlineInstall

    Title:

    Module Name: WhoOnline.Install

    Function Name: install

And run it by clicking the test tab.

OR

Install the CMFQuickInstallerTool (A nice Product !) and use it.

For Plone2 use the portal_quickinstaller

Usage

The WhoOnline Product intercept all request to update is values.

He store the request.SESSION.getId(), member id if possible and the curent time.

Remember that WhoOnline works differently in a Standalone Zope Site and in a CMF/Plone Site.

The difference result that in a standalone Zope site the who_online/getActiveMembers method return only member id. In a CMFSite? this method return a list of member object.

The who_online/getActiveVisitors return number of Anonymous Users curently active.

Notes : You can have more than one WhoOnline instance in your tree. By example, you can have one at the root of your site to see who navigate on your site and one other on the PloneChat? page to see who want to chat.

Create your template

If you have install the product for CMF you allready have a Page Template design for Plone at yourCMFSite/portal_skins/zpt_who_online. You just have to customize it :)

Here a small DTML Method for Zope Standalone Site :

    <dtml-var standard_html_header>
    <h2><dtml-var title_or_id> <dtml-var document_title></h2>
      <p>
        This document show the current avtive members
      </p>
      <dtml-in expr="who_online.getActiveMembers()">
        <dtml-var sequence-item>
      </dtml-in>
    <dtml-var standard_html_footer>

Or with ZPT :

    <div tal:repeat="user here/who_online/getActiveMembers">
       <div tal:content="user">
    </div>

ZMI Options

  • idle: delai between two request to considered the user as inactive.
  • ignore_ZMI: if checked, user in the ZMI are ignore.