add siteinfo.tpl
This commit is contained in:
parent
f01f390a2e
commit
6199e1d5b8
@ -33,5 +33,5 @@ Friendica Documentation and Resources
|
||||
|
||||
**About**
|
||||
|
||||
* [Site/Version Info](friendica)
|
||||
* [Site/Version Info](siteinfo)
|
||||
|
||||
|
@ -47,26 +47,10 @@ function siteinfo_init(&$a) {
|
||||
|
||||
function siteinfo_content(&$a) {
|
||||
|
||||
// FIXME Gak - this needs to be a template.
|
||||
|
||||
$o = '';
|
||||
$o .= '<h3>' . t('Red') . '</h3>';
|
||||
|
||||
|
||||
$o .= '<p></p><p>';
|
||||
|
||||
$o .= t('This is Red - another decentralized, distributed communications project by the folks at Friendica.');
|
||||
if(! get_config('system','hidden_version_siteinfo'))
|
||||
$o .= '</p><p>' . sprintf( t('Version %s'), FRIENDICA_VERSION ) . '</p><p>';
|
||||
$o .= '</p><p>';
|
||||
$o .= t('Running at web location') . ' ' . z_root() . '</p><p>';
|
||||
|
||||
$o .= t('Please visit <a href="http://friendica.com">Friendica.com</a> to learn more about the Friendica and/or Red project.') . '</p><p>';
|
||||
|
||||
$o .= t('Bug reports and issues: please visit') . ' ' . '<a href="http://bugs.friendica.com">Bugs.Friendica.com</a></p><p>';
|
||||
$o .= t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com') . '</p>';
|
||||
|
||||
$o .= '<p></p>';
|
||||
$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 .= '<p>' . t('Installed plugins/addons/apps:') . '</p>';
|
||||
$plugins_text = t('Installed plugins/addons/apps:');
|
||||
$sorted = $visible_plugins;
|
||||
$s = '';
|
||||
sort($sorted);
|
||||
@ -88,10 +72,24 @@ function siteinfo_content(&$a) {
|
||||
$s .= $p;
|
||||
}
|
||||
}
|
||||
$o .= '<div style="margin-left: 25px; margin-right: 25px;">' . $s . '</div>';
|
||||
$plugins_list .= $s;
|
||||
}
|
||||
else
|
||||
$o .= '<p>' . t('No installed plugins/addons/apps') . '</p>';
|
||||
$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 <a href="http://friendica.com">Friendica.com</a> 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);
|
||||
|
||||
|
14
view/tpl/siteinfo.tpl
Normal file
14
view/tpl/siteinfo.tpl
Normal file
@ -0,0 +1,14 @@
|
||||
<h3>$title</h3>
|
||||
<p></p>
|
||||
<p>$description</p>
|
||||
{{ if $version }}
|
||||
<p>$version</p>
|
||||
{{ endif }}
|
||||
<p>$web_location</p>
|
||||
<p>$visit</p>
|
||||
<p>$bug_text <a href="$bug_link_url">$bug_link_text</a></p>
|
||||
<p>$contact</p>
|
||||
<p>$plugins_text</p>
|
||||
{{ if $plugins_list }}
|
||||
<div style="margin-left: 25px; margin-right: 25px;">$plugins_list</div>
|
||||
{{ endif }}
|
19
view/tpl/smarty3/siteinfo.tpl
Normal file
19
view/tpl/smarty3/siteinfo.tpl
Normal file
@ -0,0 +1,19 @@
|
||||
{{*
|
||||
* AUTOMATICALLY GENERATED TEMPLATE
|
||||
* DO NOT EDIT THIS FILE, CHANGES WILL BE OVERWRITTEN
|
||||
*
|
||||
*}}
|
||||
<h3>{{$title}}</h3>
|
||||
<p></p>
|
||||
<p>{{$description}}</p>
|
||||
{{if $version}}
|
||||
<p>{{$version}}</p>
|
||||
{{/if}}
|
||||
<p>{{$web_location}}</p>
|
||||
<p>{{$visit}}</p>
|
||||
<p>{{$bug_text}} <a href="{{$bug_link_url}}">{{$bug_link_text}}</a></p>
|
||||
<p>{{$contact}}</p>
|
||||
<p>{{$plugins_text}}</p>
|
||||
{{if $plugins_list}}
|
||||
<div style="margin-left: 25px; margin-right: 25px;">{{$plugins_list}}</div>
|
||||
{{/if}}
|
Reference in New Issue
Block a user