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


PHP UI::is_grid_view方法代码示例

本文整理汇总了PHP中UI::is_grid_view方法的典型用法代码示例。如果您正苦于以下问题:PHP UI::is_grid_view方法的具体用法?PHP UI::is_grid_view怎么用?PHP UI::is_grid_view使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UI的用法示例。


在下文中一共展示了UI::is_grid_view方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: display_home

 /**
  * display_home
  * This display the module in home page
  */
 public function display_home()
 {
     if (AmpConfig::get('userflags')) {
         $userflags = Userflag::get_latest(null, -1, $this->maxitems);
         $i = 0;
         echo '<div class="home_plugin"><table class="tabledata">';
         foreach ($userflags as $userflag) {
             $item = new $userflag['type']($userflag['id']);
             $item->format();
             $user = new User($userflag['user']);
             $user->format();
             if ($item->id) {
                 echo '<tr class="' . ($i % 2 == 0 ? 'even' : 'odd') . '"><td>';
                 echo '<div>';
                 echo '<div style="float: left;">';
                 echo '<span style="font-weight: bold;">' . $item->f_link . '</span> ';
                 echo '<span style="margin-right: 10px;">';
                 if (AmpConfig::get('directplay')) {
                     echo Ajax::button('?page=stream&action=directplay&object_type=' . $userflag['type'] . '&object_id=' . $userflag['id'], 'play', T_('Play'), 'play_' . $userflag['type'] . '_' . $userflag['id']);
                     if (Stream_Playlist::check_autoplay_append()) {
                         echo Ajax::button('?page=stream&action=directplay&object_type=' . $userflag['type'] . '&object_id=' . $userflag['id'] . '&append=true', 'play_add', T_('Play last'), 'addplay_' . $userflag['type'] . '_' . $userflag['id']);
                     }
                 }
                 echo Ajax::button('?action=basket&type=' . $userflag['type'] . '&id=' . $userflag['id'], 'add', T_('Add to temporary playlist'), 'play_full_' . $userflag['id']);
                 echo '</span>';
                 echo '</div>';
                 echo '<div style="float: right; opacity: 0.5;">' . T_('recommended by') . ' ' . $user->f_link . '</div>';
                 echo '</div><br />';
                 echo '<div style="margin-left: 30px;">';
                 echo '<div style="float: left; margin-right: 20px;">';
                 $thumb = UI::is_grid_view('album') ? 2 : 11;
                 $item->display_art($thumb);
                 echo '</div>';
                 echo '<div style="white-space: normal;">' . $item->get_description() . '</div>';
                 echo '</div>';
                 echo '</td></tr>';
                 $i++;
             }
         }
         echo '</table></div>';
     }
 }
开发者ID:bl00m,项目名称:ampache,代码行数:46,代码来源:CatalogFavorites.plugin.php

示例2: T_

 */
$web_path = AmpConfig::get('web_path');
$button = Ajax::button('?page=index&action=random_albums', 'random', T_('Refresh'), 'random_refresh');
UI::show_box_top(T_('Albums of the Moment') . ' ' . $button, 'box box_random_albums');
if ($albums) {
    foreach ($albums as $album_id) {
        $album = new Album($album_id);
        $album->format();
        $show_play = true;
        ?>
    <div class="random_album">
        <div class="art_album">
            <?php 
        if (Art::is_enabled()) {
            $thumb = 1;
            if (!UI::is_grid_view('album')) {
                $thumb = 11;
                $show_play = false;
            }
            Art::display_item($album, $thumb, $album->link);
        } else {
            ?>
            <a href="<?php 
            $album->link;
            ?>
">
                <?php 
            echo '[' . $album->f_artist . '] ' . $album->f_name;
            ?>
            </a>
            <?php 
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:show_random_albums.inc.php

示例3: rawurlencode

</a>
        <a href="http://www.last.fm/search?q=%22<?php 
echo rawurlencode($album->f_artist);
?>
%22+%22<?php 
echo rawurlencode($album->f_name);
?>
%22&type=album" target="_blank"><?php 
echo UI::get_icon('lastfm', T_('Search on Last.fm ...'));
?>
</a>
    </div>
    <?php 
if ($album->name != T_('Unknown (Orphaned)')) {
    $name = '[' . $album->f_artist . '] ' . scrub_out($album->full_name);
    $thumb = UI::is_grid_view('album') ? 2 : 11;
    Art::display('album', $album->id, $name, $thumb);
}
?>
</div>
<div id="information_actions">
    <h3><?php 
echo T_('Actions');
?>
:</h3>
    <ul>
        <?php 
if ($show_direct_play) {
    ?>
        <li>
            <?php 
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:show_album_group_disks.inc.php

示例4:

 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
?>

<div class="item_info">
    <?php 
if ($biography['id']) {
    $thumb = UI::is_grid_view('artist') ? 2 : 11;
    Art::display('artist', $biography['id'], $artist->f_name, $thumb);
} else {
    ?>
        <div class="item_art">
            <?php 
    if ($biography && is_array($biography)) {
        ?>
                <a href="<?php 
        echo $biography['megaphoto'];
        ?>
" rel="prettyPhoto"><img src="<?php 
        echo $biography['largephoto'];
        ?>
" alt="<?php 
        echo $artist->f_name;
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:show_artist_info.inc.php

示例5: Browse

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
$browse = new Browse();
$browse->set_type($object_type);
UI::show_box_top($podcast->f_title, 'info-box');
?>
<div class="item_right_info">
    <?php 
$thumb = UI::is_grid_view('podcast') ? 2 : 11;
Art::display('podcast', $podcast->id, $podcast->f_title, $thumb);
?>
    <?php 
if ($podcast->description) {
    ?>
    <div id="item_summary">
        <?php 
    echo $podcast->description;
    ?>
    </div>
    <?php 
}
?>
</div>
<?php 
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:show_podcast.inc.php

示例6: T_

 *
 */
$web_path = AmpConfig::get('web_path');
$button = Ajax::button('?page=index&action=random_videos', 'random', T_('Refresh'), 'random_video_refresh');
UI::show_box_top(T_('Videos of the Moment') . ' ' . $button, 'box box_random_videos');
if ($videos) {
    foreach ($videos as $video_id) {
        $video = Video::create_from_id($video_id);
        $video->format();
        ?>
    <div class="random_video">
        <div class="art_album">
            <?php 
        if (Art::is_enabled()) {
            $release_art = $video->get_release_item_art();
            $thumb = UI::is_grid_view('video') ? 6 : 7;
            Art::display($release_art['object_type'], $release_art['object_id'], $video->get_fullname(), $thumb, $video->link);
        } else {
            ?>
                <?php 
            echo $video->get_fullname();
            ?>
            <?php 
        }
        ?>
        </div>
        <div class="play_video">
        <?php 
        if (AmpConfig::get('directplay')) {
            ?>
            <?php 
开发者ID:bl00m,项目名称:ampache,代码行数:31,代码来源:show_random_videos.inc.php


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