aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Johnston <michaelgeorgejohnston@gmail.com>2013-02-20 21:56:59 -0500
committerMichael Johnston <michaelgeorgejohnston@gmail.com>2013-02-20 21:56:59 -0500
commit6199e1d5b8779efdfc8aac8863e113784a32cdb7 (patch)
treecb3023b75c51ada833eb14d93c450bef44d9011f
parentf01f390a2e4bef735ea85b52ec9941fef9a2b7fe (diff)
downloadvolse-hubzilla-6199e1d5b8779efdfc8aac8863e113784a32cdb7.tar.gz
volse-hubzilla-6199e1d5b8779efdfc8aac8863e113784a32cdb7.tar.bz2
volse-hubzilla-6199e1d5b8779efdfc8aac8863e113784a32cdb7.zip
add siteinfo.tpl
-rw-r--r--doc/Home.md2
-rw-r--r--mod/siteinfo.php44
-rw-r--r--view/tpl/siteinfo.tpl14
-rw-r--r--view/tpl/smarty3/siteinfo.tpl19
4 files changed, 55 insertions, 24 deletions
diff --git a/doc/Home.md b/doc/Home.md
index 30efc93f7..561362f1e 100644
--- a/doc/Home.md
+++ b/doc/Home.md
@@ -33,5 +33,5 @@ Friendica Documentation and Resources
**About**
-* [Site/Version Info](friendica)
+* [Site/Version Info](siteinfo)
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 .= '<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);
diff --git a/view/tpl/siteinfo.tpl b/view/tpl/siteinfo.tpl
new file mode 100644
index 000000000..4931cc3a7
--- /dev/null
+++ b/view/tpl/siteinfo.tpl
@@ -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 }}
diff --git a/view/tpl/smarty3/siteinfo.tpl b/view/tpl/smarty3/siteinfo.tpl
new file mode 100644
index 000000000..3720c9629
--- /dev/null
+++ b/view/tpl/smarty3/siteinfo.tpl
@@ -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}}