Album hitcounter does not work.

<?php echo hitcounter('album',true,getAlbumID()); ?>

I put the code in index.php to counter all albums of index.php
when I upgrade to 1.1.7,it does not work,why? it works well in 1.1.6

Comments

  • Because hitcounter counts hits on an image or album page. It is meant for counting views on the page. There is no count for the index page, though. On 1.1.6 the page detection code had some problems which were fixed on 1.1.7, I guess you got lucky with your change.

    EDIT: Sorry, I misunderstood. You are not trying to set the counter, just view it. This should still work. Perhaps you did not get your code back in the right place after the upgrade.
  • acrylian Administrator, Developer
    Did you mean to show the count for each album on index.php? That should work, but you have to place the function within the next_album() loop.
  • thank you very much.I had know how to resolve it.

    first,put the code '<?php hitcounter('album', false); ?>' in album.php

    then put the code'<?php echo hitcounter('album',true,getAlbumID()); ?>' in index.php

    the Parameter "true" means to show hitcounter,but do not count it.
Sign In or Register to comment.