Jul 05, 2009, 01:38 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Donate to MODx: Donations
Pages: [1] 2 3   Go Down
  Print  
Author Topic: Support/Comments for Page Hit Counter  (Read 7187 times)
0 Members and 1 Guest are viewing this topic.
sottwell
Documentation Team
*
Posts: 8,837



WWW
« on: Aug 08, 2006, 05:45 AM »

This is an auto-generated support/comment thread for Page Hit Counter.

Use this forum to post any comments about this addition or any questions you have regarding its use.

Brief Description:
Plugin and module to count page visits.
Logged

sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html
sottwell
Documentation Team
*
Posts: 8,837



WWW
« Reply #1 on: Aug 08, 2006, 04:17 PM »

Version 2 uploaded now; adds an Ajax-based single page view.


* pagehitcounter.jpg (33.73 KB, 500x355 - viewed 1110 times.)
Logged

sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html
Soda
Testers
*
Posts: 415


Daddy !


WWW
« Reply #2 on: Aug 26, 2006, 01:23 AM »

Hello, I'm curious, and have a question, why don't you use the integrated table log ?
Logged

MODx Sites & Prestations: http://dp-site.fr   [Last MODx Site]
MODx Repository: [HOME]  [MetaTagsExtra] / Current Dev: [xFDM]
sottwell
Documentation Team
*
Posts: 8,837



WWW
« Reply #3 on: Aug 26, 2006, 02:52 AM »

Because those are very badly implemented and are going away.
Logged

sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html
Soda
Testers
*
Posts: 415


Daddy !


WWW
« Reply #4 on: Aug 26, 2006, 12:11 PM »

Ok thanks for your answer, I hope your solution will be integate in a future release.
Logged

MODx Sites & Prestations: http://dp-site.fr   [Last MODx Site]
MODx Repository: [HOME]  [MetaTagsExtra] / Current Dev: [xFDM]
Perrine
Moderators
*
Posts: 1,774



WWW
« Reply #5 on: Feb 03, 2007, 03:41 AM »

Hi there,

I've just installed Page Hit Counter plugin and I get this error on pages I use DittoCal :
Code:
« MODx Parse Error »
MODx encountered the following error while attempting to parse the requested resource:
« PHP Parse Error »
 
