You are not logged in Log in Join
You are here: Home » Members » gawel » WhoOnline » WhoOnline HOW-TO » View Document

Log in
Name

Password

 

WhoOnline HOW-TO

How to use the WhoOnline Product

Features

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

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

Install

First download the last release.

Untar/unzip the release in your $INSTANCE_HOME/Products directories.

Restart Zope

Go in then ZMI and add a Who Online Product.

Install for CMF/Plone

After you have restart Zope, 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.

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 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 currents active members
      </p>
      <dtml-in expr="who_online.getActiveMembers()">
        <dtml-var sequence-item>
      </dtml-in>
    <dtml-var standard_html_footer>

Comment

Discussion icon Viewing rights?

Posted by: marcS at 2003-12-15

I get an "Insufficient Privileges" error when trying to view http://zope.org/Members/gawel/WhoOnline - could you please change the permissions accordingly?

Comment

Discussion icon Adaptation needed for Python 2.3.3 / Zope2.7.0 / Plone 2.0

Posted by: marcS at 2004-02-13

When migrating a plone site from Plone 2.0RC3/Zope2.6.2/Python2.1 to Plone 2.0/Zope2.7.0/Python2.3.3, I got a PTRuntimeError from the who_online_slot. Solution was to replace the line:

<tr tal:repeat="member python: who_online[:5];">

with:

<tr tal:repeat="member python: who_online[:5]">