Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[ NEW PLUGIN ] DailyStats

(Page 2 of 2)
> >
Quote Reply
Re: [DeadMan] [ NEW PLUGIN ] DailyStats In reply to
Hi,

Please send me GLinks admin details and FTP, and I'll take a look for you.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [DeadMan] [ NEW PLUGIN ] DailyStats In reply to
Hi,

All fixed.

I dont quite believe it "was working", cos the code wouldn't have allowed it :P (appart from maybe if you had the cron running more than once a day)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ NEW PLUGIN ] DailyStats In reply to
Hi,

Version 1.5 is now available from the Members Area.

This includes:

1) Random color generation for the graphs (previously, some of the larger graphs had duplicate colors, so hopefully this will add more diversity to it =))
2) Cleaned up some of the code (reducing 30 lines of code to just 3 - 4 times - so should be quicker running [and easier to update =)])

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ NEW PLUGIN ] DailyStats In reply to
Hi,

Because this plugin displays stats only for current year, is it possible to delete old data from previous year (2008.) and how?

Regards.

UnReal Network
Quote Reply
Re: [DeadMan] [ NEW PLUGIN ] DailyStats In reply to
Hi,

First, be sure to backup your database!

Then you can try these:

Code:
DELETE FROM LinkJumps WHERE Date LIKE '2008-%';
DELETE FROM LinkRatings WHERE Date LIKE '2008-%';
DELETE FROM LinkJumpDaily WHERE Date LIKE '2008-%';
DELETE FROM LinkReviewDaily WHERE Date LIKE '2008-%';
DELETE FROM LinkRatingsDaily WHERE Date LIKE '2008-%';
DELETE FROM UserSignupsDaily WHERE Date LIKE '2008-%';

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ NEW PLUGIN ] DailyStats In reply to
ok. Will try.

And my suggestion is to add this option to new version of plugin. When you release it of course.

Regards.

UnReal Network
Quote Reply
Re: [Andy] [ NEW PLUGIN ] DailyStats In reply to
Andy wrote:
Hi,

First, be sure to backup your database!

Then you can try these:

Code:
DELETE FROM LinkJumps WHERE Date LIKE '2008-%';
DELETE FROM LinkRatings WHERE Date LIKE '2008-%';
DELETE FROM LinkJumpDaily WHERE Date LIKE '2008-%';
DELETE FROM LinkReviewDaily WHERE Date LIKE '2008-%';
DELETE FROM LinkRatingsDaily WHERE Date LIKE '2008-%';
DELETE FROM UserSignupsDaily WHERE Date LIKE '2008-%';

Cheers

Heh. I've just done this manualy for 2009. year. Still no option in plugin. So...when you got time... ;)

Regards.

UnReal Network
Quote Reply
Re: [DeadMan] [ NEW PLUGIN ] DailyStats In reply to
Hi,

What is it you need it to do - just delete the records from those tables from the previous year?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] [ NEW PLUGIN ] DailyStats In reply to
Well, yes. All data from previous year(s) because DailyStats show data only for current year.

I did this manually so now I have only data for 2010.

This is because, LinkJumps tabe got few milions of rows and about 600+MB large :)

Regards.

UnReal Network
Quote Reply
Re: [DeadMan] [ NEW PLUGIN ] DailyStats In reply to
Ok ... I don't have time to make this a proper release, but in DailyStats.pm, add the following function:
Code:
sub Delete_Old_Stats {

my ($current_year,$current_month,$current_day) = split /\-/, GT::Date::date_get();
my $pre_year = $current_year - 1;

$DB->table('LinkJumps')->delete( GT::SQL::Condition->new('Date','LIKE',"${pre_year}-%") );
$DB->table('LinkRatings')->delete( GT::SQL::Condition->new('Date','LIKE',"${pre_year}-%") );
$DB->table('LinkJumpDaily')->delete( GT::SQL::Condition->new('Date','LIKE',"${pre_year}-%") );
$DB->table('LinkReviewDaily')->delete( GT::SQL::Condition->new('Date','LIKE',"${pre_year}-%") );
$DB->table('LinkRatingsDaily')->delete( GT::SQL::Condition->new('Date','LIKE',"${pre_year}-%") );
$DB->table('UserSignupsDaily')->delete( GT::SQL::Condition->new('Date','LIKE',"${pre_year}-%") );

}

Then goto this URL in your browser, and it should delete records from the previous year:

http://domain.com/cgi-bin/link/admin/admin.cgi?do=plugin&plugin=DailyStats&func=Delete_Old_Stats

Hope that helps.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
> >