Php help for wordpress plugin - stat traq

by 10 replies
12
I'm seeking a little bit of help with a Wordpress plugin called stat traq, and as with all Wordpress plugins, this is written in php.

What I want to do is really quite simple - I just want to pull a bit of data from my web stats plugin, Stat Traq, and publish it on the home page of One Million Hit Wonder.

The specific bit of data I want to publish on the home page is:

Total number of unique visitors this week

I'd also be keen to get somehow get a line graph happening, show the total number of unique visitors each month, commencing from the end of this week.

Any assistance would be greatly appreciated.
#programming #php #plugin #stat #traq #wordpress
  • Is there anyone out there who would like to partake in this delightful PHP challenge? There could be a couple of bucks in it for you....
    • [1] reply
    • I tried installing the stat traq plugin to see if I could work out how to do this for you.

      I found I had to edit the stattraq-install.php script for that to work. Then
      when I click on the link to install the tables I get a file not found error.
      • [1] reply
  • Hi Jake,

    Per my email, this is certainly possible. I downloaded and took a look at the plugin; there are some functions for grabbing the stats for various weeks, months, years etc. Even if you need a slight modification to the script, it shouldn't take too much work.

    Thanks,

    Tim.
    • [1] reply
    • It seems like the getuVC is a function written by your friend, can you show me the code that he wrote for this function?
      • [1] reply
  • As far as graphs, google gives them out free.
    Developer's Guide - Google Chart API - Google Code

    What you may run into doing things that way is if the Google server is slow, your site may render slow because the browser is getting information from 2 different servers. The other way is to install the GD library on your server & develop the graphs from your server. That's all fine and dandy if you're on VPS or dedicated machine...not so much on a shared hosting setup... unless the server already has the GD library already installed for some reason.

    Anyway, If you don't get anywhere with the help that's already been offered, I've got time on Sunday. Just drop me a line & we'll work it out.

    • [1] reply
    • This is very handy indeed. The line chart in the Google Charts API is exactly what I require - I've just got to work out how to insert the data for each individual week. I'll send you an email, rather than annoy everyone about this!
  • I had a look at the plugin code and its not there. It would be useful to see the php code that you have on your home page.
    • [1] reply
    • Hey mate - this is the code I have on my home page:

      PHP Code:
      <?php echo getuVC('today'); ?> unique visitors today<br /> 
      <?php echo getuVC('yesterday'); ?> unique visitors yesterday <br/> 
      <?php echo getuVC('lastweek'); ?> unique visitors last week<br /><br />
      Is that what you are referring to?

Next Topics on Trending Feed

  • 12

    I'm seeking a little bit of help with a Wordpress plugin called stat traq, and as with all Wordpress plugins, this is written in php. What I want to do is really quite simple - I just want to pull a bit of data from my web stats plugin, Stat Traq, and publish it on the home page of One Million Hit Wonder.