CockpitSeeker
Member
Posted 1 year ago #
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!! ;)
Cheers
http://wordpress.org/extend/plugins/newstatpress/
CockpitSeeker
Member
Posted 1 year ago #
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
ice00
Member
Plugin Author
Posted 1 year ago #
Hi,
I have add it into my developed version of the plugin, so on next upate you will have it inside without modification.
CockpitSeeker
Member
Posted 1 year ago #
lol
shit man, you're gonna make me update it! :P
Just kidding, 'thanks for the plugin, keep perfecting it!