2009-07-09, 11:36 PM (This post was last modified: 2009-07-10, 06:04 PM by Eric.)
So, um, I was tired of not knowing how to get a statistics signature for my website, so I finally decided to look for how to do it, and I did. Thanks to http://php.net I can finally do it, and I don't want everyone else to be in the dark as well, so here is a free download on how to do it, not really a tutorial, but I didn't know where else to put this. :/
Just so people know, it's to make a signature like the one I have.
Also, statsig2 has the information reversed, as in, it has the link at the top of the sig and the information at the bottom.
2009-07-09, 11:43 PM (This post was last modified: 2009-07-09, 11:44 PM by Matt.)
More a plugin that a tutorial really, moved to releases
One thing I will say though is this... instead of doing:
//This Calculates Your Total Posts
$total_posts_query = mysql_query("SELECT * FROM ".TABLE_PREFIX."posts");
$total_posts = mysql_num_rows($total_posts_query);
//This Calculates Your Total Members
$total_members_query = mysql_query("SELECT * FROM ".TABLE_PREFIX."users");
$total_members = mysql_num_rows($total_members_query);
//This Calculates Your Total Threads
$total_threads_query = mysql_query("SELECT * FROM ".TABLE_PREFIX."threads");
$total_threads = mysql_num_rows($total_threads_query);
Maybe do:
//This Calculates Your Total Posts
$total_posts = mysql_query("SELECT COUNT(*) FROM ".TABLE_PREFIX."posts");
//This Calculates Your Total Members
$total_members = mysql_query("SELECT COUNT(*) FROM ".TABLE_PREFIX."users");
//This Calculates Your Total Threads
$total_threads = mysql_query("SELECT COUNT(*) FROM ".TABLE_PREFIX."threads");
Otherwise you'll have a huge array of all of the posts, users and threads, this should be much faster.
2009-07-10, 04:30 PM (This post was last modified: 2009-07-10, 04:31 PM by querschlaeger.)
Hi,
what's the licence of this file? Maybe we can work together to perfect it. If it's a free licence (for example GPLv3?) I would contribute some caching possibilities.