Display Counter.
February 16, 2005 12:00 AM
When the first user opens the course, can Lectora write to a text file on the server on which this course is sitting? If yes, then can the file be read and updated everytime a new user opens the course. The check for new user can be done by setting a vaiable in Lectora and checking the Retain Variables between sessions.
Discussion (3)
I have a course and am publishing to HTML. On the first page I would like to have a message that says something like this: you are visitor number X.Is there a way I can do this in Lectora.Thanks.
Satya,This would still need to be done independent from Lectora. You could have a hidden Lectora form object on the first page with an on show action to immediately submit the form. Your form (which would be written outside of Lectora) could update the text file and then send a response back to the Lectora form. From the form properties, the response could be stored in a variable called 'hitcounter' or something that would contain the hits. Then use a second on show action to change the contents of a text block on the page to display the hitcounter variable.For more information on scripts, with documentation and examples see this related topic: CGI scripts
How do you plan on getting the number of visitors to the website? Once you know how you are going to determine that info (which is independent of Lectora), then we can tell you how you can get that info into a Lectora variable.Tim V
Discussions have been disabled for this post