[%# stats/site.tt New public statistics Authors: Afuna Pau Amma Copyright (c) 2009-2011 by Dreamwidth Studios, LLC. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. For a copy of the license, please reference 'perldoc perlartistic' or 'perldoc perlgpl'. %] [%- CALL dw.active_resource_group( "foundation" ) -%] [% dw.need_res( 'stc/sitestats.css' ) %] [% sections.title = '.title' | ml( sitenameshort => site.nameshort ) %]

[% '.note.roundedtonearesttenthofpct' | ml %]

[% '.accounts.title' | ml %]

[%# number of accounts (total+by type) %] [% IF accounts_by_type.defined %] [%# Accounts by type pie chart %]

[% '.graphtitle.accounts' | ml %]

[% '.accounts.explanation.personal' | ml %] [% '.accounts.explanation.community' | ml %] [% '.accounts.explanation.identity1' | ml %] [% '.accounts.explanation.syndicated' | ml %]

[% ELSE %] [% '.error.notavailable' | ml %] [% END %] [%# number of active accounts (by time since last active) %]

[% '.active.title' | ml %]

[% '.active.desc' | ml %]

[% IF active_accounts.defined %] [% ELSE %] [% '.error.notavailable' | ml %] [% END %] [%# Active personal accounts bar chart %]

[% '.graphtitle.active.personal' | ml %]

[% '.active.free30' | ml %] [% active_accounts.active_30d_free_P %];
    [%= '.active.paid30' | ml %] [% active_accounts.active_30d_allpaid_P %];
    [%= '.active.free7' | ml %] [% active_accounts.active_7d_free_P %];
    [%= '.active.paid7' | ml %] [% active_accounts.active_7d_allpaid_P %];
    [%= '.active.free1' | ml %] [% active_accounts.active_1d_free_P %];
    [%= '.active.paid1' | ml %] [% active_accounts.active_1d_allpaid_P %] [%# Active community accounts bar chart %]

[% '.graphtitle.active.community' | ml %]

[% '.active.free30' | ml %] [% active_accounts.active_30d_free_C %];
    [%= '.active.paid30' | ml %] [% active_accounts.active_30d_allpaid_C %];
    [%= '.active.free7' | ml %] [% active_accounts.active_7d_free_C %];
    [%= '.active.paid7' | ml %] [% active_accounts.active_7d_allpaid_C %];
    [%= '.active.free1' | ml %] [% active_accounts.active_1d_free_C %];
    [%= '.active.paid1' | ml %] [% active_accounts.active_1d_allpaid_C %] [%# Active identity accounts bar graph %]

[% '.graphtitle.active.identity' | ml %]

[% '.active.free30' | ml %] [% active_accounts.active_30d_free_I %];
    [%= '.active.paid30' | ml %] [% active_accounts.active_30d_allpaid_I %];
    [%= '.active.free7' | ml %] [% active_accounts.active_7d_free_I %];
    [%= '.active.paid7' | ml %] [% active_accounts.active_7d_allpaid_I %];
    [%= '.active.free1' | ml %] [% active_accounts.active_1d_free_I %];
    [%= '.active.paid1' | ml %] [% active_accounts.active_1d_allpaid_I %] [%# Paid accounts (by level), with % of total (P+C) and active %]

[% '.paid.title' | ml %]

[% '.paid.explanation1' | ml %]

[% IF paid.defined %] [% FOREACH h = [ 'level' 'number' 'pct_total' 'pct_active' ] %] [% END %] [% FOREACH level = [ 'paid' 'premium' 'seed' ] %] [% n = paid.$level.defined ? paid.$level : 0 %] [% END %]
[% ".paid.colhdr.$h" | ml %]
[% ".paid.rowhdr.$level" | ml %][% n %] [%- 100 * n / accounts_by_type.total_PC | format "%.1f" IF accounts_by_type.total_PC.defined && accounts_by_type.total_PC != 0 -%] [%- 100 * n / active_accounts.active_PC | format "%.1f" IF active_accounts.active_PC.defined && active_accounts.active_PC != 0 -%]
[% '.paid.rowhdr.activepaid' | ml %] [%- active_accounts.active_allpaid IF active_accounts.active_allpaid.defined -%]
[% '.paid.rowhdr.inactivepaid' | ml %] [%- paid.allpaid - active_accounts.active_allpaid IF active_accounts.active_allpaid.defined -%]
[% ELSE %] [% '.error.notavailable' | ml %] [% END %] [%# Paid accounts pie chart %]

[% '.graphtitle.paid' | ml %]