streams/Zotlabs/Module/Categories.php

44 lines
817 B
PHP
Raw Normal View History

2019-03-25 03:08:23 +00:00
<?php
namespace Zotlabs\Module;
use App;
2019-03-25 03:08:23 +00:00
use Zotlabs\Lib\Apps;
use Zotlabs\Lib\Libsync;
2019-04-17 23:54:06 +00:00
use Zotlabs\Lib\Libprofile;
2019-03-25 03:08:23 +00:00
use Zotlabs\Web\Controller;
use Zotlabs\Render\Comanche;
2019-03-25 03:08:23 +00:00
class Categories extends Controller {
function init() {
if(local_channel()) {
$channel = App::get_channel();
if($channel && $channel['channel_address']) {
$which = $channel['channel_address'];
}
2019-04-17 23:54:06 +00:00
Libprofile::load($which,0);
}
}
2019-03-25 03:08:23 +00:00
function get() {
$desc = t('This app allows you to add categories to posts and events.');
$text = '<div class="section-content-info-wrapper">' . $desc . '</div>';
if(! ( local_channel() && Apps::system_app_installed(local_channel(),'Categories'))) {
return $text;
}
$c = new Comanche;
return $c->widget('catcloud',EMPTY_STR);
2019-03-25 03:08:23 +00:00
}
}