3 function friendica_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' => FRIENDICA_VERSION,
20 'plugins' => $a->plugins,
21 'register_policy' => $register_policy[$a->config['register_policy']],
23 'site_name' => $a->config['sitename'],
24 'platform' => FRIENDICA_PLATFORM,
25 'info' => ((x($a->config,'info')) ? $a->config['info'] : '')
28 echo json_encode($data);
35 function friendica_content(&$a) {
38 $o .= '<h3>Friendica</h3>';
43 $o .= t('This is Friendica, version') . ' ' . FRIENDICA_VERSION . ' ';
44 $o .= t('running at web location') . ' ' . z_root() . '</p><p>';
46 $o .= t('Please visit <a href="http://friendica.com">Friendica.com</a> to learn more about the Friendica project.') . '</p><p>';
48 $o .= t('Bug reports and issues: please visit') . ' ' . '<a href="http://bugs.friendica.com">Bugs.Friendica.com</a></p><p>';
49 $o .= t('Suggestions, praise, donations, etc. - please email "Info" at Friendica - dot com') . '</p>';
53 if(count($a->plugins)) {
54 $o .= '<p>' . t('Installed plugins/addons/apps') . '</p>';
56 foreach($a->plugins as $p)
58 $o .= '<li>' . $p . '</li>';
62 $o .= '<p>' . t('No installed plugins/addons/apps');
64 call_hooks('about_hook', $o);