Show YouTube only if its present

When no YouTube link is added, YouTube table doesn't show.
This commit is contained in:
fen7azy 2014-06-22 18:13:57 +03:00
parent 5ed9a30db7
commit 9b1af5ed49

View File

@ -678,7 +678,7 @@ function filelist($Str) {
<tr class="torrent_row releases_<?=$ReleaseType?> groupid_<?=$GroupID?> edition_<?=$EditionID?> group_torrent<?=($IsSnatched ? ' snatched_torrent' : '')?>" style="font-weight: normal;" id="torrent<?=$TorrentID?>">
<td>
<span>[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID ?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" class="tooltip" title="Download"><?=($HasFile ? 'DL' : 'Missing')?></a>
<span>[ <a href="torrents.php?action=download&amp;id=<?=$TorrentID ?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>" class="tooltip" title="Download"><?=($HasFile ? 'Download' : 'Missing')?></a>
<? if (Torrents::can_use_token($Torrent)) { ?>
| <a href="torrents.php?action=download&amp;id=<?=$TorrentID ?>&amp;authkey=<?=$LoggedUser['AuthKey']?>&amp;torrent_pass=<?=$LoggedUser['torrent_pass']?>&amp;usetoken=1" class="tooltip" title="Use a FL Token" onclick="return confirm('Are you sure you want to use a freeleech token here?');">FL</a>
<? } ?>
@ -899,17 +899,14 @@ function filelist($Str) {
}
?>
<?
if (!$Youtube) {
$show_yt = 'There is no youtube URL on this torrent.';
} else {
$show_yt = '<object type="application/x-shockwave-flash" style="width:560px; height:340px;" data="'.str_replace($Youtube).'"><param name="movie" value="'.str_replace($Youtube).'" /></object>';
}
if ($Youtube) {
?>
<div class="box youtube">
<div class="head"><a href="#">&uarr;</a>&nbsp;<strong>YouTube</strong><span style="float: right;"><a href="#" onclick="$('#youtube').gtoggle(); this.innerHTML = (this.innerHTML == 'Hide' ? 'Show' : 'Hide'); return false;" class="brackets">Hide</a></span></div>
<div id="youtube" class="body" align="center"><?=$show_yt?></div>
<div id="youtube" class="body" align="center"><object type="application/x-shockwave-flash" style="width:560px; height:340px;" data="<?=$Youtube?>"><param name="movie" value="<?=$Youtube?>" /></object></div>
</div>
<?
}
//
// Matched Votes
include(SERVER_ROOT.'/sections/torrents/voter_picks.php');