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


PHP Tags::format方法代码示例

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


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

示例1: create

 /**
  * Create a service
  * @link     https://apidocs.serverdensity.com/?python#creating-a-service
  * @param    array  $service with all it's attributes.
  * @return   an array that is the device.
  */
 public function create($service, array $tagNames = array())
 {
     if (!empty($tagNames)) {
         $tagEndpoint = new Tags($this->client);
         $tags = $tagEndpoint->findAll($tagNames);
         if (!empty($tags['notFound'])) {
             foreach ($tags['notFound'] as $name) {
                 $tags['tags'][] = $tagEndpoint->create($name);
             }
         }
         $formattedTags = $tagEndpoint->format($tags['tags'], 'other');
         $service['tags'] = $formattedTags['tags'];
     }
     $service = $this->makeJsonReady($service);
     return $this->post('inventory/services/', $service);
 }
开发者ID:keesfransen,项目名称:sd-php-wrapper,代码行数:22,代码来源:Services.php

示例2: create

 /**
  * Create a user
  * @link     https://apidocs.serverdensity.com/#creating-a-user
  * @param    array $user
  * @return   an array with the user that got created
  */
 public function create(array $user, array $tagNames = array())
 {
     if (!empty($tagNames)) {
         $tagEndpoint = new Tags($this->client);
         $tags = $tagEndpoint->findAll($tagNames);
         if (!empty($tags['notFound'])) {
             foreach ($tags['notFound'] as $name) {
                 $tags['tags'][] = $tagEndpoint->create($name);
             }
         }
         $formattedTags = $tagEndpoint->format($tags['tags'], 'user');
         // don't overwrite permission array if user creates his own.
         if (!empty($user['permissions'])) {
             $user['permissions'] = array_merge($user['permissions'], $formattedTags);
         } else {
             $user['permissions'] = $formattedTags;
         }
     }
     $user = $this->makeJsonReady($user);
     return $this->post('users/users/', $user);
 }
开发者ID:keesfransen,项目名称:sd-php-wrapper,代码行数:27,代码来源:Users.php

示例3: unset

            ?>
					<span class="add_bookmark float_right">
						<a style="float: right;" href="#" id="bookmarklink_torrent_<?php 
            echo $GroupID;
            ?>
" class="add_bookmark brackets" onclick="Bookmark('torrent', <?php 
            echo $GroupID;
            ?>
, 'Remove bookmark'); return false;">Bookmark</a>
					</span>
<?php 
        }
        Votes::vote_link($GroupID, $UserVote);
        ?>
					<div class="tags"><?php 
        echo $TorrentTags->format();
        ?>
</div>
				</td>
			</tr>
<?php 
        $LastRemasterYear = '-';
        $LastRemasterTitle = '';
        $LastRemasterRecordLabel = '';
        $LastRemasterCatalogueNumber = '';
        $LastMedia = '';
        $EditionID = 0;
        unset($FirstUnknown);
        foreach ($Torrents as $TorrentID => $Torrent) {
            if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
                $FirstUnknown = !isset($FirstUnknown);
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:torrent_collage.php

示例4: unset

                    ?>
					<div class="group_image float_left clear">
						<?php 
                    ImageTools::cover_thumb($WikiImage, $GroupCategoryID);
                    ?>
					</div>
<?php 
                }
                ?>
					<div class="group_info clear">
						<strong><?php 
                echo $DisplayName;
                ?>
</strong>
						<div class="tags"><?php 
                echo $TorrentTags->format();
                ?>
</tags>
					</div>
				</td>
			</tr>
<?php 
                $LastRemasterYear = '-';
                $LastRemasterTitle = '';
                $LastRemasterRecordLabel = '';
                $LastRemasterCatalogueNumber = '';
                $LastMedia = '';
                $EditionID = 0;
                unset($FirstUnknown);
                foreach ($Torrents as $TorrentID => $Torrent) {
                    if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
开发者ID:karamanolev,项目名称:Gazelle,代码行数:31,代码来源:subscribed_collages.php

示例5: time_diff

, 'Bookmark'); return false;">Remove bookmark</a>
				</span>
