当前位置: 首页>>代码示例>>PHP>>正文


PHP Tag::get_tags方法代码示例

本文整理汇总了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);
 }
开发者ID:bl00m,项目名称:ampache,代码行数:12,代码来源:subsonic_api.class.php

示例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']);
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:browse.php

示例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');
             }
         }
     }
 }
开发者ID:bl00m,项目名称:ampache,代码行数:16,代码来源:plex_xml_data.class.php

示例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':
开发者ID:nioc,项目名称:ampache,代码行数:31,代码来源:tag.ajax.php

示例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();
     }
 }
开发者ID:arh922,项目名称:ain,代码行数:14,代码来源:controller.php

示例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']);
开发者ID:axelsimon,项目名称:ampache,代码行数:31,代码来源:browse.php


注:本文中的Tag::get_tags方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。