Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=117)
-   -   Add seedbox ip (http://www.bvlist.com/showthread.php?t=6336)

lafouine022 24th April 2011 04:14

Add seedbox ip
 
1 Attachment(s)
1 Download an attached file.
2 insert that goes in phpmyadmin (look sqlseeedbox.txt)
3 upload new Files
4 Go in your staff panel and add new tool ( tool name= Addseedbox.ip )
5 and add your Ip Seedbox in the new tool

6 Open your browse.php

and search and remplace this

PHP Code:

$torrent_comments = ($torrents['comments']  > '<a href="'.$BASEURL.'/details.php?id='.$torrents ['id'].'&tab=comments">' '').'<b>'.ts_nf($torrents ['comments']).'</b>'.($torrents['comments'] > '</a>' ''); 

by this

PHP Code:

$torrent_comments = ($torrents['comments']  > '<a href="'.$BASEURL.'/details.php?id='.$torrents ['id'].'&tab=comments">' '').'<b>'.ts_nf($torrents ['comments']).'</b>'.($torrents['comments'] > '</a>' '');

        
    
$q sql_query("SELECT p.ip, s.seedboxip FROM peers p LEFT JOIN seedbox s ON (p.ip=s.seedboxip) WHERE torrent = ".$torrents['id'] );
    while(
$c=mysql_fetch_assoc($q))


    if (
$c['ip'] == $c['seedboxip'])
    {
        
$speed3 '<img src="'.$BASEURL.'/'.$pic_base_url.'webseede.png.gif" class="inlineimg" alt="" title="Torrent Highspeed " />';
        }
        else    
        {   
        
$speed3 ' ';    
    } 

and even that:

PHP Code:

$name_torrent '<a href="#" id="torrentmenu'.$torrents['id'].'" /><b>'.(!empty($keywords) ? highlight(htmlspecialchars_uni($keywords), $torrents['name']) : $torrents['name']).'</b></a> '.$isnew.' '.$issticky.' '.$isfree.' '.$issilver.' '.$isdoubleupload.' '.$isrequest.' '.$isnuked.' <span id="isexternal_'.$torrents['id'].'">'.$isexternal.'</span>'

by this:

PHP Code:

$name_torrent '<a href="#" id="torrentmenu'.$torrents['id'].'" /><b>'.(!empty($keywords) ? highlight(htmlspecialchars_uni($keywords), $torrents['name']) : $torrents['name']).'</b></a> '.$isnew.' '.$issticky.' '.$isfree.' '.$speed3.' '.$issilver.' '.$isdoubleupload.' '.$isrequest.' '.$isnuked.' <span id="isexternal_'.$torrents['id'].'">'.$isexternal.'</span>'

enjoy my rabbit! :bubble:

DARCK 24th April 2011 08:58

good
 
2 Attachment(s)
very good job :drink:
the result i thank you Lafouine
Attachment 2854

Bump: create include/plugins/seedbox.php
PHP Code:

<?php
/*
+--------------------------------------------------------------------------
|   TS Special Edition v..
|   ========================================
|   by xam
|   (c) 2005 - 2008 Template Shares Services
|   http://templateshares.net
|   ========================================
|   by lateam
|   
|   
|   
+---------------------------------------------------------------------------
*/
// Dont change for future reference.
define('TS_P_VERSION''1.2 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>");
}

$QueryF = @sql_query ('' 'SELECT COUNT(*) FROM seedbox  ') OR sqlerr (__FILE__532);
  
$message mysql_fetch_row ($QueryF);
  
$unreadmail $message[0];



$sql mysql_query ("SELECT seedbox.* FROM seedbox WHERE seedboxip= 'seedboxip' " )  or die ("Erreur requete recettes : ".mysql_error());
$query ="SELECT Count( * ) AS ip  FROM `peers`";
$result mysql_query($query);
$resultat mysql_fetch_row($result);

 
$seedbox .= $unreadmail
;



 
$QueryF = @sql_query ('' 'SELECT COUNT(*) FROM peers  ') OR sqlerr (__FILE__532);
  
$message mysql_fetch_row ($QueryF);
  
$unreadmails $message[0];



$sql mysql_query ("SELECT peers.* FROM peers WHERE ip = ''" )  or die ("Erreur requete recettes : ".mysql_error());
$query ="SELECT Count( * ) AS seedboxip FROM `peers`";
$result mysql_query($query);
$resultat mysql_fetch_row($result);


 
$seedbox .= $unreadmails;


  
$seedbox '<table border="0" width="100%" height="100">











   <tr>
stats seedbox

<td width="276" height="1"><strong><img border="0" src="'
.$BASEURL.'/pic/seede.png.gif" width="50" height="30"><a href="'.$BASEURL.'/admin/index.php?act=Addseedbox.ip">nombre de seedbox :</a></strong><a href="'.$BASEURL.'/admin/index.php?act=Addseedbox.ip">('.$unreadmail.')</a></td>
<td width="276" height="1"><strong><img border="0" src="'
.$BASEURL.'/pic/seede.png.gif" width="50" height="30"><a href="'.$BASEURL.'/admin/index.php?act=Addseedbox.ip">nombre de torrent en seedbox :</a></strong><a href="'.$BASEURL.'/admin/index.php?act=Addseedbox.ip">('.$unreadmails.')</a></td>
  </tr>




</table>'
;



















?>

Attachment 2856

lafouine022 24th April 2011 23:13

total speed
 
oki new add

remplace

PHP Code:

if ($c['ip'] == $c['seedboxip'])
    {
        
$speed3 '<img src="'.$BASEURL.'/'.$pic_base_url.'webseede.png.gif" class="inlineimg" alt="" title="Torrent Highspeed " />';
        }
        else    
        {   
        
$speed3 ' ';    
    } 

by

PHP Code:

if ($c['ip'] == $c['seedboxip'])
    {
        
$speed3 '<img src="'.$BASEURL.'/'.$pic_base_url.'webseede.png.gif" class="inlineimg" alt="" title="Torrent Highspeed " />';
        }
        else    
        {   
        
$speed3 ' ';    
    }

$arfff mksize($torrents['totalspeed']); 
if (
$torrents['totalspeed'] >45800 ) {

        
$speed2 '<img src="'.$BASEURL.'/'.$pic_base_url.'webseede.png.gif" width="20" height="20" class="inlineimg" alt="" title="Ce torrent a présentement une vitesse de '.$arfff.'" />';
        }     
        else
        {   
        
$speed2 ' ';   
    } 

and this

PHP Code:

$name_torrent '<a href="#" id="torrentmenu'.$torrents['id'].'" /><b>'.(!empty($keywords) ? highlight(htmlspecialchars_uni($keywords), $torrents['name']) : $torrents['name']).'</b></a> '.$isnew.' '.$issticky.' '.$isfree.' '.$speed3.' '.$issilver.' '.$isdoubleupload.' '.$isrequest.' '.$isnuked.' <span id="isexternal_'.$torrents['id'].'">'.$isexternal.'</span>'

by this

PHP Code:

$name_torrent '<a href="#" id="torrentmenu'.$torrents['id'].'" /><b>'.(!empty($keywords) ? highlight(htmlspecialchars_uni($keywords), $torrents['name']) : $torrents['name']).'</b></a> '.$isnew.' '.$issticky.' '.$isfree.' '.$speed2.' '.$speed3.' '.$issilver.' '.$isdoubleupload.' '.$isrequest.' '.$isnuked.' <span id="isexternal_'.$torrents['id'].'">'.$isexternal.'</span>'

:nosepick:

nikosuk 25th April 2011 08:45

hi,
nice plugin

only one problem

when using the plugin, it calculates the number of seedboxes correctly but it does wrong calculation on the number of seedbox torrents.. for some reason it displays ALL peers, not oly seedbox peers
Thank you for the mod, and thank you in advance for the fix :)

