Search DominoPower's 10,675 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
WEB DEVELOPER STEP-BY-STEP
An easy way to build your own simple, text-based Domino hit counter
By Frank Cseh

Web page hit counters are popular; it doesn't matter in how many flavors they appear. In March, DominoPower ran an article about how to create a graphical hit counter (graphic images of the numbers would change). In this article, I'm going to show how to write a simple text-based counter.

It's valid for Domino based Web sites, as well. The best counter product is the nicest looking one and/or the simplest one to implement. I tend to go for the easy to create, simple hit counter.

I've seen solutions offered for Domino counters on the Web, both free and commercial. I just didn't have the urge to implement them on my internal Web sites. I needed a simple solution. Lately I've worked a lot with profile-form based documents, a really great feature in Notes. Profile documents are not created from the Create menu, do not appear in any views, and are not included in the document count for a database. A simple mind (Ok, it was me) would say that if I had a "server-side" environment variable and I could increment it when the user enters the Web site, I would then have a hit counter. That is what I created with the help of profile documents.

My hit counter was conceived to increment a field value of a profile document on WebQueryOpen event. That event is triggered when the visitor is entering the web site.

I think my Domino hit counter is simple to understand and implement and, I hope, well explained here.

Getting Started
To create a hit counter, you need a customizable Navigator in your Domino database.

Let's call the navigator MainNavigator for example. The form $$NavigatorTemplate for MainNavigator is where your navigator is embedded and is also where your counter will appear.

You also need a form with two fields for the profile document creation. Two agents are also needed: one is to create the profile document, and one to increment the counter.

Next, I will show the process of the counter creation step by step. Each step is illustrated with appropriate screen shots.

Step 1: Create the counter form
Start with the profile form. Create a new form and name it, for example: TheCounterForm, as shown in Figure A. On the form, create an editable text field and name it, for example: TheCounter. Also create a computed-when-composed text field, and name it: $PublicAccess.

FIGURE A

Create the counter form

For the computation formula enter: 1 (i.e., decimal number one).

There is still a bit more work you need to do before you can save the new form. Right click on the form and select Form Properties. Select the security tab (the key symbol), and select the Available to Public Access Users checkbox, as shown in Figure B. In the form properties you should also deselect Include in Menu checkbox. Now you can save the form .


1  ·  2  ·  3  ·  Next »
Other articles you might like
Home > Lotus Technologies > Domino (69 articles)
   Centralised email encryption at the Domino server level
   Getting the Domino server time with @Now
   When the email flood inundates the Domino Server
Home > Lotus Technologies > LotusScript (64 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Little known traps about Lotus Notes fields
Home > Tips & Techniques (95 articles)
   When the debugger won't debug hidden code that isn't hidden
   What to do if the LotusScript debugger won't single-step over code
   Troubleshooting an OpenSuse Notes install
Home > Lotus Technologies > Application Development (47 articles)
   How hide-whens in Rich Text can ruin your whole day (and what to do about it)
   Little known traps about Lotus Notes fields
   Integrating a Notes Connector database with Google Enterprise Search
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
What to look for in a Domino-based document management solution
Understanding Domino.doc end-of-life options
When the debugger won't debug hidden code that isn't hidden
What to do if the LotusScript debugger won't single-step over code
Top 10 ways to launch and build a Lotus consulting practice (with a little help from the Beatles)
Troubleshooting an OpenSuse Notes install
Incident report: denial of service attack against ConnectedPhotographer.com
Latest Lotus Headlines
SnTT - Enabling ALL the bells and whistles!
Tivoli Data protection causes Domino to crash
Fun when running DB2 CLP scripts
Introducing Flippr, the easy way to admin Quickr
DXL and fake security
Using search forms in IBM Workplace Collaborative Learning 2.7
Schmidt, Freed, and Gering on the OVF Toolkit
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Eight steps to successful and reliable home backups
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Can Outlook run when it's not running (and other mysteries)?
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Sophisticated Meets Simple For Document Management
Share. Control. Manage.
Documents, emails, and content in the context of how work is done. Native to Lotus Domino. The User Experience unseen for Lotus Domino. Do more with less. Really.

See the possibilities Docova unleashes for Lotus Domino.
ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2009, ZATZ Publishing. All rights reserved worldwide.
Editor's Login