Search DominoPower's 11,443 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 (77 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   Sloppy analysis at the core of another Domino vs. SharePoint report
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 (102 articles)
   More about Domino log files
   Why your log.nsf might not be purging properly
   A faster way to repair corrupted server files
Home > Lotus Technologies > Application Development (48 articles)
   An application for scanning physical mail and distributing it virtually
   How hide-whens in Rich Text can ruin your whole day (and what to do about it)
   Little known traps about Lotus Notes fields
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
Syncing Notes with Android phones
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Online safety for virtual learning
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Seek and find: Strategies to locate filed-away emails fast
-- 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.
-- Advertisement --

Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.

Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).

Tap here to get started!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login