Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Template Shares > Mods & Themes
Reply
  #1  
Old 26th June 2011, 19:25
DARCK's Avatar
DARCK DARCK is offline
Senior Member
 
Join Date: Apr 2011
P2P
Posts: 69
Smile plugin list torrent
create torrents.php
/include/plugins/torrents.php
PHP Code:
<?php
/*
************************************************
*==========[TS Special Edition v.5.6]==========*
************************************************
*              Special Thanks To               *
*        DrNet - wWw.SpecialCoders.CoM         *
*          Vinson - wWw.Decode4u.CoM           *
*    MrDecoder - wWw.Fearless-Releases.CoM     *
*           Fynnon - wWw.BvList.CoM            *
*==============================================*
*         by lateam                            *
*                                              *
*                                              *
************************************************
*/
// Dont change for future reference.
if (!defined('TS_P_VERSION'))
{
    
define('TS_P_VERSION''1.1 by xam');
}
// Security Check.
if (!defined('IN_PLUGIN_SYSTEM'))
{
    die(
"<font face='verdana' size='2' color='darkred'><b>Error!</b> Direct initialization of this file is not allowed.</font>");
}

function 
quick_replace_tags($s)
{
    
$simple_search = array(
                                        
"/\[b\]((\s|.)+?)\[\/b\]/is",
                                        
"#\[size=(xx-small|x-small|small|medium|large|x-large|xx-large)\](.*?)\[/size\]#si",
                                        
"#\[align=(left|center|right|justify)\](.*?)\[/align\]#si",
                                        
"/\[i\]((\s|.)+?)\[\/i\]/is",
                                        
"/\[h\]((\s|.)+?)\[\/h\]/is",
                                        
"/\[u\]((\s|.)+?)\[\/u\]/is",
                                        
"/\[img\]((http|https):\/\/[^\s'\"<>]+(\.(jpg|gif|png)))\[\/img\]/is",
                                        
"/\[img=((http|https):\/\/[^\s'\"<>]+(\.(gif|jpg|png)))\]/is",
                                        
"/\[color=([a-zA-Z]+)\]((\s|.)+?)\[\/color\]/is",
                                        
"/\[color=(#[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9])\]((\s|.)+?)\[\/color\]/is",
                                        
"/\[url=([^()<>\s]+?)\]((\s|.)+?)\[\/url\]/is",
                                        
"/\[url\]([^()<>\s]+?)\[\/url\]/is",
                                        
"/(\A|[^=\]'\"a-zA-Z0-9])((http|ftp|https|ftps|irc):\/\/[^()<>\s]+)/i"
        
);

    
$simple_replace "\\1";
    
$s preg_replace ($simple_search$simple_replace$s);
    
$s str_replace(array("\n","\r"), ""$s);
    
$s addslashes($s);
    return 
$s;
}
$lang->load('browse');
// BEGIN Plugin: torrents
//define('SKIP_CACHE_MESSAGE', true);
//require_once(INC_PATH.'/functions_cache2.php');
//if (!($torrents=cache_check2('torrents')))
//{




