Recent Topics

[Plugin] Export Hitlog to Excel

Started by on Sep 25, 2010 – Contents updated: Sep 25, 2010

Sep 25, 2010 18:40    

Plugin: Export Stats
Author: Matthew Doyle

Version: 1.1
Date Published: 11/27/2010
Supported B2Evolution version: 3.3.3
(In theory, 3.x should work. Any version with the same database tables should be ok, but I've only tested it with v3.3.3)
[url=http://cookingwithdoyle.com/index.php/plugins/export-stats-v1-1]Download[/url]

Version: 2.1
Date Published: 11/27/2010
Supported B2Evolution version: 4.x Alpha
[url=http://cookingwithdoyle.com/index.php/plugins/export-stats-v2-1]Download[/url]

Description:
The backoffice stats in b2evolution are decent, but they lack the interactive capabilities that you can get with spreadsheets and charts in Excel. I wrote this plugin so that I could extract the data out of the b2evolution database and push it into Excel, where it's easy to write reports, look at trends, and manipulate the data in ways you simply can't in the backoffice.

The Excel template provided with the plugin is just that -- a template. You can extend it for lots of other things. My goal is to get the data accessible and provide you with a flavour of what you can do. Use your imagination, tinker with the data, and look for new ways to visualize trends.

The onscreen instructions in the plugin will guide you through importing your data into the template and getting some reports. Total time for install to nice graphs should be less than 10 minutes. See below for some examples of the reports you'll get with the template.

Known limitations:
- The data export does not differentiate between different blogs on the same host. You can apply that type of filter pretty easily in Excel.

Install & Use Instructions:
1. Goto [url=http://cookingwithdoyle.com/index.php/plugins]http://cookingwithdoyle.com/index.php/plugins[/url] and download the appropriate .zip that matches your b2evo version.
2. Open and follow the instructions in the readme.txt.

http://cookingwithdoyle.com/media/blogs/plugins/v1_0/01.png

http://cookingwithdoyle.com/media/blogs/plugins/v1_0/02.png

http://cookingwithdoyle.com/media/blogs/plugins/v1_0/03.png

http://cookingwithdoyle.com/media/blogs/plugins/v1_0/04.png

http://cookingwithdoyle.com/media/blogs/plugins/v1_0/05.png

http://cookingwithdoyle.com/media/blogs/plugins/v1_0/06.png

http://cookingwithdoyle.com/media/blogs/plugins/v1_0/07.png

http://cookingwithdoyle.com/media/blogs/plugins/v1_0/08.png

Oct 05, 2010 03:37

For anyone interested, I'm almost done with porting the plugin to run in v4.0.0. I've got my code update to make a new DB table, log the hit correctly, and trim the new DB table appropriately.

The only piece left is to rewrite the code for extracting the data. I'm hoping to have time to finish within the next week.

Nov 28, 2010 00:36

I've fixed up some issues and released new versions of the plugin. The fixes:

1. Previously, there were some problems identifying Opera and it's version.
2. Identify Camino browser.
3. Identify Windows 98.

The format of the data file hasn't changed, so you shouldn't lose any past data by upgrading (though, as always, you should backup your data when upgrading any software).

b2evo 3.x: [url=http://cookingwithdoyle.com/index.php/plugins/export-stats-v1-1]v1.1[/url]
b2evo 4.x: [url=http://cookingwithdoyle.com/index.php/plugins/export-stats-v2-1]v2.1[/url]

Nov 28, 2010 03:00

sam2kb wrote:

My 2 kopeks if you don't mind :)

This is a better way to get a filename.

PHP

//$fileName = getcwd() . $this->get_plugin_url() . $f;
$fileName dirname(__FILE__).'/'.$f;

b2evo uses ezSQL class, you can find examples here
http://jvmultimedia.com/docs/ezsql/ez_sql_help.htm

Hmmm... Yeah, that'd be better. I'll probably wait until the next version to update it (unless someone reports it causing a functional problem).

Nov 28, 2010 04:55

unless someone reports it causing a functional problem

The plugin doesn't work on my windows server unless I change file path.

Nov 28, 2010 05:39

I'd guess it's a Windows issue, because I've tested on a couple Linux boxes and it works a-ok.

If your proposal also works on Linux boxes then it's an easy fix. I'll test it tomorrow.

Nov 28, 2010 18:10

I just fixed the line of code and updated the .zip files for both v1.1 and v2.1. If you reinstall then it should work.

Thanks for pointing out a mistake so promptly.

Dec 27, 2010 10:03

Oladio! Thanks for this wonderful job!
However, I'm running b2evo 4.0.3 and unable to install this plugin when I copy the stats_plugin folder into plugins -> when I press install new plugin at the plugin tab in global settings it doesn't show the plug in the list.

How can I make it work?

Thanks a lot

Dec 27, 2010 14:41

Rene82 wrote:

Oladio! Thanks for this wonderful job!
However, I'm running b2evo 4.0.3 and unable to install this plugin when I copy the stats_plugin folder into plugins -> when I press install new plugin at the plugin tab in global settings it doesn't show the plug in the list.

How can I make it work?

Thanks a lot

I haven't tested it on v4.0.3 yet. I'm out of town right now, but when I get back home I'll upgrade my test server and figure out what's wrong. v4 of b2evo had a few technical changes, so it's probably something small that I've got to fix up.

Watch this thread and I'll answer in a couple days (unless someone else beats me to it :D).

Dec 27, 2010 19:54

it doesn't show the plug in the list.

This sounds like you extracted the archive into another folder. Make sure you have the following structure

Code

[b2evolution root directory]/plugins/stats_plugin/[some files here]

Jan 01, 2011 22:34

So, with b2evo v4.0.3, the plugin can be installed, so your error is likely a problem with extracting the files to the correct place on the web server (As suggested by sam2kb).

However, it appears to not extract the data correctly. (The data makes it into the plugin's table but nothing gets extracted)

I'll have to take a look at what's going wrong and get it solved.

Feb 09, 2011 14:57

hmmmm.... great plugin... just I hava a problem:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 19922944 bytes) in /someplace/somefile/public_html/plugins/stats_plugin/geoiploc.php on line 843

any ideas what the bug is and how to fix it??

thnx (:

Feb 10, 2011 02:22

Achillis wrote:

hmmmm.... great plugin... just I hava a problem:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 19922944 bytes) in /someplace/somefile/public_html/plugins/stats_plugin/geoiploc.php on line 843

any ideas what the bug is and how to fix it??

thnx (:

Yep. You need more memory allocated to php. There's a command you put in your apache setup (or php.ini) to do that. I can't remember the command off the top of my hear, though.


Form is loading...

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.