Warrior Forum - The #1 Digital Marketing Forum & Marketplace

Warrior Forum - The #1 Digital Marketing Forum & Marketplace (https://www.warriorforum.com/)
-   Programming (https://www.warriorforum.com/programming/)
-   -   Php help for wordpress plugin - stat traq (https://www.warriorforum.com/programming/146623-php-help-wordpress-plugin-stat-traq.html)

JakeThePeg 19th November 2009 03:50 PM

Php help for wordpress plugin - stat traq
 
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.

JakeThePeg 19th November 2009 11:42 PM

Re: Php help for wordpress plugin - stat traq
 
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....

Elliott Bean 20th November 2009 10:13 AM

Re: Php help for wordpress plugin - stat traq
 
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.

JakeThePeg 20th November 2009 01:33 PM

Re: Php help for wordpress plugin - stat traq
 
Quote:

Originally Posted by Elliott Bean (Post 1407879)
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.

Hey Elliot, thanks for your response.

I had a friend working on this for me, but now that he's on holidays I'm a bit list.

However, I've got a bit more info that I can share with you, if this helps...

The code that is currently calling stats info on the homepage is:

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 />

Does this help at all?

n7 Studios 20th November 2009 02:16 PM

Re: Php help for wordpress plugin - stat traq
 
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.

Elliott Bean 20th November 2009 03:14 PM

Re: Php help for wordpress plugin - stat traq
 
It seems like the getuVC is a function written by your friend, can you show me the code that he wrote for this function?

JakeThePeg 20th November 2009 10:45 PM

Re: Php help for wordpress plugin - stat traq
 
Quote:

Originally Posted by Elliott Bean (Post 1409117)
It seems like the getuVC is a function written by your friend, can you show me the code that he wrote for this function?

I can send you the entire set of plugin code (as a zip file), but I'm not actually sure which file will contain this specific function.

Will the zip file help?

shaddai 21st November 2009 03:13 AM

Re: Php help for wordpress plugin - stat traq
 
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.


JakeThePeg 21st November 2009 06:13 AM

Re: Php help for wordpress plugin - stat traq
 
Quote:

Originally Posted by shaddai (Post 1410719)
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.
kindledwind@gmail.com

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!

Elliott Bean 21st November 2009 09:29 AM

Re: Php help for wordpress plugin - stat traq
 
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.

JakeThePeg 21st November 2009 01:57 PM

Re: Php help for wordpress plugin - stat traq
 
Quote:

Originally Posted by Elliott Bean (Post 1411311)
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.

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?


All times are GMT -6. The time now is 03:44 PM.