update some addon docs and ensure we only generate statistics once a day

This commit is contained in:
zotlabs 2017-07-13 21:46:21 -07:00
parent 266dab1b59
commit 77f71303f2
5 changed files with 27 additions and 10 deletions

View File

@ -51,6 +51,7 @@ class Cron_daily {
update_channels_active_halfyear_stat(); update_channels_active_halfyear_stat();
update_channels_active_monthly_stat(); update_channels_active_monthly_stat();
update_local_posts_stat(); update_local_posts_stat();
update_local_comments_stat();
// expire old delivery reports // expire old delivery reports

View File

@ -2,12 +2,12 @@
[list=1] [list=1]
[*] abcjsplugin - Create musical scores in your posts [*] abcjsplugin - Create musical scores in your posts
[*] adultphotoflag - prevents nsfw photos from being displayed in public albums [*] adultphotoflag - prevents nsfw photos from being displayed in public albums
[*] authchoose - only send identity assertions to sites of friends
[*] b2tbtn - provide button to go directly to top of page if you are scrolled a long way down [*] b2tbtn - provide button to go directly to top of page if you are scrolled a long way down
[*] bbmath - use complex math expressions in your posts [*] bbmath - use complex math expressions in your posts
[*] bookmarker - replace #^ with bookmark link in posts [*] bookmarker - replace #^ with bookmark link in posts
[*] buglink - provide a bug reporting icon in the lower-left corner of every page [*] buglink - provide a bug reporting icon in the lower-left corner of every page
[*] calc - a scientific calculator [*] calc - a scientific calculator
[*] cdav - CalDAV/CardDAV server
[*] chess - cross domain identity aware interactive chess games [*] chess - cross domain identity aware interactive chess games
[*] chords - generate fingering charts and alternatives for every known guitar chord [*] chords - generate fingering charts and alternatives for every known guitar chord
[*] custom_home - set a custom page as the hub start page [*] custom_home - set a custom page as the hub start page
@ -15,8 +15,11 @@
[*] dirstats - show some interesting statistics generated by the directory server [*] dirstats - show some interesting statistics generated by the directory server
[*] docs - alternate documentation pages [*] docs - alternate documentation pages
[*] donate - provides a project donation page [*] donate - provides a project donation page
[*] dreamhost - provide a more reliable service on Dreamhost shared hosting
[*] dwpost - crosspost to Dreamwidth [*] dwpost - crosspost to Dreamwidth
[*] emojione - allow emojis as emoticons
[*] extcron - use an external cron service to run your hub's scheduled tasks [*] extcron - use an external cron service to run your hub's scheduled tasks
[*] firefox - provide a link to install the Firefox Sharing API
[*] flattrwidget - provides a "Flattr Us" button [*] flattrwidget - provides a "Flattr Us" button
[*] flip - create upside down text [*] flip - create upside down text
[*] fortunate - displays random quote (fortune cookie). Requires setting up a fortune server. [*] fortunate - displays random quote (fortune cookie). Requires setting up a fortune server.
@ -24,6 +27,7 @@
[*] frphotos - import photo albums from Friendica [*] frphotos - import photo albums from Friendica
[*] gnusoc - GNU-Social (OStatus) protocol. Under development. [*] gnusoc - GNU-Social (OStatus) protocol. Under development.
[*] hexit - hexadecimal conversion tool [*] hexit - hexadecimal conversion tool
[*] hilite - allow language-specific highlighted code blocks in posts
[*] hubwall - send an admin email to all hub accounts [*] hubwall - send an admin email to all hub accounts
[*] ijpost - crosspost to Insanejournal [*] ijpost - crosspost to Insanejournal
[*] irc - connect to IRC chatrooms [*] irc - connect to IRC chatrooms
@ -50,6 +54,7 @@
[*] nsfw - Highly recommended plugin to collpase posts with inappropriate content [*] nsfw - Highly recommended plugin to collpase posts with inappropriate content
[*] openclipatar - choose a profile photo from hundreds of royalty free images [*] openclipatar - choose a profile photo from hundreds of royalty free images
[*] openid - OpenID authentication and OpenID server. Your OpenID URL is [observer.baseurl]/id/[observer.webname] [*] openid - OpenID authentication and OpenID server. Your OpenID URL is [observer.baseurl]/id/[observer.webname]
[*] opensearch - allow your site to become a browser search provider
[*] openstreetmap - render locations and maps using OpenStreetMap [*] openstreetmap - render locations and maps using OpenStreetMap
[*] pageheader - display text at the top of every page on the site [*] pageheader - display text at the top of every page on the site
[*] phpmailer - alternate mail delivery system with more configurability [*] phpmailer - alternate mail delivery system with more configurability
@ -71,7 +76,7 @@
[*] smiley_pack - extend the built-in smilie (emoticon) support [*] smiley_pack - extend the built-in smilie (emoticon) support
[*] smileybutton - provides a smiley selector on the post window [*] smileybutton - provides a smiley selector on the post window
[*] startpage - set a personal preferred page to redirect after logging in. [*] startpage - set a personal preferred page to redirect after logging in.
[*] statistics_json - Diaspora statistics generator [*] statistics - Diaspora statistics generator
[*] statusnet - GNU-social and StatusNet crosspost [zrl=[baseurl]/help/addons_gnusocial]Posting To Gnu Social[/zrl] [*] statusnet - GNU-social and StatusNet crosspost [zrl=[baseurl]/help/addons_gnusocial]Posting To Gnu Social[/zrl]
[*] std_embeds - allow unfiltered embeds for popular providers like youtube, vimeo and soundcloud [*] std_embeds - allow unfiltered embeds for popular providers like youtube, vimeo and soundcloud
[*] superblock - Highly recommended - completely block an offensive channel from your stream [*] superblock - Highly recommended - completely block an offensive channel from your stream
@ -79,9 +84,12 @@
[*] tictac - 3D tic-tac-toe [*] tictac - 3D tic-tac-toe
[*] torch - flashlight app [*] torch - flashlight app
[*] tour - feature tour for new members [*] tour - feature tour for new members
[*] tripleaes - demo plugin for providing custom encryption algorithms
[*] twitter - crosspost to Twitter [*] twitter - crosspost to Twitter
[*] twitter_api - Twitter/Statusnet compatible API
[*] upload_limits - discover what server setting (there are a few) may be causing large photo uploads to fail [*] upload_limits - discover what server setting (there are a few) may be causing large photo uploads to fail
[*] visage - show visitors to your channel [*] visage - show visitors to your channel
[*] webmention - process webmentions
[*] wholikesme - provides a page to display what connections have 'liked' your posts the most [*] wholikesme - provides a page to display what connections have 'liked' your posts the most
[*] webRTC - use an external server (mayfirst.org) to negotiate webRTC hookups [*] webRTC - use an external server (mayfirst.org) to negotiate webRTC hookups
[*] wppost - crosspost to WordPress (or other wordpress XMLRPC service) [*] wppost - crosspost to WordPress (or other wordpress XMLRPC service)

View File

@ -207,7 +207,7 @@ We recommend the following addons be installed on all public sites:
Several web communities have begun to converge using common protocols. The protocols involved are somewhat limited in their abilities. The GNU-Social protocol for instance offers no privacy modes, and the Diaspora protocol is somewhat restrictive in what kinds of communications are allowed. All comments must be signed in a very unique manner by the original author. The ActivityPub protocol is also being considered and may be supported at a future date. No other existing protocol supports nomadic location as used by this project. This presents some support challenges as some features work with some networks and don't work with others. Nevertheless the federation protocols allow connections to be made to a much larger community of people worldwide. They are provided as addons. Several web communities have begun to converge using common protocols. The protocols involved are somewhat limited in their abilities. The GNU-Social protocol for instance offers no privacy modes, and the Diaspora protocol is somewhat restrictive in what kinds of communications are allowed. All comments must be signed in a very unique manner by the original author. The ActivityPub protocol is also being considered and may be supported at a future date. No other existing protocol supports nomadic location as used by this project. This presents some support challenges as some features work with some networks and don't work with others. Nevertheless the federation protocols allow connections to be made to a much larger community of people worldwide. They are provided as addons.
> diaspora - The Diaspora Protocol used by Diaspora and Friendica. You should enable 'Diaspora Statistics' (statistics_json) first to enable all the available features. > diaspora - The Diaspora Protocol used by Diaspora and Friendica. You should enable 'Diaspora Statistics' (statistics) first to enable all the available features.
> gnusoc - The GNU-Social Protocol, used by GNU-Social, Mastodon and several other communities. This addon requires you first install the 'pubsubhubbub' service (also an addon). > gnusoc - The GNU-Social Protocol, used by GNU-Social, Mastodon and several other communities. This addon requires you first install the 'pubsubhubbub' service (also an addon).

View File

@ -7,7 +7,7 @@ function update_channels_total_stat() {
$channels_total_stat = intval($r[0]['channels_total']); $channels_total_stat = intval($r[0]['channels_total']);
set_config('system','channels_total_stat',$channels_total_stat); set_config('system','channels_total_stat',$channels_total_stat);
} else { } else {
set_config('system','channels_total_stat',null); set_config('system','channels_total_stat',0);
} }
} }
@ -30,10 +30,10 @@ function update_channels_active_halfyear_stat() {
$channels_active_halfyear_stat = count($x); $channels_active_halfyear_stat = count($x);
set_config('system','channels_active_halfyear_stat',$channels_active_halfyear_stat); set_config('system','channels_active_halfyear_stat',$channels_active_halfyear_stat);
} else { } else {
set_config('system','channels_active_halfyear_stat',null); set_config('system','channels_active_halfyear_stat',0);
} }
} else { } else {
set_config('system','channels_active_halfyear_stat',null); set_config('system','channels_active_halfyear_stat',0);
} }
} }
@ -56,10 +56,10 @@ function update_channels_active_monthly_stat() {
$channels_active_monthly_stat = count($x); $channels_active_monthly_stat = count($x);
set_config('system','channels_active_monthly_stat',$channels_active_monthly_stat); set_config('system','channels_active_monthly_stat',$channels_active_monthly_stat);
} else { } else {
set_config('system','channels_active_monthly_stat',null); set_config('system','channels_active_monthly_stat',0);
} }
} else { } else {
set_config('system','channels_active_monthly_stat',null); set_config('system','channels_active_monthly_stat',0);
} }
} }
@ -69,8 +69,16 @@ function update_local_posts_stat() {
$local_posts_stat = intval($posts[0]["local_posts"]); $local_posts_stat = intval($posts[0]["local_posts"]);
set_config('system','local_posts_stat',$local_posts_stat); set_config('system','local_posts_stat',$local_posts_stat);
} else { } else {
set_config('system','local_posts_stat',null); set_config('system','local_posts_stat',0);
} }
} }
function update_local_comments_stat() {
$posts = q("SELECT COUNT(*) AS local_posts FROM item WHERE item_wall = 1 and id != parent");
if (!is_array($posts))
$local_posts = 0;
else
$local_posts = $posts[0]["local_posts"];
set_config('system','local_comments_stat', $local_posts);
}

View File

@ -2831,7 +2831,7 @@ function import_site($arr, $pubkey) {
$access_policy = ACCESS_PRIVATE; $access_policy = ACCESS_PRIVATE;
if($access_policy != ACCESS_PRIVATE) { if($access_policy != ACCESS_PRIVATE) {
$x = z_fetch_url($arr['url'] . '/siteinfo/json'); $x = z_fetch_url($arr['url'] . '/siteinfo.json');
if(! $x['success']) if(! $x['success'])
$access_policy = ACCESS_PRIVATE; $access_policy = ACCESS_PRIVATE;
} }