Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares > Mods & Themes
Reply
Thread Tools
  #1  
Old 11th February 2011, 23:58
lafouine022 lafouine022 is offline
Senior Member
 
Join Date: Feb 2010
P2P
Posts: 120
Default Similar Torrents by Name
SIMILAR TORRENTS BY NAME :bubble:

in detail.php

Remplace:

PHP Code:
if (count($ThanksArray) == 0)
    {
        
$AllThanks $AllThanks.$TButton.'<div id="torrent_thanks" name="torrent_thanks"><b><i>'.$lang->details['nothanksyet'].'</i></b></div>';
    }
    else
    {
        
$AllThanks $AllThanks.$TButton.'<div id="torrent_thanks" name="torrent_thanks">'.implode(', '$ThanksArray).'</div>';
    }

By

PHP Code:
if (count($ThanksArray) == 0)
    {
        
$AllThanks $AllThanks.$TButton.'<div id="torrent_thanks" name="torrent_thanks"><b><i>'.$lang->details['nothanksyet'].'</i></b></div>';
    }
    else
    {
        
$AllThanks $AllThanks.$TButton.'<div id="torrent_thanks" name="torrent_thanks">'.implode(', '$ThanksArray).'</div>';
    }
}
////////////// torrent similair /////////////////////
        
$searchname substr($torrent['name'], 08);
        
$query1 str_replace(" ",".",sqlesc("%".$searchname."%"));
        
$query2 str_replace("."," ",sqlesc("%".$searchname."%"));
           
$r mysql_query("SELECT id, name, size, added, seeders, leechers, category FROM torrents WHERE name LIKE {$query1} AND seeders > '0' AND id <> '$id' OR name LIKE {$query2} AND seeders > '0' AND id <> '$id' ORDER BY seeders DESC LIMIT 10") or sqlerr();
            if (
mysql_num_rows($r) > 0)
   {
   
$torrents "\n" .
   
"<td class=subheader align=center>".$lang->details['type']."</td><td class=subheader>".$lang->details['Nom']."</td><td class=subheader align=center>".$lang->details['size']."</td><td class=subheader align=center>".$lang->details['added']."</td><td class=subheader align=center>Seeders</td><td class=subheader align=center>Leechers</td>\n";
   while (
$a mysql_fetch_assoc($r))
   {
   
$r2 mysql_query("SELECT name, image FROM categories WHERE id=$a[category]") or sqlerr(__FILE____LINE__);
    
$a2 mysql_fetch_assoc($r2);
    
$cat "<img src=\"/pic/$a2[image]\" alt=\"$a2[name]\">";

   
$name $a["name"];
   
$torrents .= "<tr><td width=10% align=center><img src=\"/pic/categories/" .$a2["image"]. "\"></td><td class=hoptobutton><a href=details.php?id=" $a["id"] . "&hit=1><b>" htmlspecialchars($name) . "</b></a></td><td class=hoptobutton style='padding: 1px' align=center>"mksize($a[size]) ."</td><td class=hoptobutton style='padding: 1px' align=center>$a[added]</td><td class=hoptobutton style='padding: 1px' align=center>$a[seeders]</td><td class=hoptobutton style='padding: 1px' align=center>$a[leechers]</td></tr>\n";
   }
   
$torrents .= "</table>";
   
$similair1 =("<table width=100% class=main border=1 cellspacing=0 cellpadding=5><td class=thead>".$lang->details['similaire']."</td></table><table width=100% class=main border=1 cellspacing=0 cellpadding=5><tr align=left>$torrents</tr>\n");
   
   }
////////////// Torrent similair ///////////////////// 

And

Remplace:

PHP Code:
<table width="100%" border="0" cellpadding="5" cellspacing="0">
        <
tr>
            <
td class="thead">'.sprintf($lang->details['detailsfor'], $torrent['name']).'</td>
        </
tr>
        <
tr>
            <
td>
                
'.format_comment($torrent['descr']).'
            
</td>
        </
tr>
    </
table
By

PHP Code:
<table width="100%" border="0" cellpadding="5" cellspacing="0">
        <
tr>
            <
td class="thead">'.sprintf($lang->details['detailsfor'], $torrent['name']).'</td>
        </
tr>
        <
tr>
            <
td>
                
'.format_comment($torrent['descr']).'
            
</td>
        </
tr>
    </
table>
    <
br />
    
'.$similair1.'
    
<br /> 
Attached Thumbnails
similar.png  
Reply With Quote
The Following 7 Users Say Thank You to lafouine022 For This Useful Post:
alagnetwork (28th June 2012), DARCK (22nd May 2011), eckeO5 (15th January 2012), FENIX (25th January 2013), Marco (13th February 2011), mmisu120000 (13th February 2011), PAX (3rd March 2012)
  #2  
Old 13th February 2011, 19:12
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default thank you
Nice mod, work well :)

Later edit just a small fix

add your details lang
'similaire' => 'similar torrents',
Reply With Quote
The Following User Says Thank You to Marco For This Useful Post:
FENIX (25th January 2013)
  #3  
Old 16th February 2011, 18:06
gabkoko's Avatar
gabkoko gabkoko is offline
Senior Member
 
Join Date: Aug 2010
P2P
Posts: 33
Default Thx!
Good job!

again a small fix...
add your details lang
'Nom' => 'Torrent name',
Reply With Quote
The Following 2 Users Say Thank You to gabkoko For This Useful Post:
FENIX (25th January 2013), Marco (28th November 2012)
Reply

Tags
similar , torrents


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 07:14. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.