<?	} else { ?>
				<span class="add_bookmark float_right">
					<a href="#" id="bookmarklink_torrent_<?php 
echo $GroupID;
?>
" class="brackets" onclick="Bookmark('torrent', <?php 
echo $GroupID;
?>
, 'Remove bookmark'); return false;">Bookmark</a>
				</span>
<?	} ?>
				<br />
				<div class="tags"><?php 
echo $TorrentTags->format('torrents.php?' . $Action . '&amp;taglist=');
?>
</div>
			</div>
		</td>
		<td class="nobr"><?php 
echo time_diff($GroupTime, 1);
?>
</td>
		<td class="number_column nobr"><?php 
echo Format::get_size($MaxSize);
?>
 (Max)</td>
		<td class="number_column"><?php 
echo number_format($TotalSnatched);
?>
开发者ID:nguyenducduy,项目名称:Gazelle,代码行数:31,代码来源:browse.php

示例6: isset

            echo $LoggedUser['AuthKey'];
            ?>
&amp;torrent_pass=<?php 
            echo $LoggedUser['torrent_pass'];
            ?>
" title="Download" class="brackets tooltip">DL</a>
				</span>
				<?php 
            echo $DisplayName;
            ?>
				<div class="torrent_info"><?php 
            echo $Edition['EditionName'];
            ?>
</div>
				<div class="tags"><?php 
            echo $TorrentTags->format('better.php?action=transcode&tags=');
            ?>
</div>
			</td>
			<td><?php 
            echo isset($Edition['MP3s']['V2 (VBR)']) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>';
            ?>
</td>
			<td><?php 
            echo isset($Edition['MP3s']['V0 (VBR)']) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>';
            ?>
</td>
			<td><?php 
            echo isset($Edition['MP3s']['320']) ? '<strong class="important_text_alt">YES</strong>' : '<strong class="important_text">NO</strong>';
            ?>
</td>
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:transcode_beta.php

示例7: isset

        ?>
&amp;torrent_pass=<?php 
        echo $LoggedUser['torrent_pass'];
        ?>
" class="tooltip" title="Download">DL</a>
						| <a href="reportsv2.php?action=report&amp;id=<?php 
        echo $TorrentID;
        ?>
" class="tooltip" title="Report">RP</a> ]
					</span>
					<?php 
        echo "{$DisplayName}\n";
        Votes::vote_link($GroupID, isset($UserVotes[$GroupID]) ? $UserVotes[$GroupID]['Type'] : '');
        ?>
					<div class="tags"><?php 
        echo $TorrentTags->format('torrents.php?type=' . $Action . '&amp;userid=' . $UserID . '&amp;tags=');
        ?>
</div>
				</div>
			</td>
			<td class="nobr"><?php 
        echo time_diff($Time, 1);
        ?>
</td>
			<td class="number_column nobr"><?php 
        echo Format::get_size($Torrent['Size']);
        ?>
</td>
			<td class="number_column"><?php 
        echo number_format($Torrent['Snatched']);
        ?>
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:user.php

示例8: generate_torrent_table


//.........这里部分代码省略.........
			<div class="group_image float_left clear">
				<?php 
            ImageTools::cover_thumb($WikiImage, $GroupCategoryID);
            ?>
			</div>
<?php 
        }
        ?>
			<div class="group_info clear">

				<span><a href="torrents.php?action=download&amp;id=<?php 
        echo $TorrentID;
        ?>
&amp;authkey=<?php 
        echo $LoggedUser['AuthKey'];
        ?>
&amp;torrent_pass=<?php 
        echo $LoggedUser['torrent_pass'];
        ?>
" title="Download" class="brackets tooltip">DL</a></span>

				<strong><?php 
        echo $DisplayName;
        ?>
