當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。