本文整理汇总了PHP中Format::torrent_label方法的典型用法代码示例。如果您正苦于以下问题:PHP Format::torrent_label方法的具体用法?PHP Format::torrent_label怎么用?PHP Format::torrent_label使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Format
的用法示例。
在下文中一共展示了Format::torrent_label方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build_torrents_table
//.........这里部分代码省略.........
$AddExtra = '';
// Separator between torrent properties
$TorrentUploader = $Username;
// Save this for "Uploaded by:" below
// similar to Torrents::torrent_info()
if ($Format) {
$ExtraInfo .= display_str($Format);
$AddExtra = ' / ';
}
if ($Encoding) {
$ExtraInfo .= $AddExtra . display_str($Encoding);
$AddExtra = ' / ';
}
if ($HasLog) {
$ExtraInfo .= "{$AddExtra}Log";
$AddExtra = ' / ';
}
if ($HasLog && $LogInDB) {
$ExtraInfo .= ' (' . (int) $LogScore . '%)';
}
if ($HasCue) {
$ExtraInfo .= "{$AddExtra}Cue";
$AddExtra = ' / ';
}
if ($Scene) {
$ExtraInfo .= "{$AddExtra}Scene";
$AddExtra = ' / ';
}
if (!$ExtraInfo) {
$ExtraInfo = $GroupName;
$AddExtra = ' / ';
}
if ($IsSnatched) {
$ExtraInfo .= $AddExtra . Format::torrent_label('Snatched!');
$AddExtra = ' / ';
}
if ($FreeTorrent == '1') {
$ExtraInfo .= $AddExtra . Format::torrent_label('Freeleech!');
$AddExtra = ' / ';
}
if ($FreeTorrent == '2') {
$ExtraInfo .= $AddExtra . Format::torrent_label('Neutral Leech!');
$AddExtra = ' / ';
}
if ($PersonalFL) {
$ExtraInfo .= $AddExtra . Format::torrent_label('Personal Freeleech!');
$AddExtra = ' / ';
}
if ($Reported) {
$ExtraInfo .= $AddExtra . Format::torrent_label('Reported');
$AddExtra = ' / ';
}
if (!empty($BadTags)) {
$ExtraInfo .= $AddExtra . Format::torrent_label('Bad Tags');
$AddExtra = ' / ';
}
if (!empty($BadFolders)) {
$ExtraInfo .= $AddExtra . Format::torrent_label('Bad Folders');
$AddExtra = ' / ';
}
if (!empty($CassetteApproved)) {
$ExtraInfo .= $AddExtra . Format::torrent_label('Cassette Approved');
$AddExtra = ' / ';
}
if (!empty($LossymasterApproved)) {
$ExtraInfo .= $AddExtra . Format::torrent_label('Lossy Master Approved');
示例2: torrent_info
/**
* Format the information about a torrent.
* @param $Data an array a subset of the following keys:
* Format, Encoding, HasLog, LogScore HasCue, Media, Scene, RemasterYear
* RemasterTitle, FreeTorrent, PersonalFL
* @param boolean $ShowMedia if false, Media key will be omitted
* @param boolean $ShowEdition if false, RemasterYear/RemasterTitle will be omitted
*/
public static function torrent_info($Data, $ShowMedia = false, $ShowEdition = false)
{
$Info = array();
if (!empty($Data['Format'])) {
$Info[] = $Data['Format'];
}
if (!empty($Data['Encoding'])) {
$Info[] = $Data['Encoding'];
}
if (!empty($Data['HasLog'])) {
$Str = 'Log';
if (!empty($Data['LogScore'])) {
$Str .= ' (' . $Data['LogScore'] . '%)';
}
$Info[] = $Str;
}
if (!empty($Data['HasCue'])) {
$Info[] = 'Cue';
}
if ($ShowMedia && !empty($Data['Media'])) {
$Info[] = $Data['Media'];
}
if (!empty($Data['Scene'])) {
$Info[] = 'Scene';
}
if ($ShowEdition) {
$EditionInfo = array();
if (!empty($Data['RemasterYear'])) {
$EditionInfo[] = $Data['RemasterYear'];
}
if (!empty($Data['RemasterTitle'])) {
$EditionInfo[] = $Data['RemasterTitle'];
}
if (count($EditionInfo)) {
$Info[] = implode(' ', $EditionInfo);
}
}
if ($Data['IsSnatched']) {
$Info[] = Format::torrent_label('Snatched!');
}
if ($Data['FreeTorrent'] == '1') {
$Info[] = Format::torrent_label('Freeleech!');
}
if ($Data['FreeTorrent'] == '2') {
$Info[] = Format::torrent_label('Neutral Leech!');
}
if ($Data['PersonalFL']) {
$Info[] = Format::torrent_label('Personal Freeleech!');
}
return implode(' / ', $Info);
}
示例3: list
</tr>
<?php
}
} else {
// Viewing a type that does not require grouping
list($TorrentID, $Torrent) = each($Torrents);
$DisplayName = "<a href=\"torrents.php?id={$GroupID}\" class=\"tooltip\" title=\"View torrent group\" dir=\"ltr\">{$GroupName}</a>";
if ($Torrent['IsSnatched']) {
$DisplayName .= ' ' . Format::torrent_label('Snatched!');
}
if ($Torrent['FreeTorrent'] == '1') {
$DisplayName .= ' ' . Format::torrent_label('Freeleech!');
} elseif ($Torrent['FreeTorrent'] == '2') {
$DisplayName .= ' ' . Format::torrent_label('Neutral Leech!');
} elseif ($Torrent['PersonalFL']) {
$DisplayName .= ' ' . Format::torrent_label('Personal Freeleech!');
}
$SnatchedTorrentClass = $Torrent['IsSnatched'] ? ' snatched_torrent' : '';
?>
<tr class="torrent torrent_row<?php
echo $SnatchedTorrentClass . $SnatchedGroupClass;
?>
" id="group_<?php
echo $GroupID;
?>
">
<td></td>
<td class="center">
<div title="<?php
echo $TorrentTags->title();
?>
示例4:
$AddExtra = ' / ';
}
if (!empty($CassetteApproved)) {
$ExtraInfo .= $AddExtra . Format::torrent_label('Cassette Approved');
$AddExtra = ' / ';
}
if (!empty($LossymasterApproved)) {
$ExtraInfo .= $AddExtra . Format::torrent_label('Lossy Master Approved');
$AddExtra = ' / ';
}
if (!empty($LossywebApproved)) {
$ExtraInfo .= $AddExtra . Format::torrent_label('Lossy WEB Approved');
$AddExtra = ' / ';
}
if (!empty($BadFiles)) {
$ExtraInfo .= $AddExtra . Format::torrent_label('Bad File Names');
$AddExtra = ' / ';
}
if ($GroupCategoryID == 1 && ($RemasterTitle != $LastRemasterTitle || $RemasterYear != $LastRemasterYear || $RemasterRecordLabel != $LastRemasterRecordLabel || $RemasterCatalogueNumber != $LastRemasterCatalogueNumber || $FirstUnknown || $Media != $LastMedia)) {
$EditionID++;
?>
<tr class="releases_<?php
echo $ReleaseType;
?>
groupid_<?php
echo $GroupID;
?>
edition group_torrent">
<td colspan="5" class="edition_info"><strong><a href="#" onclick="toggle_edition(<?php
echo $GroupID;
?>
示例5: each
}
} else {
// Viewing a type that does not require grouping
list($TorrentID, $Data) = each($Torrents);
$DisplayName .= "<a href=\"torrents.php?id=$GroupID&torrentid=$TorrentID#torrent$TorrentID\" class=\"tooltip\" title=\"View torrent\" dir=\"ltr\">$GroupName</a>";
if (isset($GroupedCategories[$CategoryID - 1])) {
if ($GroupYear) {
$DisplayName .= " [$GroupYear]";
}
if ($CategoryID == 1 && $ReleaseType > 0) {
$DisplayName .= ' ['.$ReleaseTypes[$ReleaseType].']';
}
$ExtraInfo = Torrents::torrent_info($Data, true, true);
} elseif ($Data['IsSnatched']) {
$ExtraInfo = Format::torrent_label('Snatched!');
} else {
$ExtraInfo = '';
}
$SnatchedTorrentClass = $Data['IsSnatched'] ? ' snatched_torrent' : '';
?>
<tr class="torrent<?php
echo $SnatchedTorrentClass . $SnatchedGroupClass;
?>
">
<? if ($GroupResults) { ?>
<td></td>
<? } ?>
<td class="center cats_col">
<div title="<?php
echo $TorrentTags->title();
示例6: Tags
} else {
$ArtistNames = '';
}
$TorrentTags = new Tags($Group['TagList']);
foreach ($Group['Editions'] as $RemIdent => $Edition) {
// TODO: point to the correct FLAC (?)
$FlacID = array_search(true, $Edition['FlacIDs']);
$DisplayName = $ArtistNames . "<a href=\"torrents.php?id={$GroupID}&torrentid={$FlacID}#torrent{$FlacID}\" class=\"tooltip\" title=\"View torrent\" dir=\"ltr\">{$GroupName}</a>";
if ($GroupYear > 0) {
$DisplayName .= " [{$GroupYear}]";
}
if ($ReleaseType > 0) {
$DisplayName .= ' [' . $ReleaseTypes[$ReleaseType] . ']';
}
if ($Edition['FLACIsSnatched']) {
$DisplayName .= ' ' . Format::torrent_label('Snatched!');
}
?>
<tr<?php
echo $Edition['FLACIsSnatched'] ? ' class="snatched_torrent"' : '';
?>
>
<td>
<span class="torrent_links_block">
<a href="torrents.php?action=download&id=<?php
echo $Edition['FlacID'];
?>
&authkey=<?php
echo $LoggedUser['AuthKey'];
?>
&torrent_pass=<?php
示例7: generate_torrent_table
//.........这里部分代码省略.........
}
if ($Encoding) {
$ExtraInfo .= $AddExtra . $Encoding;
$AddExtra = ' / ';
}
// "FLAC / Lossless / Log (100%) / Cue / CD";
if ($HasLog) {
$ExtraInfo .= $AddExtra . 'Log (' . $LogScore . '%)';
$AddExtra = ' / ';
}
if ($HasCue) {
$ExtraInfo .= $AddExtra . 'Cue';
$AddExtra = ' / ';
}
if ($Media) {
$ExtraInfo .= $AddExtra . $Media;
$AddExtra = ' / ';
}
if ($Scene) {
$ExtraInfo .= $AddExtra . 'Scene';
$AddExtra = ' / ';
}
if ($Year > 0) {
$ExtraInfo .= $AddExtra . $Year;
$AddExtra = ' ';
}
if ($RemasterTitle) {
$ExtraInfo .= $AddExtra . $RemasterTitle;
}
if ($IsSnatched) {
if ($GroupCategoryID == 1) {
$ExtraInfo .= ' / ';
}
$ExtraInfo .= Format::torrent_label('Snatched!');
}
if ($ExtraInfo != '') {
$ExtraInfo = "- [{$ExtraInfo}]";
}
}
$TorrentTags = new Tags($TagsList);
//Get report info, use the cache if available, if not, add to it.
$Reported = false;
$Reports = Torrents::get_reports($TorrentID);
if (count($Reports) > 0) {
$Reported = true;
}
// print row
?>
<tr class="torrent row<?php
echo $Highlight . ($IsBookmarked ? ' bookmarked' : '') . ($IsSnatched ? ' snatched_torrent' : '');
?>
">
<td style="padding: 8px; text-align: center;"><strong><?php
echo $Rank;
?>
</strong></td>
<td class="center cats_col"><div title="<?php
echo $TorrentTags->title();
?>
" class="tooltip <?php
echo Format::css_category($GroupCategoryID);
?>
<?php
echo $TorrentTags->css_name();
?>
"></div></td>