本文整理汇总了PHP中Tag::get_tags方法的典型用法代码示例。如果您正苦于以下问题:PHP Tag::get_tags方法的具体用法?PHP Tag::get_tags怎么用?PHP Tag::get_tags使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tag
的用法示例。
在下文中一共展示了Tag::get_tags方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getgenres
/**
* getGenres
* Get all genres.
* Takes no parameter.
*/
public static function getgenres($input)
{
self::check_version($input, "1.9.0");
$r = Subsonic_XML_Data::createSuccessResponse();
Subsonic_XML_Data::addGenres($r, Tag::get_tags('song'));
self::apiOutput($input, $r);
}
示例2: isset
$browse->set_filter('catalog', $_SESSION['catalog']);
if (AmpConfig::get('catalog_disable')) {
$browse->set_filter('catalog_enabled', '1');
}
$browse->set_sort('name', 'ASC');
$browse->update_browse_from_session();
// Update current index depending on what is in session.
$browse->show_objects();
break;
case 'tag':
//FIXME: This whole thing is ugly, even though it works.
$browse->set_sort('count', 'ASC');
// This one's a doozy
$browse_type = isset($_REQUEST['type']) ? $_REQUEST['type'] : 'artist';
$browse->set_simple_browse(false);
$browse->save_objects(Tag::get_tags($browse_type, 0, 'name'));
// Should add a pager?
$object_ids = $browse->get_saved();
$keys = array_keys($object_ids);
Tag::build_cache($keys);
UI::show_box_top(T_('Tag Cloud'), 'box box_tag_cloud');
$browse2 = new Browse();
$browse2->set_type($browse_type);
$browse2->store();
require_once AmpConfig::get('prefix') . UI::find_template('show_tagcloud.inc.php');
UI::show_box_bottom();
$type = $browse2->get_type();
require_once AmpConfig::get('prefix') . UI::find_template('browse_content.inc.php');
break;
case 'artist':
$browse->set_filter('catalog', $_SESSION['catalog']);
示例3: setSectionTags
public static function setSectionTags(SimpleXMLElement $xml, $catalog, $object_type)
{
self::setSectionAllAttributes($xml, $catalog, 'All Genres', 'secondary');
// TODO: should be catalog based
if (!empty($object_type)) {
$tags = Tag::get_tags($object_type);
if (is_array($tags) && count($tags) > 0) {
foreach ($tags as $tag_id => $tag) {
$xdir = $xml->addChild('Directory');
$xdir->addAttribute('key', $tag['id']);
$xdir->addAttribute('title', $tag['name']);
$xdir->addAttribute('type', 'genre');
}
}
}
}
示例4: array
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
/**
* Sub-Ajax page, requires AJAX_INCLUDE
*/
if (!defined('AJAX_INCLUDE')) {
exit;
}
$results = array();
switch ($_REQUEST['action']) {
case 'show_add_tag':
break;
case 'get_tag_map':
$tags = Tag::get_display(Tag::get_tags());
$results['tags'] = $tags;
break;
case 'get_labels':
$labels = Label::get_display(Label::get_all_labels());
$results['labels'] = $labels;
break;
case 'add_tag':
debug_event('tag.ajax', 'Adding new tag...', '5');
Tag::add_tag_map($_GET['type'], $_GET['object_id'], $_GET['tag_id']);
break;
case 'add_tag_by_name':
debug_event('tag.ajax', 'Adding new tag by name...', '5');
Tag::add($_GET['type'], $_GET['object_id'], $_GET['tag_name'], false);
break;
case 'delete':
示例5: tags
function tags()
{
$helper_obj = new Helper();
global $base_path;
// echo('you login?'.$helper_obj->user_is_logged_in());
if ($helper_obj->user_is_logged_in() && $helper_obj->check_role(SUPER_ADMIN_ROLE_ID)) {
$tag_obj = new Tag();
$this->content = '<!-- Validation -->
<script src="' . $base_path . 'js/plugins/validation/jquery.validate.min.js"></script>
<script src="' . $base_path . 'js/plugins/validation/additional-methods.min.js"></script>';
$this->content .= $tag_obj->build_add_tag_form();
$this->content .= $tag_obj->get_tags();
}
}
示例6: Browse
case 'file':
break;
case 'album':
$browse->set_filter('catalog', $_SESSION['catalog']);
if (AmpConfig::get('catalog_disable')) {
$browse->set_filter('catalog_enabled', '1');
}
$browse->set_sort('name', 'ASC');
$browse->show_objects();
break;
case 'tag':
//FIXME: This whole thing is ugly, even though it works.
$browse->set_sort('count', 'ASC');
// This one's a doozy
$browse->set_simple_browse(false);
$browse->save_objects(Tag::get_tags());
// Should add a pager?
$object_ids = $browse->get_saved();
$keys = array_keys($object_ids);
Tag::build_cache($keys);
UI::show_box_top(T_('Tag Cloud'), 'box box_tag_cloud');
$browse2 = new Browse();
$browse2->set_type('song');
$browse2->store();
require_once AmpConfig::get('prefix') . '/templates/show_tagcloud.inc.php';
UI::show_box_bottom();
$type = $browse2->get_type();
require_once AmpConfig::get('prefix') . '/templates/browse_content.inc.php';
break;
case 'artist':
$browse->set_filter('catalog', $_SESSION['catalog']);