3 function friendika_init(&$a) {
4 if ($a->argv[1]=="json"){
5 $register_policy = Array('REGISTER_CLOSED', 'REGISTER_APPROVE', 'REGISTER_OPEN');
7 if (isset($a->config['admin_email']) && $a->config['admin_email']!=''){
8 $r = q("SELECT username, nickname FROM user WHERE email='%s'", $a->config['admin_email']);
10 'name' => $r[0]['username'],
11 'profile'=> $a->get_baseurl().'/profile/'.$r[0]['nickname'],
18 'version' => FRIENDIKA_VERSION,
19 'url' => $a->get_baseurl(),
20 'plugins' => $a->plugins,
21 'register_policy' => $register_policy[$a->config['register_policy']],
23 'site_name' => $a->config['sitename'],
27 echo str_replace('\\/','/',json_encode($data));
34 function friendika_content(&$a) {
37 $o .= '<h3>Friendika</h3>';
42 $o .= 'View <a href="LICENSE">License</a>' . '<br /><br />';
43 $o .= t('This is Friendika version') . ' ' . FRIENDIKA_VERSION . ' ';
44 $o .= t('running at web location') . ' ' . $a->get_baseurl() . '</p><p>';
46 $o .= t('Shared content within the Friendika network is provided under the <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons Attribution 3.0 license</a>') . '</p><p>';
48 $o .= t('Please visit <a href="http://project.friendika.com">Project.Friendika.com</a> to learn more about the Friendika project.') . '</p><p>';
50 $o .= t('Bug reports and issues: please visit') . ' ' . '<a href="http://bugs.friendika.com">Bugs.Friendika.com</a></p><p>';
51 $o .= t('Suggestions, praise, donations, etc. - please email "Info" at Friendika - dot com') . '</p>';
55 if(count($a->plugins)) {
56 $o .= '<p>' . t('Installed plugins/addons/apps') . '</p>';
58 foreach($a->plugins as $p)
60 $o .= '<li>' . $p . '</li>';
64 $o .= '<p>' . t('No installed plugins/addons/apps');
66 call_hooks('about_hook', $o);