Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 33716 invoked from network); 20 Aug 2004 07:33:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Aug 2004 07:33:46 -0000 Received: (qmail 1699 invoked by uid 500); 20 Aug 2004 07:33:28 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 1604 invoked by uid 500); 20 Aug 2004 07:33:27 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: users@cocoon.apache.org Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 1583 invoked by uid 99); 20 Aug 2004 07:33:26 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received: from [146.64.10.166] (HELO wabe.csir.co.za) (146.64.10.166) by apache.org (qpsmtpd/0.27.1) with ESMTP; Fri, 20 Aug 2004 00:33:23 -0700 Received: from cs-emo.csir.co.za (cs-emo.csir.co.za [146.64.10.40]) by wabe.csir.co.za (8.12.5/8.12.5) with ESMTP id i7K7WocK008943 for ; Fri, 20 Aug 2004 09:32:50 +0200 Received: from GW-EMO-MTA by cs-emo.csir.co.za with Novell_GroupWise; Fri, 20 Aug 2004 09:32:50 +0200 Message-Id: X-Mailer: Novell GroupWise Internet Agent 6.5.1 Date: Fri, 20 Aug 2004 09:32:35 +0200 From: "Derek Hohls" To: Subject: Re: dynamcically altering a global variable Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-CSIR-MailScanner-Information: Please contact sys-admin at csir dot co dot za for more information X-CSIR-MailScanner: Found to be clean X-MailScanner-From: dhohls@csir.co.za X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Alternatively you could be using flow for this and reading the variable from an xml file - along with any other useful info such as user name etc - and also checking the time using javascript in flow and testing if the last login was before/after midnight and then resetting as needed. AFAIK (and a little knowledge is a dangerous thing!) the so-called "global variable" in the Cocoon sitemap is more like a "global constant"... but I'd like to hear differently. [There was a previous thread on dynamically creating subsitemaps... I thibnk one of the developers said it could be done but was somewhat dubious about its lack of merits and possible dangers... but, hey, you're a programmer and current "Master of the Universe"!!] >>> jh@domek.be 2004/08/20 09:19:20 AM >>> Alternatively, you could log every logon to the system with a database timestamp and do checking there. It's just a matter of what is more familiar to you, there are various ways of achieving this. Paul Joseph wrote: > Hi, > > I am wondering how best to do this in Cocoon: > > When a user logs in, the user has to check if they are > the first person to login for the day and if so, do > some tasks. > > To do this, I though of setting a global variable say > FIRST_LOGIN=true at midnight every night - using the > Quartz scheduler. > > Then when a user logged in, as part of the > authentication logic, I would have them check this > variable and do the action if it was true. Of course, > after doing the action, they would set this variable > to false. > > Any pointers as to how this can best be done would be > appreciated. I am unable to implement this approach > at present as I do not know how to set a global > variable whose value can be altered dynamcially. > > thx > Paul --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org For additional commands, e-mail: users-help@cocoon.apache.org