lafouine022 26th April 2011 01:58

Fix for pluging
 
yes there is a problem in queries

I give you the correct file.

PHP Code:

<?php

define
('TS_P_VERSION''1.2 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>");
}

$query sql_query ("SELECT COUNT(seedboxip) as total_seedboxip FROM seedbox");
    
$total_seedboxip mysql_result($query0'total_seedboxip');
    

    
$query sql_query ("SELECT COUNT(p.ip) as total_box FROM peers p LEFT JOIN seedbox s ON (p.ip=s.seedboxip) WHERE p.ip=s.seedboxip");
    
$total_box mysql_result($query0'total_box');


  
$seedbox '
<table border="0" width="100%" height="100">
  <tr>
   <td class=subheader>Stats seedbox</td><td class=subheader></td>
  </tr>
   

  <tr>
   <td><img border="0" src="'
.$BASEURL.'/'.$pic_base_url.'webseede.png.gif" width="50" height="30"><a href="'.$BASEURL.'/admin/index.php?act=Addseedbox.ip">nombre de seedbox :</a> <a href="'.$BASEURL.'/admin/index.php?act=Addseedbox.ip">('.$total_seedboxip.')</a></td>
   <td><img border="0" src="'
.$BASEURL.'/'.$pic_base_url.'webseede.png.gif" width="50" height="30"><a href="'.$BASEURL.'/admin/index.php?act=Addseedbox.ip">nombre de torrent en seedbox :</a> <a href="'.$BASEURL.'/admin/index.php?act=Addseedbox.ip">('.$total_box.')</a></td>
  </tr>



</table>'
;


?>

is shorter compared to the version of Darck ^ ^

nikosuk 26th April 2011 07:25

thank you very much..!!

it works flawlessly now
:drink:

excellent

smoky28 26th April 2011 19:38

Hi I have this little problem was the lack of code to open it because it is not a torrent but a fitted sheet, and so I have to go perfectly.:ok::ok::ok:
'.($UseQuickMenu ? '#' : $seolink2).'

PHP Code:

$name_torrent '<a href="'.($UseQuickMenu '#' $seolink2).'" id="torrentmenu'.$torrents['id'].'" /><b>'.(!empty($keywords) ? highlight(htmlspecialchars_uni($keywords), $torrents['name']) : $torrents['name']).'</b></a> '.$isnew.' '.$issticky.' '.$isfree.' '.$speed2.' '.$speed3.' '.$issilver.' '.$isdoubleupload.' '.$isrequest.' '.$isnuked.' <span id="isexternal_'.$torrents['id'].'">'.$isexternal.'</span>'


WhyMe 25th September 2014 13:34

would someone recode this with the proper code and no ip show too on pages just the pic of seedbox please


All times are GMT +2. The time now is 19:11.

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