Search DominoPower's 11,320 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
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Five trends for 2010
DominoPower TV Episode 1: Inside a strategy session with Teamstudio
More about Domino log files
Say goodbye to the Uh-Ohs. Long live the Tens.
Why your log.nsf might not be purging properly
Latest Lotus Headlines
SnTT: XPages Blank Calendar Control (Part 2), adding data
Have your Lotus Notes calendar display multiple time zones
Sample Database for Microsoft Office and Lotus Symphony Integration
Symphony 3.0 beta signals another attack on Office
Enabling DAOS on a database - new recommendation
Need your opinion on some new policy settings for Mail
Sometimes IBM Lotus Domino HTTP RPC Agents aren't the answer...
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad: Apple's latest heartbreaker
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Running auto-respond rules when Outlook is closed
-- 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 --

Teamstudio announces the 2010 spotlight awards winners!
We had some extraordinary submissions for the 3rd annual Teamstudio Spotlight Awards, and choosing the winners was no easy task for our judges! Click here to find out who won, and to learn more about these remarkable applications and the genius developers behind them!

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