Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=117)
-   -   plugin list torrent (http://www.bvlist.com/showthread.php?t=6639)

DARCK 26th June 2011 19:25

plugin list torrent
 
1 Attachment(s)
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'].'&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.'<b>'.$lang->index['size'].':</b> '.mksize($row['size']).'<b>'.$lang->index['uploaddat'].':</b> '.$added.'<b>'.$lang->index['seeders'].':</b>     '.ts_nf($row['seeders']).'<b>'.$lang->index['leechers'].':</b> '.ts_nf($row['leechers']).''.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
?>

Attachment 2963

lafouine022 27th June 2011 02:38

good d'job

DOPE 25th July 2011 22:09

What is this exactly?
A better description would help...

Edgein 28th July 2011 05:25

Quote:

Originally Posted by DOPE (Post 29247)
What is this exactly?
A better description would help...

same as the torrenttable but this one in in the homepage

DOPE 29th July 2011 22:40

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.

dragon38 24th December 2011 11:00

image category
 
hello pictures category may be added beside the name thank you

private 19th October 2012 07:31

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

Marco 13th November 2013 11:15

questions:D
 
:muscle:

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 :drink:

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

http://i.imgur.com/4gUVbCl.png this is i am interested ...
thanks again

tibor82 28th November 2013 16:29

Thankyou
 
Thankyou!


All times are GMT +2. The time now is 14:17.

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