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


PHP tservices_helper::setProtocol方法代码示例

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


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

示例1: foreach

<div class="b-layout b-layout_center" style="width:222px;">
    <?php 
foreach ($tservices as $tservice) {
    $user = $tservice['user'];
    $user_url = sprintf('/users/%s', $user['login']);
    $tservice_url = sprintf('/tu/%d/%s.html', $tservice['id'], tservices_helper::translit($tservice['title']));
    $avatar_url = tservices_helper::photo_src($user['photo'], $user['login']);
    $hasVideo = false;
    if ($hasVideo) {
        $video = current($tservice['videos']);
        $video_thumbnail_url = tservices_helper::setProtocol($video['image']);
        $thumbnail200x150 = '<img width="200" height="150" class="b-pic" src="' . $video_thumbnail_url . '">';
    } elseif (!empty($tservice['file'])) {
        $image_url = tservices_helper::image_src($tservice['file'], $user['login']);
        $thumbnail200x150 = '<img width="200" height="150" class="b-pic" src="' . $image_url . '">';
    } else {
        $thumbnail200x150 = '<div class="b-pic b-pic_no_img b-pic_w200_h150 b-pic_bg_f2"></div>';
    }
    $hasVideo = !empty($tservice['videos']) && count($tservice['videos']);
    $sold_count = isset($tservice['count_sold']) ? $tservice['count_sold'] : $tservice['total_feedbacks'];
    ?>
	<figure class="i-pic i-pic_pad_10 i-pic_height_265 i-pic_bord_green_hover">
            <div class="b-layout b-layout_relative">
                <a class="b-pic__lnk b-pic__lnk_relative" href="<?php 
    echo $tservice_url;
    ?>
">
                    <?php 
    if ($hasVideo) {
        ?>
<div class="b-icon b-icon__play b-icon_absolute b-icon_bot_4 b-icon_left_4"></div><?php 
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:recomend_tu.php

示例2: foreach

                <a data-type="video" data-autoplay="<?php 
            if ($key > 0) {
                ?>
1<?php 
            } else {
                ?>
0<?php 
            }
            ?>
" data-source="<?php 
            echo $video['video'];
            ?>
" class="b-gallery__link" href="javascript:void(0)">
                    <div class="b-gallery__play-btn"></div>
                    <img alt="" class="b-gallery__thumb" src="<?php 
            echo tservices_helper::setProtocol($video['image']);
            ?>
" />
                </a>
            </li> 
            <?php 
        }
    }
    ?>
            <?php 
    if ($cnt_img) {
        foreach ($data['images'] as $key => $image) {
            ?>
            <li class="b-gallery__item <?php 
            if ($hide_img) {
                ?>
开发者ID:Nikitian,项目名称:fl-ru-damp,代码行数:31,代码来源:tpl.card.php


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