Home | Products | Consulting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Discontinued Products: Article Manager 1 Add-ons:
Hit Counter for Individual Articles?

 

 


woodwater
User

May 29, 2003, 3:50 PM

Post #1 of 4 (2672 views)
Shortcut
Hit Counter for Individual Articles? Can't Post

Is it possible to have a hit counter for individual articles that says

"This article has been viewed XX time(s)." ?


We can also expand on it and have a feature that list the most popular articles according to how many times it has been viewed.


Donna
Staff / Moderator


May 30, 2003, 10:01 AM

Post #2 of 4 (2667 views)
Shortcut
Re: [woodwater] Hit Counter for Individual Articles? [In reply to] Can't Post

Hi woodwater!

Thanks for the post. :)

Hmm. Do-able? I think so. How? Yeek, I've got no idea. It would take a rather ingenious script to manage that, I think. It's definitely not a feature that's built into Article Manager, but it's an interesting idea. :)

If you manage to get something like that together, I'd love to see it. :)

Donna


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.


BillG
User

May 30, 2003, 10:58 AM

Post #3 of 4 (2664 views)
Shortcut
Re: [woodwater] Hit Counter for Individual Articles? [In reply to] Can't Post

I don't know how to do it in CGI, but in Active Server Pages you can use the PageCounter component.

Create a file called counter.asp, in a subdirectory ASPScript, with the following code:

Code
  

<%

'Instantiate the PageCounter object in IIS5

' In IIS4 you may have to use IISSample instead of MSWC
Set MyPageCounter = Server.CreateObject("MSWC.PageCounter")

'Increment the counter for this page.
MyPageCounter.PageHit

thisPage = Request.ServerVariables("URL")

If Server.HTMLEncode(Request.QueryString("clear")) = "321" Then
'Reset the counter for this page, and reload

MyPageCounter.Reset(thisPage)

Response.Redirect(thisPage)
End If

Response.Write("<DIV class=PageCount>This Page has

been viewed " & MyPageCounter.Hits & " times</div>")

%>



Then, add the following to your AM Article template:

<!--#Include virtual="ASPScript/counter.asp"-->

The cool thing about this is that you can reset any article's counter to zero by adding

?clear=321

to the end of any article URL.

Of course, this assumes that you are using ASP pages and that your article's pages all end in .asp .


Benjamin
Staff


Jun 4, 2003, 3:57 PM

Post #4 of 4 (2617 views)
Shortcut
Re: [woodwater] Hit Counter for Individual Articles? [In reply to] Can't Post

Hey guys, check out the following thread: http://www.interactivetools.com/forum/forum.cgi?post=12737

Smile
Ben
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4