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