Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Interchange: users

View-Counter UserTag?

 

 

Interchange users RSS feed   Index | Next | Previous | View Threaded


ibox23 at iserv

Jul 22, 2013, 11:12 AM

Post #1 of 4 (53 views)
Permalink
View-Counter UserTag?

Hi,

I'm looking for a "View-Counter" UserTag in Interchange.

We are in the process of tranferring our website to Interchange.
I'm stumbling over an issue however.

For our current website I programmed a simple perl script "counter.cgi"
that writes the IP address of the visitor to a log file each time it is invoked.
Via an <!--#include virtual=..--> we include this script into the page that we want to monitor.

In Interchange I can't find a comparable UserTag however.
I searched the Interchange coretags, UI, standard demo, CPAN, but no luck.
It seems there is no "central repository" of Interchange UserTag contributions.

Before I start coding myself..
Did anyone make such a UserTag?

Thanks in advance!

Marjan Waldorp,
Tux4u.nl

_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


mike at perusion

Jul 22, 2013, 11:44 AM

Post #2 of 4 (51 views)
Permalink
Re: View-Counter UserTag? [In reply to]

Quoting Iserv-appbox (ibox23 [at] iserv):
> Hi,
>
> I'm looking for a "View-Counter" UserTag in Interchange.
>
> We are in the process of tranferring our website to Interchange.
> I'm stumbling over an issue however.
>
> For our current website I programmed a simple perl script "counter.cgi"
> that writes the IP address of the visitor to a log file each time it is invoked.
> Via an <!--#include virtual=..--> we include this script into the page that we want to monitor.
>
> In Interchange I can't find a comparable UserTag however.
> I searched the Interchange coretags, UI, standard demo, CPAN, but no luck.
> It seems there is no "central repository" of Interchange UserTag contributions.
>
> Before I start coding myself..
> Did anyone make such a UserTag?
>

<!-- [log file="logs/hits/@@MV_PAGE@@" create=1 interpolate=1][data session ohost] [time fmt="%Y-%m-%d %H:%M:%S][/log] -->


--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.253.4194 <mike [at] perusion>

Find the grain of truth in criticism, chew it, and swallow
it. -- anonymous

_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


gert at 3edge

Jul 22, 2013, 11:46 AM

Post #3 of 4 (51 views)
Permalink
Re: View-Counter UserTag? [In reply to]

> -----Original Message-----
> From: interchange-users-bounces [at] icdevgroup [mailto:interchange-users-
> bounces [at] icdevgroup] On Behalf Of Iserv-appbox
> Sent: maandag 22 juli 2013 21:13
> To: interchange-users [at] icdevgroup
> Subject: [ic] View-Counter UserTag?
>
> Hi,
>
> I'm looking for a "View-Counter" UserTag in Interchange.
>
> We are in the process of tranferring our website to Interchange.
> I'm stumbling over an issue however.
>
> For our current website I programmed a simple perl script "counter.cgi"
> that writes the IP address of the visitor to a log file each time it is
> invoked.
> Via an <!--#include virtual=..--> we include this script into the page
> that we want to monitor.
>
> In Interchange I can't find a comparable UserTag however.
> I searched the Interchange coretags, UI, standard demo, CPAN, but no luck.
> It seems there is no "central repository" of Interchange UserTag
> contributions.
>
> Before I start coding myself..
> Did anyone make such a UserTag?

http://interchange.rtfm.info/icdocs/config/HitCount.html

Have never used it, have no idea if it works, but if the description is
correct then this might do what you look for. I can imagine it is a too
broad counter and you might want a count per page or something.

Other than that if I remember correctly the Interchange admin has some
facilities to show statistics, which perhaps gives more than just a basic
counter for a page.

And no there is no central repo of Tags.

CU,

Gert

>
> Thanks in advance!
>
> Marjan Waldorp,
> Tux4u.nl


_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


mike at perusion

Jul 22, 2013, 12:03 PM

Post #4 of 4 (52 views)
Permalink
Re: View-Counter UserTag? [In reply to]

Quoting Mike Heins (mike [at] perusion):
> Quoting Iserv-appbox (ibox23 [at] iserv):
> > Hi,
> >
> > I'm looking for a "View-Counter" UserTag in Interchange.
> >
> > We are in the process of tranferring our website to Interchange.
> > I'm stumbling over an issue however.
> >
> > For our current website I programmed a simple perl script "counter.cgi"
> > that writes the IP address of the visitor to a log file each time it is invoked.
> > Via an <!--#include virtual=..--> we include this script into the page that we want to monitor.
> >
> > In Interchange I can't find a comparable UserTag however.
> > I searched the Interchange coretags, UI, standard demo, CPAN, but no luck.
> > It seems there is no "central repository" of Interchange UserTag contributions.
> >
> > Before I start coding myself..
> > Did anyone make such a UserTag?
> >
>
> <!-- [log file="logs/hits/@@MV_PAGE@@" create=1 interpolate=1][data session ohost] [time fmt="%Y-%m-%d %H:%M:%S][/log] -->

Actually, besides missing a quote, that won't work unless the file already
exists. Creating such a thing is pretty easy:

UserTag log-hits Routine <<EOR
sub {
my $page = $Tag->var('MV_PAGE', 1);
my $fn = "logs/hits/$page";
my $data = join "\t", $Session->{host}, $Tag->time({ fmt => '%Y-%m-%d %H:%M:%S'});
if(-f $fn) {
$Tag->log( { file => $fn }, $data);
}
else {
$data .= "\n";
$Tag->write_relative_file( { file => $fn }, $data);
}
return;
}
EOR


Now you just need [log-hits] in any page, and away you go.

--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.253.4194 <mike [at] perusion>

{((>:o}~ <<<<Oh look!!! An idolatrous image of the prophet!!! Surely
we must now avenge this blasphemy by burning down the world!!!

_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users

Interchange users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.