phpvisitor

Discuss news styles, css code, and other Coranto customizations in here...the possibilities are endless, so have at it!

Moderator: Spunkmeyer

phpvisitor

Postby Elenzi » Sun Mar 02, 2008 11:41 am

For those of you wondering about that, the easiest way to have PHPvisitor track your most read articles (by subject) is to insert the following in your style:

Code:
<?php include ('http://www.yourdomain.com/phpvisitor.php?mode=log&page_id=
<Field: Subject>'); ?>

i read all in documentation i did what it says ,make a profile stats ,standard, with the style <?php include ('http://www.yourdomain.com/phpvisitor.php?mode=log&page_id=
<Field: Subject>'); ?>

http://www.kavalanet.gr/stats/popular.php

take an error Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/eletheo/public_html/stats/popular.php on line 1


i put in the end of the teblate the code <?php include('http://www.kavalanet.gr/stats/phpvisitor.php?mode=log') ?>

in the end of the teblate i take


MODE: log AMOUNT: 6 hitcount_mode: n Table_header: mostread:


and in my page http://www.kavalanet.gr/stats.php
where i want to show mostread news
<?php include('http://www.mysite.com/phpvisitor.php'); ?>


MODE: mostread AMOUNT: 6 hitcount_mode: n Table_header: mostread:

mostread:
http://www.kavalanet.gr/stats/phpvisitor.php?mode=log 35

i spend 2 days without result
Elenzi
 
Posts: 21
Joined: Thu Feb 14, 2008 2:11 pm

Postby SrNupsen » Sun Mar 02, 2008 2:44 pm

Can you post here the contents of your stats.php and phpvisitor.php files? Or send me a private message with login information and I will try and fix it for you.

Are you sure that you have everything from <? to ?> on THE SAME LINE?
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Elenzi » Sun Mar 02, 2008 3:28 pm

how i can send you the file phpvisitor
Elenzi
 
Posts: 21
Joined: Thu Feb 14, 2008 2:11 pm

Postby SrNupsen » Sun Mar 02, 2008 4:03 pm

I received your files. Sadly, PHPvisitor as of now don't handle greek characters very well. I'll think about it for the next version, but for now you have to use UTF-8 encoding for your page id's...

I'm sorry :(
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby SrNupsen » Sun Mar 02, 2008 4:11 pm

Also, instead of this in your style:

Code: Select all
<?php include ('http://www.yourdomain.com/phpvisitor.php?mode=log&page_id=
<Field: Subject>'); ?>


try this:

Code: Select all
<?php
$page_id = "<Field: Subject>";
$mode = "log";
include ('http://www.kavalanet.gr/stats/phpvisitor.php');
?>




There is an error in popular.php. This line:

<?php include('http://www.kavalanet.gr/stats/phpvisitor.php?mode=mostread&amount=6$clickable_links') ?>


The "6$clickablelinks" is wrong.
Last edited by SrNupsen on Sun Mar 02, 2008 4:17 pm, edited 1 time in total.
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Elenzi » Sun Mar 02, 2008 4:12 pm

you have to use UTF-8 encoding for your page id's...

how i do this must change sql phpvisitor or all my site?
Elenzi
 
Posts: 21
Joined: Thu Feb 14, 2008 2:11 pm

Postby SrNupsen » Sun Mar 02, 2008 4:22 pm

OK I understand what you do wrong now. You shouldn't create a style with ONLY the include phpvisitor code in it, but you should add these lines to the code of every page you wish to track.

Your file popular.php tries to include phpvisitor.php hundreds of times, and that won't work. You do it ONCE on every page you want to count.

Then, you do it ONCE where you want to print out table of most viewed news.
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Elenzi » Sun Mar 02, 2008 4:36 pm

i dont understand ,i delete the the profile and style
and then i put this



Code:
<?php include ('http://www.yourdomain.com/phpvisitor.php?mode=log&page_id=
<Field: Subject>'); ?>


try this:

Code:
<?php
$page_id = "<Field: Subject>";
$mode = "log";
include ('http://www.kavalanet.gr/stats/phpvisitor.php');
?>

i tried yesterday this and now if i put this in
http://www.kavalanet.gr/stats/stats.php

i tried both look
Elenzi
 
Posts: 21
Joined: Thu Feb 14, 2008 2:11 pm

Postby Elenzi » Sun Mar 02, 2008 4:59 pm

tried in books pages i put in style books_pages in the end
the code you suggested
<?php
$page_id = "<Field: Subject>";
$mode = "log";
include ('http://www.kavalanet.gr/stats/phpvisitor.php');
?>

in the end of new show

MODE: log AMOUNT: 6 hitcount_mode: n Table_header: mostread:

is it wrong?
Elenzi
 
Posts: 21
Joined: Thu Feb 14, 2008 2:11 pm

Postby Elenzi » Sun Mar 02, 2008 5:16 pm

i disable the profile

i think the problem is in this code
<?php
$page_id = "<Field: Subject>";
$mode = "log";
include ('http://www.kavalanet.gr/stats/phpvisitor.php');
?>

or<?php include ('http://www.kavalanet.gr/stats/phpvisitor.php?mode=log&page_id=<Field: Subject>'); ?>

in one line
Elenzi
 
Posts: 21
Joined: Thu Feb 14, 2008 2:11 pm

Postby SrNupsen » Sun Mar 02, 2008 9:00 pm

I released version 1.02 which fixes some small bugs. Please go to http://www.enkeldata.no/phpvisitor/download to download it.

Note Elenzi: You just need to copy the new phpvisitor.php file - nothing else.

in the end of new show

MODE: log AMOUNT: 6 hitcount_mode: n Table_header: mostread:

is it wrong?


Yes, this is wrong. Fixed in new version.
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway

Postby Elenzi » Mon Mar 03, 2008 7:26 am

OK I understand what you do wrong now. You shouldn't create a style with ONLY the include phpvisitor code in it, but you should add these lines to the code of every page you wish to track.

so i upload the new files ,also create sql for the beging
i add in style books_pages

<?php
$page_id = urlencode("<Field: Subject>");
$mode = "log";
include ('http://www.kavalanet.gr/stats/phpvisitor.php');
?>

Then, you do it ONCE where you want to print out table of most viewed news.


then add in http://www.kavalanet.gr/stats/stats.php

<?php include('http://www.kavalanet.gr/stats/phpvisitor.php'); ?>


i take this

mostread:
http://www.kavalanet.gr/stats/phpvisitor.php 5
http://www.kavalanet.gr/stats/phpvisitor.php?mode=log 3

how i will take list of 6 most popular pages with the subject
Elenzi
 
Posts: 21
Joined: Thu Feb 14, 2008 2:11 pm

Postby Elenzi » Wed Mar 05, 2008 6:35 am

any answer
Elenzi
 
Posts: 21
Joined: Thu Feb 14, 2008 2:11 pm

Postby SrNupsen » Wed Mar 05, 2008 7:43 pm

I'll have to rethink that for the next version. Somehow the referer is incorrect on your page.

As for now I'm busy with my other, paid job.
-----------------------------------------------------------------------------------------------------
Coranto is free software. I am available for custom work or troubleshooting.

http://www.sundaune.no - transkripsjon, webdesign, nettsider, tekstbyrå
http://www.vagbladet.no - satire, politikk, kultur, sport, nettavis
-----------------------------------------------------------------------------------------------------
SrNupsen
 
Posts: 2229
Joined: Tue Jan 09, 2007 6:46 pm
Location: Nesodden, outside Oslo, Norway


Return to Customization

Who is online

Users browsing this forum: No registered users and 2 guests

cron