From 6199e1d5b8779efdfc8aac8863e113784a32cdb7 Mon Sep 17 00:00:00 2001 From: Michael Johnston Date: Wed, 20 Feb 2013 21:56:59 -0500 Subject: add siteinfo.tpl --- mod/siteinfo.php | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'mod/siteinfo.php') diff --git a/mod/siteinfo.php b/mod/siteinfo.php index 0cd569d20..7ea81fec1 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -47,26 +47,10 @@ function siteinfo_init(&$a) { function siteinfo_content(&$a) { - // FIXME Gak - this needs to be a template. - - $o = ''; - $o .= '

' . t('Red') . '

'; - - - $o .= '

'; - - $o .= t('This is Red - another decentralized, distributed communications project by the folks at Friendica.'); if(! get_config('system','hidden_version_siteinfo')) - $o .= '

' . sprintf( t('Version %s'), FRIENDICA_VERSION ) . '

'; - $o .= '

'; - $o .= t('Running at web location') . ' ' . z_root() . '

'; - - $o .= t('Please visit Friendica.com to learn more about the Friendica and/or Red project.') . '

'; - - $o .= t('Bug reports and issues: please visit') . ' ' . 'Bugs.Friendica.com

'; - $o .= t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com') . '

'; - - $o .= '

'; + $version = sprintf( t('Version %s'), FRIENDICA_VERSION ); + else + $version = ""; $visible_plugins = array(); if(is_array($a->plugins) && count($a->plugins)) { @@ -76,9 +60,9 @@ function siteinfo_content(&$a) { $visible_plugins[] = $rr['name']; } - + $plugins_list = ''; if(count($visible_plugins)) { - $o .= '

' . t('Installed plugins/addons/apps:') . '

'; + $plugins_text = t('Installed plugins/addons/apps:'); $sorted = $visible_plugins; $s = ''; sort($sorted); @@ -88,10 +72,24 @@ function siteinfo_content(&$a) { $s .= $p; } } - $o .= '
' . $s . '
'; + $plugins_list .= $s; } else - $o .= '

' . t('No installed plugins/addons/apps') . '

'; + $plugins_text = t('No installed plugins/addons/apps'); + + $o = replace_macros(get_markup_template('siteinfo.tpl'), array( + '$title' => t('Red'), + '$description' => t('This is Red - another decentralized, distributed communications project by the folks at Friendica.'), + '$version' => $version, + '$web_location' => t('Running at web location') . ' ' . z_root(), + '$visit' => t('Please visit Friendica.com to learn more about the Friendica and/or Red project.'), + '$bug_text' => t('Bug reports and issues: please visit'), + '$bug_link_url' => 'http://bugs.friendica.com', + '$bug_link_text' => 'Bugs.Friendica.com', + '$contact' => t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com'), + '$plugins_text' => $plugins_text, + '$plugins_list' => $plugins_list + )); call_hooks('about_hook', $o); -- cgit v1.2.3 From b84d8bfbc93be57bf84e03fa4b858edcd5616668 Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 14 Apr 2013 22:24:47 -0700 Subject: begin to cut the umbilical --- mod/siteinfo.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mod/siteinfo.php') diff --git a/mod/siteinfo.php b/mod/siteinfo.php index 7ea81fec1..f2f444fac 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -28,13 +28,13 @@ function siteinfo_init(&$a) { } $data = Array( - 'version' => FRIENDICA_VERSION, + 'version' => RED_VERSION, 'url' => z_root(), 'plugins' => $visible_plugins, 'register_policy' => $register_policy[$a->config['system']['register_policy']], 'admin' => $admin, 'site_name' => $a->config['sitename'], - 'platform' => FRIENDICA_PLATFORM, + 'platform' => RED_PLATFORM, 'info' => ((x($a->config,'info')) ? $a->config['info'] : '') ); @@ -48,7 +48,7 @@ function siteinfo_init(&$a) { function siteinfo_content(&$a) { if(! get_config('system','hidden_version_siteinfo')) - $version = sprintf( t('Version %s'), FRIENDICA_VERSION ); + $version = sprintf( t('Version %s'), RED_VERSION ); else $version = ""; -- cgit v1.2.3 From c803f620e6ab69a2d28c122e2754d97f0fd6e0b3 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 12 Nov 2013 18:47:55 -0800 Subject: too many friendica references in the siteinfo panel --- mod/siteinfo.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'mod/siteinfo.php') diff --git a/mod/siteinfo.php b/mod/siteinfo.php index f2f444fac..a64b5df20 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -79,14 +79,14 @@ function siteinfo_content(&$a) { $o = replace_macros(get_markup_template('siteinfo.tpl'), array( '$title' => t('Red'), - '$description' => t('This is Red - another decentralized, distributed communications project by the folks at Friendica.'), + '$description' => t('This is a hub of the Red Matrix - a global cooperative network of decentralised privacy enhanced websites.'), '$version' => $version, '$web_location' => t('Running at web location') . ' ' . z_root(), - '$visit' => t('Please visit Friendica.com to learn more about the Friendica and/or Red project.'), + '$visit' => t('Please visit GetZot.com to learn more about the Red Matrix.'), '$bug_text' => t('Bug reports and issues: please visit'), - '$bug_link_url' => 'http://bugs.friendica.com', - '$bug_link_text' => 'Bugs.Friendica.com', - '$contact' => t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com'), + '$bug_link_url' => 'https://github.com/friendica/red/issues', + '$bug_link_text' => 'redmatrix issues', + '$contact' => t('Suggestions, praise, donations, etc. - please email "redmatrix" at librelist - dot com'), '$plugins_text' => $plugins_text, '$plugins_list' => $plugins_list )); -- cgit v1.2.3 From 2089a1379a57ba5c27e220e664cb76ffb0acc1dd Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 18 Dec 2013 18:29:53 -0800 Subject: provide git revision in siteinfo if possible and if not instructed otherwise --- mod/siteinfo.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'mod/siteinfo.php') diff --git a/mod/siteinfo.php b/mod/siteinfo.php index a64b5df20..9f65f59e4 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -27,8 +27,14 @@ function siteinfo_init(&$a) { $visible_plugins[] = $rr['name']; } + if(@is_dir('.git') && function_exists('shell_exec')) + $commit = @shell_exec('git log -1 --format="%h"'); + if(! isset($commit) || strlen($commit) > 16) + $commit = ''; + $data = Array( 'version' => RED_VERSION, + 'commit' => $commit, 'url' => z_root(), 'plugins' => $visible_plugins, 'register_policy' => $register_policy[$a->config['system']['register_policy']], @@ -47,11 +53,16 @@ function siteinfo_init(&$a) { function siteinfo_content(&$a) { - if(! get_config('system','hidden_version_siteinfo')) + if(! get_config('system','hidden_version_siteinfo')) { $version = sprintf( t('Version %s'), RED_VERSION ); - else - $version = ""; - + if(@is_dir('.git') && function_exists('shell_exec')) + $commit = @shell_exec('git log -1 --format="%h"'); + if(! isset($commit) || strlen($commit) > 16) + $commit = ''; + } + else { + $version = $commit = ''; + } $visible_plugins = array(); if(is_array($a->plugins) && count($a->plugins)) { $r = q("select * from addon where hidden = 0"); @@ -81,6 +92,7 @@ function siteinfo_content(&$a) { '$title' => t('Red'), '$description' => t('This is a hub of the Red Matrix - a global cooperative network of decentralised privacy enhanced websites.'), '$version' => $version, + '$commit' => $commit, '$web_location' => t('Running at web location') . ' ' . z_root(), '$visit' => t('Please visit GetZot.com to learn more about the Red Matrix.'), '$bug_text' => t('Bug reports and issues: please visit'), -- cgit v1.2.3 From d3a0d37b0ddb73fed81fa71d355d6cb596e139ca Mon Sep 17 00:00:00 2001 From: Thomas Willingham Date: Fri, 24 Jan 2014 23:58:41 +0000 Subject: Add admin info to admin panel and site info. Since we can have multiple admins, this is freeform bbcode. --- mod/siteinfo.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mod/siteinfo.php') diff --git a/mod/siteinfo.php b/mod/siteinfo.php index 9f65f59e4..37cba02ec 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -88,6 +88,8 @@ function siteinfo_content(&$a) { else $plugins_text = t('No installed plugins/addons/apps'); + $admininfo = bbcode(get_config('system','admininfo')); + $o = replace_macros(get_markup_template('siteinfo.tpl'), array( '$title' => t('Red'), '$description' => t('This is a hub of the Red Matrix - a global cooperative network of decentralised privacy enhanced websites.'), @@ -99,6 +101,8 @@ function siteinfo_content(&$a) { '$bug_link_url' => 'https://github.com/friendica/red/issues', '$bug_link_text' => 'redmatrix issues', '$contact' => t('Suggestions, praise, donations, etc. - please email "redmatrix" at librelist - dot com'), + '$adminlabel' => t('Site Administrators'), + '$admininfo' => $admininfo, '$plugins_text' => $plugins_text, '$plugins_list' => $plugins_list )); -- cgit v1.2.3 From 61cc4de2255b344e9f607ae9fa545f45d7423b56 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 1 Feb 2014 21:03:21 -0800 Subject: provide donation options on siteinfo page --- mod/siteinfo.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'mod/siteinfo.php') diff --git a/mod/siteinfo.php b/mod/siteinfo.php index 37cba02ec..14ef17516 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -90,6 +90,21 @@ function siteinfo_content(&$a) { $admininfo = bbcode(get_config('system','admininfo')); + $donate = <<< EOT +

The Red Matrix is provided for you by volunteers working in their spare time. Your support will help us to build a better web. Select the following option for a one-time donation of your choosing

+

+

or

+ +

+ + +
Recurring Donation Options
+

+

+EOT; + + + $o = replace_macros(get_markup_template('siteinfo.tpl'), array( '$title' => t('Red'), '$description' => t('This is a hub of the Red Matrix - a global cooperative network of decentralised privacy enhanced websites.'), @@ -100,7 +115,8 @@ function siteinfo_content(&$a) { '$bug_text' => t('Bug reports and issues: please visit'), '$bug_link_url' => 'https://github.com/friendica/red/issues', '$bug_link_text' => 'redmatrix issues', - '$contact' => t('Suggestions, praise, donations, etc. - please email "redmatrix" at librelist - dot com'), + '$contact' => t('Suggestions, praise, etc. - please email "redmatrix" at librelist - dot com'), + '$donate' => $donate, '$adminlabel' => t('Site Administrators'), '$admininfo' => $admininfo, '$plugins_text' => $plugins_text, -- cgit v1.2.3 From eb96a04d345fcb9abc489578573cb54a11f5a41c Mon Sep 17 00:00:00 2001 From: friendica Date: Sun, 9 Feb 2014 20:08:29 -0800 Subject: since the project donate section was added to siteinfo - add a way for the hub admin to add in a donation section to keep the hub running. --- mod/siteinfo.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'mod/siteinfo.php') diff --git a/mod/siteinfo.php b/mod/siteinfo.php index 14ef17516..6b962c488 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -88,22 +88,28 @@ function siteinfo_content(&$a) { else $plugins_text = t('No installed plugins/addons/apps'); - $admininfo = bbcode(get_config('system','admininfo')); + $admininfo = bbcode(get_config('system','admininfo')); + $project_donate = t('Project Donations'); + $donate_text = t('

The Red Matrix is provided for you by volunteers working in their spare time. Your support will help us to build a better web. Select the following option for a one-time donation of your choosing

'); + $alternatively = t('

or

'); + $recurring = t('Recurring Donation Options'); + $donate = <<< EOT -

The Red Matrix is provided for you by volunteers working in their spare time. Your support will help us to build a better web. Select the following option for a one-time donation of your choosing

+

{$project_donate}

+$donate_text

-

or

- +$alternatively

- +
Recurring Donation Options
$recurring

EOT; - + if(file_exists('doc/site_donate.html')) + $donate .= file_get_contents('doc/site_donate.html'); $o = replace_macros(get_markup_template('siteinfo.tpl'), array( '$title' => t('Red'), -- cgit v1.2.3 From 309ae2d1e4d54e4940cd619ae4937f710a75b1ca Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 17 Feb 2014 20:33:52 -0800 Subject: update the donation link --- mod/siteinfo.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mod/siteinfo.php') diff --git a/mod/siteinfo.php b/mod/siteinfo.php index 6b962c488..7fdb892d2 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -91,7 +91,7 @@ function siteinfo_content(&$a) { $admininfo = bbcode(get_config('system','admininfo')); $project_donate = t('Project Donations'); - $donate_text = t('

The Red Matrix is provided for you by volunteers working in their spare time. Your support will help us to build a better web. Select the following option for a one-time donation of your choosing

'); + $donate_text = t('

The Red Matrix is provided for you by volunteers working in their spare time. Your support will help us to build a better, freer, and privacy respecting web. Select the following option for a one-time donation of your choosing

'); $alternatively = t('

or

'); $recurring = t('Recurring Donation Options'); @@ -99,12 +99,12 @@ function siteinfo_content(&$a) {

{$project_donate}

$donate_text

-$alternatively +$alternatively

-
$recurring

+

EOT; -- cgit v1.2.3 From 66f754c4c730bbea46faac2c61bb5195246d7233 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 4 Mar 2014 01:43:39 -0800 Subject: !@#$% pay~!@#$pal --- mod/siteinfo.php | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'mod/siteinfo.php') diff --git a/mod/siteinfo.php b/mod/siteinfo.php index 7fdb892d2..bdf9b1af6 100644 --- a/mod/siteinfo.php +++ b/mod/siteinfo.php @@ -90,24 +90,6 @@ function siteinfo_content(&$a) { $admininfo = bbcode(get_config('system','admininfo')); - $project_donate = t('Project Donations'); - $donate_text = t('

The Red Matrix is provided for you by volunteers working in their spare time. Your support will help us to build a better, freer, and privacy respecting web. Select the following option for a one-time donation of your choosing

'); - $alternatively = t('

or

'); - $recurring = t('Recurring Donation Options'); - - $donate = <<< EOT -

{$project_donate}

-$donate_text -

-$alternatively -

- - -
$recurring
-

-

-EOT; - if(file_exists('doc/site_donate.html')) $donate .= file_get_contents('doc/site_donate.html'); -- cgit v1.2.3