Go Back   WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk
Register Blogs FAQ Social Groups CalendarHelp Desk

Reply
 
LinkBack Thread Tools
Old 11-19-2009, 03:50 PM   #1
Active Warrior
 
Join Date: Jun 2009
Posts: 46
Thanks: 2
Thanked 2 Times in 2 Posts
Default 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 is offline   Reply With Quote
Old 11-19-2009, 11:42 PM   #2
Active Warrior
 
Join Date: Jun 2009
Posts: 46
Thanks: 2
Thanked 2 Times in 2 Posts
Default 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....

JakeThePeg is offline   Reply With Quote
Old 11-20-2009, 10:13 AM   #3
Active Warrior
War Room Member
 
Elliott Bean's Avatar
 
Join Date: Dec 2008
Location: UK
Posts: 52
Thanks: 1
Thanked 9 Times in 6 Posts
Default 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.

Elliott Bean is offline   Reply With Quote
Old 11-20-2009, 01:33 PM   #4
Active Warrior
 
Join Date: Jun 2009
Posts: 46
Thanks: 2
Thanked 2 Times in 2 Posts
Default Re: Php help for wordpress plugin - stat traq

Quote:
Originally Posted by Elliott Bean View Post
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?

JakeThePeg is offline   Reply With Quote
Old 11-20-2009, 02:16 PM   #5
Web Developer, IT Support
War Room Member
 
n7 Studios's Avatar
 
Join Date: Dec 2008
Location: Birmingham, UK
Posts: 513
Thanks: 10
Thanked 77 Times in 65 Posts
Social Networking View Member's FaceBook Profile  View Member's Twitter Profile 
Default 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.

n7 Studios is offline   Reply With Quote
Old 11-20-2009, 03:14 PM   #6
Active Warrior
War Room Member
 
Elliott Bean's Avatar
 
Join Date: Dec 2008
Location: UK
Posts: 52
Thanks: 1
Thanked 9 Times in 6 Posts
Default 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?

Elliott Bean is offline   Reply With Quote
Old 11-20-2009, 10:45 PM   #7
Active Warrior
 
Join Date: Jun 2009
Posts: 46
Thanks: 2
Thanked 2 Times in 2 Posts
Default Re: Php help for wordpress plugin - stat traq

Quote:
Originally Posted by Elliott Bean View Post
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?

JakeThePeg is offline   Reply With Quote
Old 11-21-2009, 03:13 AM   #8
HyperActive Warrior
 
shaddai's Avatar
 
Join Date: Jan 2009
Posts: 196
Thanks: 7
Thanked 10 Times in 10 Posts
Social Networking View Member's Twitter Profile 
Default 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.


“Never be afraid to try something new. Remember, amateurs built the ark. Professionals built the Titanic.” -Author Unknown

Resident computer geek. If you need help, don't be afraid to PM here, or DM on Twitter.
shaddai is offline   Reply With Quote
Old 11-21-2009, 06:13 AM   #9
Active Warrior
 
Join Date: Jun 2009
Posts: 46
Thanks: 2
Thanked 2 Times in 2 Posts
Default Re: Php help for wordpress plugin - stat traq

Quote:
Originally Posted by shaddai View Post
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!

JakeThePeg is offline   Reply With Quote
Old 11-21-2009, 09:29 AM   #10
Active Warrior
War Room Member
 
Elliott Bean's Avatar
 
Join Date: Dec 2008
Location: UK
Posts: 52
Thanks: 1
Thanked 9 Times in 6 Posts
Default 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.

Elliott Bean is offline   Reply With Quote
Old 11-21-2009, 01:57 PM   #11
Active Warrior
 
Join Date: Jun 2009
Posts: 46
Thanks: 2
Thanked 2 Times in 2 Posts
Default Re: Php help for wordpress plugin - stat traq

Quote:
Originally Posted by Elliott Bean View Post
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?

JakeThePeg is offline   Reply With Quote
Reply

  WarriorForum - Internet Marketing Forums > Warrior Support Forums > Programming Talk

Tags
php, plugin, stat, traq, wordpress

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 10:13 PM.