Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Template Shares (http://www.bvlist.com/forumdisplay.php?f=26)
-   -   hit of week plugin for TS v 5.1 (http://www.bvlist.com/showthread.php?t=895)

zenja7777 26th August 2008 01:13

hit of week plugin for TS v 5.1
 
Who be make such fashions plugin for TS v 5.1 please a hit of week.Is very necessary

http://s44.radikal.ru/i104/0808/ce/80a0ac9fd83at.jpg

wMan 26th August 2008 14:45

u got a link or more info

zenja7777 26th August 2008 17:22

Quote:

Originally Posted by clocktower (Post 3729)
u got a link or more info

Here this code to alter under TS v 5.1

We choose most the most swung for last week
And in the form of creeping pictures (we creep upwards) we show clients.
As a result the most popular becomes even more popular

PHP Code:

$res mysql_query("SELECT id,category,seeders, torrents.image1, leechers, name, times_completed from torrents WHERE added > DATE_SUB(NOW(), INTERVAL 6 DAY) ORDER BY times_completed DESC LIMIT 6") or sqlerr(__FILE____LINE__);

$num mysql_num_rows($res);

if (
$num 0) {
$content .= "<table border=1 cellspacing=0 cellpadding=5 width=100%><tr>";
$content .= "<table border=1 cellspacing=0 cellpadding=5 width=100%><tr><td class=block>";

$content .= "<MARQUEE behavior= \"scroll\" align=\"left\" direction= \"up\" height=\"220\" scrollamount= \"2\" scrolldelay= \"80\" >";
//$content .= "<MARQUEE behavior= \"scroll\" align=\"left\" direction= \"up\" height=\"220\" scrollamount= \"2\" scrolldelay= \"90\" onmouseover= \"this.stop()\"  onmouseout='this.start()'>";

for ($i 0$i $num; ++$i)
{
while (
$row mysql_fetch_assoc($res)) {
$cros mysql_query("SELECT name, image FROM categories WHERE id=$row[category]");
if (
mysql_num_rows($cros) == 1)
{
$corr mysql_fetch_assoc($cros);
$cat_img "<img src=$BASEURL/pic/cats/" $corr[image] . " border=0 alt='$corr[name]'>";
}
$content .= "<center><a href=details.php?id=$row[id]><b>$row[name]</b></a></center>"
$content .= "<center><a href=details.php?id=$row[id]><img border='0' src='thumb2.php?w=147&q=60&file=$row[image1]' border=\"0\" /></a> <align=center><font color=red><span title=\"Раздают\">" .number_format($row['seeders'])."</span><font color=green><span title=\"Качают\">"." ".number_format($row['leechers'])."<font color=aqua><span title=\"Всего скачано раз\">"." ".number_format($row['times_completed'])."</font></center>"
$content .= "<p>";
}
}
}
$content .= "</marquee></tr></td></table>"

In a fashion it is used resaizer pictures better standard (allows to reduce the size of a picture in kilobytes)
The given file to call thumb2.php and to put in a root tracker

PHP Code:

<?
$image 
"torrents/images/".$_GET['file'];
// не забудьте поменять каталог если у вас картинки хранятся в другом месте

if ( is_file($image) )
        {
    list(
$image_width$image_height$image_type) = getimagesize($image);
    
    switch (
$image_type) {
    case 
"1" $image_src imagecreatefromgif ($image); break;
    case 
"2" $image_src imagecreatefromjpeg($image); break;
    case 
"3" $image_src imagecreatefrompng ($image); break;
                };
                
 if ( !isset(
$_GET['q']) ) { $q 80; } else { $q $_GET['q']; };
 if ( 
$_GET['w'] == || $_GET['w'] > $image_width ) { $w $image_width; } else { $w $_GET['w']; };
 
$height = ($image_height $w) / $image_width;
 if ( isset(
$_GET['h']) && $height $_GET['h'] ) { $w = ($image_width $_GET['h']) / $image_height$h $_GET['h']; } else { $h $height; };
 
$im imagecreatetruecolor($w$h);
 
imagecopyresampled($im$image_src0000$w$h$image_width$image_height);
    }
    else
    {
    
$im imagecreatetruecolor(11);
    };
                            
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Content-type: image/jpeg");
imagejpeg($imNULL$q);
?>

================================================== ======================
Or for ts alters this code who can please

Code:


if (!defined('BLOCK_FILE')) {
header("Location: ../index.php");
exit;
}

$res = mysql_query("SELECT id, category, seeders, torrents.image1, leechers, name, times_completed from torrents WHERE category <> 17 AND torrents.image1 <> 0 AND added > DATE_SUB(NOW(), INTERVAL 6 DAY) ORDER BY times_completed DESC LIMIT 6") or sqlerr(__FILE__, __LINE__);

$num = mysql_num_rows($res);

if ($num > 0) {
$content .= "";
$content .= "
";

//$content .= "";
$content .= "";

for ($i = 0; $i < $num; ++$i)
{
while ($row = mysql_fetch_assoc($res)) {
$cros = mysql_query("SELECT name, image FROM categories WHERE id=$row[category]");
if (mysql_num_rows($cros) == 1)
{
$corr = mysql_fetch_assoc($cros);
$cat_img = "$corr[name]";
}
$content .= "
$row[name]
";
$content .= "
$row[name] " .number_format($row['seeders']).""." ".number_format($row['leechers']).""." ".number_format($row['times_completed'])."
";
$content .= "

";
}
}
}
$content .= "

";
================================================== =========
Or for ts alters this code who can please

Code:


if (!defined('BLOCK_FILE')) {
header("Location: ../index.php");
exit;
}

$res = mysql_query("SELECT id,category,seeders, torrents.poster, leechers, name, times_completed from torrents WHERE added > DATE_SUB(NOW(), INTERVAL 6 DAY) ORDER BY times_completed DESC LIMIT 6") or sqlerr(__FILE__, __LINE__);

$num = mysql_num_rows($res);

if ($num > 0) {
$content .= "";
$content .= "
";

$content .= "";
//$content .= "";

for ($i = 0; $i < $num; ++$i)
{
while ($row = mysql_fetch_assoc($res)) {
$cros = mysql_query("SELECT name, image FROM categories WHERE id=$row[category]");
if (mysql_num_rows($cros) == 1)
{
$corr = mysql_fetch_assoc($cros);
$cat_img = "$corr[name]";
}
$content .= "
$row[name]
"; 
$content .= "
" .number_format($row['seeders']).""." ".number_format($row['leechers']).""." ".number_format($row['times_completed'])."
"; 
$content .= "

";
}
}
}
$content .= "

";
================================================== ============
Who will make such plugin for TS v 5.1 I shall be very grateful


All times are GMT +2. The time now is 01:29.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.