$lt_query sql_query('SELECT t.id,t.name,t.size,t.descr,t.offensive,t.added,t.seeders,t.leechers,t.category,t.numfiles,t.owner,t.anonymous,t.ts_external,t.times_completed,t.t_image,c.vip FROM torrents t  LEFT JOIN categories c ON t.category = c.id WHERE t.visible = \'yes\' AND t.banned=\'no\' AND t_image != \'\' ORDER BY added DESC LIMIT 0,'.$i_torrent_limit);        
    if(
mysql_num_rows($lt_query) > 0)
    {
        
$torrents '<!-- begin lastXforumposts -->
    <table width="100%" border="0" cellspacing="0" cellpadding="5">
                    <tr>
<td class="thead" align="left" style="padding: 10px 0 0 0;">&nbsp;'
.$lang->browse['t_name'].'</td>


        <td class="thead" align="center" style="padding: 10px 0 0 0;"><img src="'
.$BASEURL.'/'.$pic_base_url.'/down1.gif" border="0" class="inlineimg"></td>


        <td class="thead" align="center" style="padding: 10px 0 0 0;"><img src="'
.$BASEURL.'/'.$pic_base_url.'/files.gif" border="0" class="inlineimg"></td>


        <td class="thead" align="center" style="padding: 10px 0 0 0;"><img src="'
.$BASEURL.'/'.$pic_base_url.'/comments.gif" border="0" class="inlineimg"></td>


        <td class="thead" align="center" style="padding: 10px 0 0 0;"><img src="'
.$BASEURL.'/'.$pic_base_url.'/seeders.gif" border="0" class="inlineimg"></td>


        <td class="thead" align="center" style="padding: 10px 0 0 0;"><img src="'
.$BASEURL.'/'.$pic_base_url.'/leechers.gif" border="0" class="inlineimg"></td>


        


        <td class="thead" align="center" style="padding: 10px 0 0 0;">'
.$lang->global['size'].' </td>


        <td class="thead" align="center" style="padding: 10px 0 0 0;"> '
.$lang->global['snatched'].'</td>


</tr>

    




         



            '
;
        
$count=0;
        
        while(
$row mysql_fetch_assoc($lt_query))
        {
            if (
$usergroups['canviewviptorrents'] != 'yes' && $row['vip'] == 'yes') continue;            
            elseif (
$row['offensive'] == 'yes' && preg_match('#E0#is'$CURUSER['options'])) continue;
            
$seolink ts_seo($row['id'], $row['name'], 's');
            
$cdesc htmlspecialchars_uni($c['cat_desc']);

   
$seolink2 ts_seo($row['id'],$row['name'],'s');
        
$seolink3 ts_seo($row['id'],$row['name'],'d');
              


           

$fullname $javascriptname htmlspecialchars_uni($row['name']);
            
$javascriptname str_replace("'""\'"$javascriptname);
            
 

   
$torrent_files '<b>'.($row['numfiles'] > '<a href="'.$BASEURL.'/details.php?id='.$row['id'].'&tab=filelist">' '').ts_nf($row['numfiles']).($row['numfiles'] > '</a>' '').'</b>';
   
$torrent_comments = ($row['comments'] > '<a href="'.$BASEURL.'/details.php?id='.$row['id'].'&tab=comments">' '').'<b>'.ts_nf($row['comments']).'</b>'.($row['comments'] > '</a>' '');
   
$torrent_download_link = (!$is_bookmark_page '<a href="'.$seolink3.'" title="'.$downloadinfo.'" alt="'.$downloadinfo.'" /><img src="'.$BASEURL.'/'.$pic_base_url.'dl.gif"></a>' '<a href="'.$BASEURL.'/bookmarks.php?torrentid='.$torrents['id'].'&amp;action=delete" title="" alt="" /><img src="'.$BASEURL.'/'.$pic_base_url.'delete.gif"></a>');
   
$torrent_snatched = ($row['ts_external'] == 'no' && $row['times_completed'] > && $usergroups['cansnatch'] == 'yes' sprintf($lang->browse['info3'], '<a href="'.$BASEURL.'/viewsnatches.php?id='.$row['id'].'"><b>'.ts_nf($row['times_completed']).'</b></a>') : sprintf($lang->browse['info3'], '<b>'.ts_nf($row['times_completed']).'</b>'));



$added my_datee($dateformat$row['added']).' '.my_datee($timeformat$row['added']);
            
$show_latesttorrent_contents '<table><tr>'.($row['t_image'] ? '<td rowspan=2><img src='.htmlspecialchars_uni($row['t_image']).' border=0 height=150 width=150 /></td>' '').'<td class=none valign=top><b>'.$lang->index['name'].':</b> '.$javascriptname.'<br /><b>'.$lang->index['size'].':</b> '.mksize($row['size']).'<br /><b>'.$lang->index['uploaddat'].':</b> '.$added.'<br /><b>'.$lang->index['seeders'].':</b>     '.ts_nf($row['seeders']).'<br /><b>'.$lang->index['leechers'].':</b> '.ts_nf($row['leechers']).'<br />'.cutename(quick_replace_tags($row['descr']), 170).'</tr></td></table>';
            




$torrents .='


    <tr><td align="left">'
;
$torrents .= $_title_bracket.' <a href="'.$seolink.'" onmouseover="ddrivetip(\''.$show_latesttorrent_contents.'\', 500)" onmouseout="hideddrivetip()">'.cutename($row['name'], 30).'</a>';        
$torrents .='</td>';            
$torrents .='<td align="center">'.$torrent_download_link.'</td>';
$torrents .='<td align="center">'.$torrent_files.'</td>';
$torrents .='<td align="center">'.$torrent_comments.'</td>';
$torrents .='<td align="center">'.ts_nf($row['seeders']).'</td>';
$torrents .='<td align="center">'.ts_nf($row['leechers']).'</td>';

$torrents .='<td align="center">'.mksize($row['size']).'</td>';
$torrents .='<td align="center">'.$torrent_snatched.'</td>';
        }
        
$torrents .= '    </tr></table>


        </div><!-- end torrents -->'
;
        
//cache_save2('torrents', $torrents);
    
}
//}
// END Plugin: torrents
?>
Click image for larger version