PHP error debug
  Error: file_get_contents(http://www.jauraisduluidire.com/blog-json-output) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
  Error type/ Nr.: Warning - 2
  File: /home/jaurais/www/manager/includes/document.parser.class.inc.php(748) : eval()'d code
  Line: 116

Anyone has ever tried to run both Page Hit Counter and DittoCal ?

Thx for help Wink
Logged

Nouveau sur MODx ? ||
Recherche
Communauté FR
Documentation FR
Réalisations sous MODx
Webolution
Entreprise AGS
J'aurais dű lui dire...
Atelier d'architecture Gambino
Déco'In : l'idée deco qu'il vous faut
HistWar : jeu de stratégie napoléonien

Ma config : MODx 0.9.6.2/3 || Apache 2.2.8 || PHP 5.2.6 || MySQL 5.0.45 || Debian 4.0 (Etch)
RMPnet
New Member
*
Posts: 1


« Reply #6 on: Feb 22, 2007, 05:53 PM »

Hi,
I'm new to Modx, and I'm trying to work things out for my self, but I'm stuck on this.

I can't work out how to display the current page count on the current page?
Do I need to create a new snippet and read the db again, or can I directly access the page_count variable used? or something else?

Regards
Keith.
Logged
sirlancelot
Coding Team
*
Posts: 575


PHP, XML, XSL Supporter


WWW
« Reply #7 on: Feb 23, 2007, 06:58 PM »

I can't work out how to display the current page count on the current page?
Do I need to create a new snippet and read the db again, or can I directly access the page_count variable used? or something else?
You will need to create a snippet that reads the database variable from the page_hit_counter table.
Logged

highlander
Member
**
Posts: 90



« Reply #8 on: Mar 02, 2007, 07:01 AM »

hi there ...

i've just installed the PageHitCounter module and it all works except that none of the images that the module references exist in my 095 installation and they are not supplied with the module. for example:

media/images/tree/folder.gif
media/images/tree/folderopen.gif
media/images/_tx_.gif
media/style/MODxLight/images/dot.gif

any ideas where these are? or were they part of a previous modx install?

thanks!  Huh

THIS HAS BEEN ANSWERED HERE: http://modxcms.com/forums/index.php/topic,12664.msg83926.html#msg83926
« Last Edit: Mar 02, 2007, 07:16 AM by highlander » Logged
Perrine
Moderators
*
Posts: 1,774



WWW
« Reply #9 on: Apr 08, 2007, 05:55 AM »

About images problem, I've juste fixed it up on my install. Here are the lines to change in the module (based on PageHitCounter v2.0 and 0.9.6 RC2) :

line 198
FInd
Code:
background: #fff url(media/images/bg/context.gif) repeat-y top left;
Replace with
Code:
background: #fff url(media/style/'.$manager_theme.'/images/icons/context_view.gif) repeat-y top left;

line 210
FInd
Code:
background-image: url(media/images/_tx_.gif);
Replace with
Code:
background-image: url(media/style/'.$manager_theme.'/images/icons/_tx_.gif);

line 265
FInd
Code:
<span class="right"><img src="media/images/_tx_.gif" width="1" height="5"><br />Page Hit Counter</span>
Replace with
Code:
<span class="right"><img src="media/style/'.$manager_theme.'/images/icons/_tx_.gif" width="1" height="5"><br />Page Hit Counter</span>

line 268
FInd
Code:
<div class="sectionHeader"><img src="media/style/'.$manager_theme.'/images/dot.gif" alt="" />&nbsp;Page Hit Counter</div><div class="sectionBody">
Replace with
Code:
<div class="sectionHeader"><img src="media/style/'.$manager_theme.'/images/misc/dot.gif" alt="" />&nbsp;Page Hit Counter</div><div class="sectionBody">

line 269
FInd
Code:
<p><img name="plock" src="media/images/tree/folder.gif" width="18" height="18" align="absmiddle" onclick="enableParentSelection(!allowParentSelection);" style="cursor:pointer;" /> <strong>Select Document</strong><br />Click on the icon, then click on the document in the Document Tree to view the page view count for that document.</p>
Replace with
Code:
<p><img name="plock" src="media/style/'.$manager_theme.'/images/tree/folder.gif" width="18" height="18" align="absmiddle" onclick="enableParentSelection(!allowParentSelection);" style="cursor:pointer;" /> <strong>Select Document</strong><br />Click on the icon, then click on the document in the Document Tree to view the page view count for that document.</p>

Hope that helps Wink
Logged

Nouveau sur MODx ? ||
Recherche
Communauté FR
Documentation FR
Réalisations sous MODx
Webolution
Entreprise AGS
J'aurais dű lui dire...
Atelier d'architecture Gambino
Déco'In : l'idée deco qu'il vous faut
HistWar : jeu de stratégie napoléonien

Ma config : MODx 0.9.6.2/3 || Apache 2.2.8 || PHP 5.2.6 || MySQL 5.0.45 || Debian 4.0 (Etch)
AndreasT
Member
**
Posts: 84


« Reply #10 on: Jun 07, 2007, 12:05 PM »

Hi.

Thanks for the module, very handy.

It works fine for me except the document selection. Seems the javascript is not working properly. The folder does not open when I click it and if I click on a document in the tree afterwards it just loads the doc as usual.

I also noticed a few of the images referenced in the javscript that needed the path updated, but fixing that did not help my issue.

Cheers,

Andreas
Logged
raffy
Jr. Member
*
Posts: 6


« Reply #11 on: Aug 15, 2007, 05:47 AM »

Hi, thanks for the module.

I use it with  mySql V4.0, which doesn't support the ON DUPLICATE KEY feature.

This is my workaround:

Code:
if($modx->documentObject['donthit'] != 1 && $_SESSION['usertype'] != 'manager') {

  $query = $modx->db->select("page_id", $table_prefix."page_hit_counter", "page_id = ".$modx->documentIdentifier);
  $count = $modx->db->getRecordCount($query);

  if ($count >0) {
      $sql = "update ".$table_prefix."page_hit_counter set page_count=page_count +1 where page_id = ".$modx->documentIdentifier;
  }else {
     $sql = "INSERT INTO ".$table_prefix."page_hit_counter (page_id, page_count) VALUES ($modx->documentIdentifier, 1)";
  }
  $modx->db->query($sql);
 
}

return;

--Raffy
Logged
Down Industries Clothing
New Member
*
Posts: 3


YOUR FEARS WILL EAT YOU ALIVE!!!


WWW
« Reply #12 on: Sep 18, 2007, 07:00 PM »

We are brand new to MODxCMS we have used Joomla in the past. I must say installing MODULES in MODx is proving to be a lot more work. Well I finally got Page Hit Counter installed. I had to figure out the SQL and run it manually in phpMyAdmin to create the table in the database. As the script didn't do so on its own for some odd reason. For anyone else with the same problem here is the SQL so you don't have to figure it out.

CREATE TABLE modx_page_hit_counter (page_id int(4) unsigned NOT NULL default '0', page_count int(10) unsigned NOT NULL default '0')

But now that it's installed and working. I can't for the life of me seem to find the back end page for viewing the stats. Seems it would just be a link under the modules tab. But it's not. I even logged on to Scott's web manager to see if I could find it on his. No luck!!! So can anyone tell me where it's hiding? I am driving myself crazy and feeling really stupid here. I can see MODx is going to be a huge learning curve after using Joomla. I am going to really miss how easy it is to install things by just uploading a zip file.

How Do I Get To This Page?


And why is Page Hit Counter even an add on at all? Seems to me this is something that should come with the CMS as well as some other modules that you have to post-install install.
« Last Edit: Sep 18, 2007, 10:16 PM by Down Industries Clothing » Logged

Please follow the signature guidelines.
sottwell
Documentation Team
*
Posts: 8,837



WWW
« Reply #13 on: Sep 19, 2007, 01:28 AM »

Which version of MySQL are you using? It may be that your version doesn't like the "IF NOT EXISTS" keywords.
Code:
  $sql = "CREATE TABLE IF NOT EXISTS `".$table_prefix."page_hit_counter` (
  `page_id` int(4) unsigned NOT NULL default '0',
  `page_count` int(10) unsigned NOT NULL default '0',
  UNIQUE KEY `page_id` (`page_id`)
)";
  $modx->db->query($sql);
Logged

sottwell.com has moved to a lovely Solaris 10 server!
Log in username guest, password guestuser.
Templates are now becoming available at http://sottwell.com/templates.html
Down Industries Clothing
New Member
*
Posts: 3


YOUR FEARS WILL EAT YOU ALIVE!!!


WWW
« Reply #14 on: Sep 19, 2007, 01:42 PM »

SYSTEM DETAILS:
Operating system     Linux
Kernel version    2.6.9-55.0.2.ELsmp
Machine Type    i686
Apache version    1.3.37 (Unix)
PHP version    4.4.4
MySQL version    4.1.22-standard

But what about the back end page hit counter question? As I couldn't even seem to find it on your demo site. I fixed the other issue already as I stated.

HOW DO I GET TO THIS PAGE?
« Last Edit: Sep 19, 2007, 01:56 PM by Down Industries Clothing » Logged

Please follow the signature guidelines.
Pages: [1] 2 3   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!