"xblade, post: 67842, member: 20395":
ill do a update on this soon
Quote:
try this, in torrents-details.php
$TTIMDB = new TTIMDB;
if ((($_data = $TTCache->Get("imdb/$id", 900)) === false) && ($_data = $TTIMDB->Get($row['imdb']))){
$_data->Poster = $TTIMDB->getImage($_data->Poster, $id);
if ( ! isset( $_data->imdbTime ) ){
$_data->imdbTime = time();
$_data->Alias = 'N/A';
$_data->imdbVideo = null;
}
$TTCache->Set("imdb/$id", $_data, 900);
}
if ( is_object($_data) ) { ?>
<fieldset class="download">
<legend><b><?php echo T_("IMDB_SHORT"); ?> - <?php echo $_data->Title; ?></b></legend>
<table border="0" cellpadding="3" cellspacing="2" width="100%">
<tr>
<td width="230"><img src="<?php echo $_data->Poster; ?>" alt="<?php echo $_data->Title; ?>" title="<?php echo $_data->Title; ?>" height="317px" width="214px" /></td>
<td valign="top">
<b><?php echo T_("IMDB_LINK"); ?></b><br /> <a href="<?php echo $row['imdb']; ?>" target="_blank"><?php echo htmlspecialchars($row['imdb']); ?></a><br /><br />
<b><?php echo T_("IMDB_RATED"); ?></b><br /> <?php echo $TTIMDB->getRated( $_data->Rated ); ?><br /><br />
<b><?php echo T_("IMDB_ALIAS"); ?></b><br /> <?php echo $_data->Alias; ?><br /><br />
<b><?php echo T_("IMDB_RELEASED"); ?></b><br /> <?php echo $TTIMDB->getReleased($_data->Released); ?><br /><br />
<b><?php echo T_("IMDB_YEAR"); ?></b><br /> <?php echo $_data->Year; ?><br /><br />
<b><?php echo T_("IMDB_RUNTIME"); ?></b><br /> <?php echo $_data->Runtime; ?><br /><br />
<b><?php echo T_("IMDB_GENRE"); ?></b><br /> <?php echo $_data->Genre; ?><br /><br />
<b><?php echo T_("IMDB_DIRECTOR"); ?></b><br /> <?php echo $_data->Director; ?><br /><br />
<b><?php echo T_("IMDB_WRITER"); ?></b><br /> <?php echo $_data->Writer; ?><br /><br />
<b><?php echo T_("IMDB_ACTORS"); ?></b><br /> <?php echo $_data->Actors; ?><br /><br />
<b><?php echo T_("IMDB_PLOT"); ?></b><br /> <?php echo $_data->Plot; ?>
</td>
<?php if (($rating = $TTIMDB->getRating($_data->imdbRating)) !== null){ ?>
<td valign="top" align="center">
<?php echo $rating; ?><br /><br />
<b><?php echo T_("IMDB_VOTES"); ?></b> <?php echo $_data->imdbVotes; ?>
</td>
<?php } ?>
</tr>
<tr>
<td align="right" colspan="3">
<b><?php echo T_("IMDB_LASTUPDATED"); ?></b> <i><?php echo $TTIMDB->getUpdated($_data->imdbTime); ?></i>
</td>
</tr>
</table>
</fieldset>
<br />
<?php if ( strlen( $_data->imdbVideo ) > 3 ){ ?>
<center><iframe src="http://www.imdb.com/video/imdb/<?php echo $_data->imdbVideo; ?>/player?stop=1" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" height="480" width="643"></iframe></center><br />
<?php }
}
$TTIMDB = new TTIMDB;
if ((($_data = $TTCache->Get("imdb/$id", 900)) === false) && ($_data = $TTIMDB->Get($row['imdb']))){
$_data->Poster = $TTIMDB->getImage($_data->Poster, $id);
if ( ! isset( $_data->imdbTime ) ){
$_data->imdbTime = time();
$_data->Alias = 'N/A';
$_data->imdbVideo = null;
}
$TTCache->Set("imdb/$id", $_data, 900);
}
$IMDB = new IMDB;
$data = null;
if ((($data = $TTCache->get("imdb/$id", 86400)) === false) && ($data = $IMDB->get($row['imdb'])))
{
$TTCache->Set("imdb/$id", $data, 86400);
}
if (($data != null) && (is_object($data))):
?> "MicroMonkey, post: 67710, member: 311":
not sure what you are talking about
if (!$site_config["MEMBERSONLY"] || $CURUSER) {
$news = mysql_query("SELECT id, name, added, image1, image2, sticky, seeders, leechers FROM torrents WHERE sticky = 'yes' AND visible='yes' ORDER BY torrents.id DESC LIMIT 10"); ///limi$
if (mysql_num_rows($news) > 0) {
print("<table class=xtd align=center cellpadding=0 cellspacing=0 width=100% border=0><tr>");
while ($row2 = mysql_fetch_array($news, MYSQL_NUM)) {
$tor = $row2['0'];
$altname = $row2['1'];
$where = "WHERE banned = 'no' AND visible='yes' AND torrents.id='$tor'";
$res = mysql_query("SELECT torrents.id, torrents.image1, torrents.image2, torrents.added, torrents.seeders, torrents.leechers, categories.name AS cat_name FROM torrents LEFT JOIN categories ON torrents.category = categories.id $where $orderby $limit");
$row = mysql_fetch_array($res);
$cat = $row['cat_name'];
$img1 = "<div class=extremlymtv><a class='hovertexty' title='Sticky' href='{$site_config[SITEURL]}/file.php?id=$row[id]'><img border='0'src='uploads/images/$row[image1]' title=\"Last Sticky: $altname | $cat\" height=140 width=100></a></div>";
if ($row["image1"] != ""){
print("<td align=center>". $img1 ."<div style='margin-top:10px; font-size:13px;'>
<img src=images/arrow_up.gif height='12' title='Seeders' border=0><font color=#00AA00><b>".$row['seeders']."</b></font> |
<img src=images/arrow_down.gif height='12' title='Leechers' border=0><font color=#FF0000> <b>".$row['leechers']."</b></font>
</div></td><td> </td>");
}
}
print("</tr></table>");
}
} $query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.sticky, torrents.recommendedx, torrents.viptorrents, torrents.description, torrents.imdb, torrents.leechers, torrents.nfo, torrents.views, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.torrentlang, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id $where $orderby $limit";
$fres = mysql_query("SELECT * FROM `files` WHERE `torrent` = $id ORDER BY `path` ASC");
if (mysql_num_rows($fres)) {
while ($frow = mysql_fetch_assoc($fres)) {
echo "<tr><td >".htmlspecialchars($frow['path'])."</td><td >".mksize($frow['filesize'])."</td></tr>";
}
}else{
echo "<tr><td >".htmlspecialchars($row["name"])."</td><td >".mksize($row["size"])."</td></tr>";
} $dict = BDecode(BEncode($dict)); // double up on the becoding solves the occassional misgenerated infohash
$dict['comment'] = "Òîððåíò ñîçäàí äëÿ '$SITENAME'"; // change torrent comment
$dict['created by'] = "$CURUSER[username]"; // change created by
$dict['publisher'] = "$CURUSER[username]"; // change publisher
$dict['publisher.utf-8'] = "$CURUSER[username]"; // change publisher.utf-8
$dict['publisher-url'] = "$DEFAULTBASEURL/userdetails.php?id=$CURUSER[id]"; // change publisher-url
$dict['publisher-url.utf-8'] = "$DEFAULTBASEURL/userdetails.php?id=$CURUSER[id]"; // change publisher-url.utf-8
$infohash = sha1(BEncode($dict['info']));
if ($multi_torrent == 'yes') {
if (empty($dict['announce-list']) && !empty($dict['announce']))
$dict['announce-list'][] = array($dict['announce']);
if (!empty($dict['announce-list'])) {
$parsed_urls = array();
foreach ($dict['announce-list'] as $al_url) {
$al_url[0] = trim($al_url[0]); // Trim url for match below and prevent "Invalid tracker url." error message if URL contains " " before proto://
if ($al_url[0] == 'http://retracker.local/announce')
continue;
if (!preg_match('#^(udp|http)://#si', $al_url[0]))
continue; // Skip not http:// or udp:// urls
if (in_array($al_url[0], $parsed_urls))
continue; // To skip doubled announce urls
$url_array = parse_url($al_url[0]);
if (substr($url_array['host'], -6) == '.local')
continue; // Skip any .local domains
$parsed_urls[] = $al_url[0];
// À âäðóã â òîððåíòå äâà îäèíàêîâûõ àííîíñåðà? Ïîòîìó REPLACE INTO
sql_query('REPLACE INTO torrents_scrape (tid, info_hash, url) VALUES ('.implode(', ', array_map('sqlesc', array($next_id, $infohash, $al_url[0]))).')') or sqlerr(__FILE__,__LINE__);
}
} else
stderr($tracker_lang['error'], "Â òîððåíò ôàéëå íåò announce-list è íå óêàçàí announce. Òàêîé ìóëüòèòðåêåðíûé òîððåíò èñïîëüçîâàòü íåëüçÿ.");
} "serph, post: 67523, member: 1398":
Change
ORDER BY sticky ASC, id DESC LIMIT 25";
to
ORDER BY sticky ASC, id DESC LIMIT 10";
if ($_GET["order"] == "asc" || ($_GET["sort"] != "id" && !$_GET["order"])) {
$sort .= " ASC";
$addparam .= "order=asc&";
} else {
$sort .= " DESC";
$addparam .= "order=desc&";
}
$orderby = "ORDER BY $sort";
}else{
$orderby = "ORDER BY torrents.sticky ASC, torrents.id DESC ";
$_GET["sort"] = "id";
$_GET["order"] = "desc";
}
//Get Total For Pager
$res = mysql_query("SELECT COUNT(*) FROM torrents LEFT JOIN categories ON category = categories.id $where") or die(mysql_error());
$row = mysql_fetch_array($res);
$count = $row[0];
//get sql info
if ($count) {
list($pagertop, $pagerbottom, $limit) = pager(35, $count, "torrents.php?" . $addparam);
$query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.sticky, torrents.viptorrents, torrents.description, torrents.imdb, torrents.leechers, torrents.nfo, torrents.views, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.torrentlang, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id $where $orderby $limit";
$res = mysql_query($query) or die(mysql_error());
}else{
unset($res);