Name:	Capture-3.jpg
Views:	919
Size:	207.8 KB
ID:	2963
Reply With Quote
The Following 8 Users Say Thank You to DARCK For This Useful Post:
Darkness (4th December 2011), FENIX (24th November 2014), Marco (23rd July 2011), PAX (25th December 2011), TheJoker (9th November 2012), themisd (4th September 2011), tibor82 (28th November 2013), Titya (24th December 2011)
  #2  
Old 27th June 2011, 02:38
lafouine022 lafouine022 is offline
Senior Member
 
Join Date: Feb 2010
P2P
Posts: 120
Smile
good d'job
Reply With Quote
  #3  
Old 25th July 2011, 22:09
DOPE's Avatar
DOPE DOPE is offline
Senior Member
 
Join Date: Jul 2011
United States
Posts: 32
Default
What is this exactly?
A better description would help...
Reply With Quote
  #4  
Old 28th July 2011, 05:25
Edgein's Avatar
Edgein Edgein is offline
Senior Member
 
Join Date: Sep 2008
Netherlands
Posts: 154
Default
Quote:
Originally Posted by DOPE View Post
What is this exactly?
A better description would help...
same as the torrenttable but this one in in the homepage
Reply With Quote
  #5  
Old 29th July 2011, 22:40
DOPE's Avatar
DOPE DOPE is offline
Senior Member
 
Join Date: Jul 2011
United States
Posts: 32
Default
After I add torrents.php
How do I add it in Tracker Settings?

Bump: I'm guessing this is for 5.4.1?
This doesnt work on 5.6.
Reply With Quote
  #6  
Old 24th December 2011, 11:00
dragon38 dragon38 is offline
Member
 
Join Date: Oct 2009
France
Posts: 13
Smile image category
hello pictures category may be added beside the name thank you
Reply With Quote
  #7  
Old 19th October 2012, 07:31
private private is offline
Member
 
Join Date: Sep 2012
P2P
Posts: 2
Default this is possible for TS 5.4.1
hi, i was looking for a mod like this but I have no luck. hope you can advise me how to make this one work on TS 5.4.1 please i will very happy :D

best regards
Reply With Quote
  #8  
Old 13th November 2013, 11:15
Marco Marco is offline
Senior Member
 
Join Date: Jun 2009
Seychelles
Posts: 327
Default questions:D


Please tell me why this mod working on lateam default theme and in my theme don't.

and please tell me how can i define the default categories for xxx?

thanks a lot ; look really nice

bump i believe i post in the wrong section :/ sorry

Click the image to open in full size. this is i am interested ...
thanks again
Reply With Quote
  #9  
Old 28th November 2013, 16:29
tibor82 tibor82 is offline
Member
 
Join Date: Feb 2012
P2P
Posts: 12
Default Thankyou
Thankyou!
Reply With Quote
Reply

Tags
list , plugin , torrent

Thread Tools

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 18:36. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.