We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Quote from: rthrash at May 17, 2010, 05:13 PM

    Quote from: Kristalin at May 17, 2010, 05:08 PM

    is this script work with 1.0.3 huh
    Have you tried it with 1.0.3 and experienced issues? If not, I suspect it will just work.

    some things that caught my impression:

    1:
    <script type="text/javascript" language="JavaScript" src="media/script/modx.js"></script>
    <script type="text/javascript" src="media/script/scriptaculous/prototype.js"></script>
    ...
    <script type="text/javascript" language="JavaScript" src="media/script/cb2.js"></script>
    
    

    in 1.0.3 manager/media/script does not exist

    2: when i try to RUN module...results is:
    "Please wait while MODx loads the page..."
    and nothing happens

    3: in front i get:
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - Table 'admin_gimnazia.kivi_page_hit_counter' doesn't exist »
    SQL: INSERT INTO kivi_page_hit_counter (page_id, page_count) VALUES (2, 1) ON DUPLICATE KEY UPDATE page_count=page_count+1 
    


    my PHP Version 5.1.6 and mysql 5.0.77
      palma non sine pulvere
    • Can you check in phpMyAdmin etc. to see if that table actually does exist in your database?
      • Quote from: Everett at May 17, 2010, 05:25 PM

        Can you check in phpMyAdmin etc. to see if that table actually does exist in your database?

        I did not have the necessary table in my bd and i create it manually.

        now in manager / modules i have this:


        seems to be working, but every time i have on screen "Please wait while MODx loads the page..."

        P.S.

        and when i try to get pagehits in front with this snippet:

        <?php
        $output = '';
         
        
        //connect to table that stores site content
        $table_content = $modx->getFullTableName("site_content");
        $table_hits = $modx->getFullTableName("page_hit_counter");
        
        $fields = 'id,pagetitle,page_count';
        
        $sql= "SELECT {$fields} FROM {$table_content} table_content JOIN {$table_hits} table_hits ON table_hits.page_id = table_content.id  WHERE table_content.donthit = '0' AND table_content.id NOT IN (0,1,2,40,3,8,16,17,18,23,24,25,26,27,46,34) ORDER BY table_hits.page_count DESC LIMIT 3";
        $results= $modx->db->query($sql);
        
        while ($row=$modx->db->getRow($results)) {
           
           $output .= '<a href="index.php?id=' . $row[id] . '"/>' . $row[pagetitle] . '</a>' . "<br>" .  'Viewed: ' . $row[page_count] . ' times' . "<br>";
        
        }
        
        return $output;
        ?>
        


        i have no results
          palma non sine pulvere
          • 30069
          • 12 Posts
          I had the same problem. The workaround is here:

          http://modxcms.com/forums/index.php?topic=50848.0

          I have a couple of questions:

          1. I’m still missing the images, eventhough I followed the instructions here: http://modxcms.com/forums/index.php/topic,12656.0/prev_next,prev.html#new

          2. "Click on the icon, then click on the document in the Document Tree to view the page view count for that document." How is this supposed to be working? I click the icon and the document tree, but it just opens the document.

          3. Am I supposed to see something immediately when running the module? I just see "no records found"
            • 38162
            • 97 Posts
            New version available in the repo:
            http://modx.com/extras/package/pagehitcounter2

            Adds a table sorted by page hits, a total hits counter and some visual adjustments.
            • Quote from: N!Ce at Jun 02, 2011, 01:27 PM

              New version available in the repo:
              http://modx.com/extras/package/pagehitcounter2

              Adds a table sorted by page hits, a total hits counter and some visual adjustments.

              thanks! PERECT tool smiley))
                palma non sine pulvere
                • 4058
                • 17 Posts
                Any ideas on how to make this take in a &parents parameter, as an alternative option to &excludeIDs?
                  • 17723
                  • 221 Posts
                  Is there a version for Revo of this great add on?
                  Lucas
                    Lucas from AroundCyprus.net