</strong> <?php 
        echo $ExtraInfo;
        if ($Reported) {
            ?>
 - <strong class="torrent_label tl_reported">Reported</strong><?php 
        }
        if ($IsBookmarked) {
            ?>
				<span class="remove_bookmark float_right">
					<a href="#" id="bookmarklink_torrent_<?php 
            echo $GroupID;
            ?>
" class="bookmarklink_torrent_<?php 
            echo $GroupID;
            ?>
 brackets" onclick="Unbookmark('torrent', <?php 
            echo $GroupID;
            ?>
, 'Bookmark'); return false;">Remove bookmark</a>
				</span>
<?php 
        } else {
            ?>
				<span class="add_bookmark float_right">
					<a href="#" id="bookmarklink_torrent_<?php 
            echo $GroupID;
            ?>
" class="bookmarklink_torrent_<?php 
            echo $GroupID;
            ?>
 brackets" onclick="Bookmark('torrent', <?php 
            echo $GroupID;
            ?>
, 'Remove bookmark'); return false;">Bookmark</a>
				</span>
<?php 
        }
        ?>
				<div class="tags"><?php 
        echo $TorrentTags->format();
        ?>
</div>
			</div>
		</td>
		<td class="number_column nobr"><?php 
        echo Format::get_size($Size);
        ?>
</td>
		<td class="number_column nobr"><?php 
        echo Format::get_size($Data);
        ?>
</td>
		<td class="number_column"><?php 
        echo number_format((double) $Snatched);
        ?>
</td>
		<td class="number_column"><?php 
        echo number_format((double) $Seeders);
        ?>
</td>
		<td class="number_column"><?php 
        echo number_format((double) $Leechers);
        ?>
</td>
		<td class="number_column"><?php 
        echo number_format($Seeders + $Leechers);
        ?>
</td>
	</tr>
<?php 
    }
    //foreach ($Details as $Detail)
    ?>
	</table><br />
<?php 
}
开发者ID:Kufirc,项目名称:Gazelle,代码行数:101,代码来源:torrents.php

示例9: isset

						<span class="add_bookmark float_right">
							<a style="float: right;" href="#" id="bookmarklink_torrent_<?php 
        echo $GroupID;
        ?>
" class="brackets" onclick="Bookmark('torrent', <?php 
        echo $GroupID;
        ?>
, 'Remove bookmark'); return false;">Bookmark</a>
						</span>
<?php 
    }
    $VoteType = isset($UserVotes[$GroupID]['Type']) ? $UserVotes[$GroupID]['Type'] : '';
    Votes::vote_link($GroupID, $VoteType);
    ?>
						<div class="tags"><?php 
    echo $TorrentTags->format('torrents.php?taglist=', $Name);
    ?>
</div>
					</div>
				</td>
			</tr>
<?php 
    $LastRemasterYear = '-';
    $LastRemasterTitle = '';
    $LastRemasterRecordLabel = '';
    $LastRemasterCatalogueNumber = '';
    $LastMedia = '';
    $EditionID = 0;
    unset($FirstUnknown);
    foreach ($Torrents as $TorrentID => $Torrent) {
        if ($Torrent['Remastered'] && !$Torrent['RemasterYear']) {
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:artist.php

示例10:

    ?>
</a>
<?php 
    if ($BookmarkView) {
        ?>
			<span style="float: right;">
				<a href="#" onclick="Unbookmark('collage', <?php 
        echo $ID;
        ?>
, ''); return false;" class="brackets">Remove bookmark</a>
			</span>
<?php 
    }
    ?>
			<div class="tags"><?php 
    echo $TorrentTags->format('collages.php?action=search&amp;tags=');
    ?>
</div>
		</td>
		<td class="number_column"><?php 
    echo number_format((int) $NumTorrents);
    ?>
</td>
		<td class="number_column"><?php 
    echo number_format((int) $Subscribers);
    ?>
</td>
		<td class="nobr"><?php 
    echo time_diff($Updated);
    ?>
</td>
开发者ID:Kufirc,项目名称:Gazelle,代码行数:31,代码来源:browse.php


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