Support » Plugin: NewStatPress » [Plugin: NewStatPress] Print function %totalpageviews%

  • Resolved CockpitSeeker


    Hi there,
    I went for your plugin as it saved me the database fixing (which I must say looks good), but I must also say that I miss the %totalpageview% printing function.
    That’s right, it is not on the original StatPress plugin BUT I can’t remember how I added it and which file I modified at that time…
    Me being me (lazy, retired far from my best geeking days), I’d appreciate if you could recall me which php file to modify and the line to drop!! 😉


Viewing 3 replies - 1 through 3 (of 3 total)
  • Yeah nevermind, I did it (I can be such a lazy bum sometimes)!

    In case someone wants to do it:

    • open the newstatpress.php file
    • you’ll find all the functions and calls listed between the line 1555:function iri_NewStatPress_Vars($body) { and the closing tag } line 1729
    • drop the lines:
      if(strpos(strtolower($body),”%totalpageviews%”) !== FALSE) {
      $qry = $wpdb->get_results(“SELECT count(id) as pageview FROM $table_name WHERE spider=” and feed=”;”);
      $body = str_replace(“%totalpageviews%”, $qry[0]->pageview, $body);
      anywhere you want between those lines (not breaking the other functions)
    • tadaaa
    Plugin Author ice00



    I have add it into my developed version of the plugin, so on next upate you will have it inside without modification.

    shit man, you’re gonna make me update it! 😛

    Just kidding, ‘thanks for the plugin, keep perfecting it!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: NewStatPress] Print function %totalpageviews%’ is closed to new replies.