We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • 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.
      Studying MODX in the desert - http://sottwell.com
      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
      Join the Slack Community - http://modx.org
    • Version 2 uploaded now; adds an Ajax-based single page view.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 27889
        • 415 Posts
        Hello, I’m curious, and have a question, why don’t you use the integrated table log ?
          MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
          MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
        • Because those are very badly implemented and are going away.
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 27889
            • 415 Posts
            Ok thanks for your answer, I hope your solution will be integate in a future release.
              MODx Sites & Prestations: http://dp-site.fr [Last MODx Site]
              MODx Repository: [HOME] [MetaTagsExtra] / Current Dev: [xFDM]
              • 23050
              • 1,842 Posts
              Hi there,

              I’ve just installed Page Hit Counter plugin and I get this error on pages I use DittoCal :
              « 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
                • 25195
                • 9 Posts
                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.
                  • 27376
                  • 576 Posts
                  Quote from: RMPnet at Feb 22, 2007, 11:53 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.
                    • 12151
                    • 115 Posts
                    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
                      • 23050
                      • 1,842 Posts
                      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
                      	background: #fff url(media/images/bg/context.gif) repeat-y top left;

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


                      line 210
                      FInd
                      	background-image:			url(media/images/_tx_.gif);

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


                      line 265
                      FInd
                      	<span class="right"><img src="media/images/_tx_.gif" width="1" height="5"><br />Page Hit Counter</span>

                      Replace with
                      	<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
                      <div class="sectionHeader"><img src="media/style/'.$manager_theme.'/images/dot.gif" alt="" /> Page Hit Counter</div><div class="sectionBody">

                      Replace with
                      <div class="sectionHeader"><img src="media/style/'.$manager_theme.'/images/misc/dot.gif" alt="" /> Page Hit Counter</div><div class="sectionBody">


                      line 269
                      FInd
                      <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
                      <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