Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Mods & Themes (http://www.bvlist.com/forumdisplay.php?f=113)
-   -   [FTS 1.1] Make last torrents on index Scrolling (http://www.bvlist.com/showthread.php?t=4069)

Edgein 27th December 2009 22:09

[FTS 1.1] Make last torrents on index Scrolling
 
Request off Yoligim

Find in Include/factory.php

PHP Code:

    public function lastxtorrentsshow() {

        global 
$showlastxtorrents;
if (
$showlastxtorrents == "yes") {
//Start of Last X torrents mod
global $howmuchtorrents,$thowshow;

    echo
'<BR>';
    
collapses('lasttorrents',"<b>Last $howmuchtorrents Torrent Uploads</b>");
    if(
$thowshow == 'text') {
$sql "SELECT * FROM torrents where visible='yes' ORDER BY added DESC LIMIT $howmuchtorrents";
$result sql_query($sql) or die('No torrents found');
if( 
mysql_num_rows($result) != )
{


print
'<table width=100% border=1 cellspacing=0 cellpadding=5>';
print
'<tr class=thead>';
print
"<td class=subheader><center><b>Name</b></center></td>";
print
'<td class=subheader><center><b>Seeder</b></center></td>';
print
'<td class=subheader><center><b>Leecher</b></center></td>';
print
'</tr>';

while( 
$row mysql_fetch_assoc($result) )
{
    if(
get_user_class() >= $arr["minclassread"]):
print
'<tr>';
print
'<a href="details.php?id=' $row['id'] . '&hit=1"><td><a href="details.php?id=' $row['id'] . '&hit=1"><b>' $row['name'] . '</b></td></a>';
print
'<td align=left>&nbsp;&nbsp;&nbsp;&nbsp;' $row['seeders'] . '</td>';
print
'<td align=left>&nbsp;&nbsp;&nbsp;&nbsp;' $row['leechers'] . '</td>';

print
'</tr>';
endif;
}
print
'</table>';
}else echo
'No torrents to show'; }
elseif(
$thowshow == 'withimg') {
    
$sql "SELECT * FROM torrents where visible='yes' AND imageurl != '' ORDER BY added DESC LIMIT $howmuchtorrents";
    
$result sql_query($sql) or die('No torrents found');
if( 
mysql_num_rows($result) != )
{
    
$i_count $i_done 0;
        echo 
'<table width=100%>
<tr>'
;
while( 
$t mysql_fetch_assoc($result) ) {

    if (
$i_count && $i_count == 0)
                    {
                        echo 
'
                        </tr>
                        <tr>'
;
                    }
echo <<<eo
                        <td align="center" class="tcat">
                            <a href="
$BASEURL/details.php?id=$t[id]"><img src="$t[imageurl]" width="125" height="125" alt="$t[name]" title="$t[name]"/></a>
                        </td>

eo;
$i_count++;
}
echo 
'</tr>';
print 
'</table>';
}else echo
'No torrents to show';
}
collapsee();
}
//End of Last X torrents mod 


And replace with

PHP Code:

    public function lastxtorrentsshow() {

        global $showlastxtorrents;
if ($showlastxtorrents == "yes") {
//Start of Last X torrents mod
global $howmuchtorrents,$thowshow;

    echo'<BR>';
    collapses('lasttorrents',"<b>Last $howmuchtorrents Torrent Uploads</b>");
    if($thowshow == 'text') {
$sql = "SELECT * FROM torrents where visible='yes' ORDER BY added DESC LIMIT $howmuchtorrents";
$result = sql_query($sql) or die('No torrents found');
if( mysql_num_rows($result) != 0 )
{


print'<table width=100% border=1 cellspacing=0 cellpadding=5>';
print'<tr class=thead>';
print"<td class=subheader><center><b>Name</b></center></td>";
print'<td class=subheader><center><b>Seeder</b></center></td>';
print'<td class=subheader><center><b>Leecher</b></center></td>';
print'</tr>';

while( $row = mysql_fetch_assoc($result) )
{
    if(get_user_class() >= $arr["minclassread"]):
print'<tr>';
print'<a href="details.php?id=' . $row['id'] . '&hit=1"><td><a href="details.php?id=' . $row['id'] . '&hit=1"><b>' . $row['name'] . '</b></td></a>';
print'<td align=left>&nbsp;&nbsp;&nbsp;&nbsp;' . $row['seeders'] . '</td>';
print'<td align=left>&nbsp;&nbsp;&nbsp;&nbsp;' . $row['leechers'] . '</td>';

print'</tr>';
endif;
}
print'</table>';
}else echo'No torrents to show'; }
elseif($thowshow == 'withimgscroll') {
//Start of Last X torrents with poster mod
$query="SELECT * FROM torrents where visible='yes' ORDER BY added DESC LIMIT $howmuchtorrents";
$result=mysql_query($query);
$num = mysql_num_rows($result); // count rows
?>

<table width="100%" align="center" class="bottom" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td class="embedded">
            <table width="100%" align="center" class="bottom" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td class="embedded">
                        <table border="0" cellpadding="5" width="100%">
                            <tr>
                                <td>
                                    <marquee scrollAmount="3" onMouseover="this.scrollAmount=0" onMouseout="this.scrollAmount=3" scrolldelay="0" direction="left">
                                        <?php
                                        
                                        
while ($row mysql_fetch_assoc($result))
                                        {
                                            if(
$row['imageurl'] != ""){
                                                
$id $row['id'];
                                                
$name $row['name'];
                                                
$poster $row['imageurl'];
                                                
$name str_replace('_'' ' $name);
                                                
$name str_replace('.'' ' $name);
                                                
$name substr($name050);
                                                echo 
"<a href=\"$BASEURL/details.php?id=$id\" title=\"$name\"><img src=".$row["imageurl"]." width=\"100\" height=\"142\" title=\"$name\" border=\"0\" /></a>";
                                                
                                            }
                                        }
                                        
//End of the mod
                                        
?>
                                    </marquee>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
<? 

print("<br/>");
}
collapsee();
}
//End of Last X torrents mod

Then find in administrator/options.php

PHP Code:

    tr"Show Last x Torrents options"makehelp('L13').select('lastxto',array('yes' => 'Show','no' => 'Hide'),_value('lastxto'))."How many torrents to show: <input type='text' size='10' name=howmuchtorrents value='" . (_value('howmuchtorrents') ?
        
_value('howmuchtorrents') : $sh) .
        
"'>"." Show: ".select('thowshow',array("text" => "As text","withimg" => "With Image"),_value('thowshow')), ) ; 

and replace with

PHP Code:

    tr"Show Last x Torrents options"makehelp('L13').select('lastxto',array('yes' => 'Show','no' => 'Hide'),_value('lastxto'))."How many torrents to show: <input type='text' size='10' name=howmuchtorrents value='" . (_value('howmuchtorrents') ?
        
_value('howmuchtorrents') : $sh) .
        
"'>"." Show: ".select('thowshow',array("text" => "As text","withimgscroll" => "With Scrolling Image"),_value('thowshow')), ) ; 

here you go m8

:drink:

greetzz Edgein

yoligim 28th December 2009 01:04

Awesome Edgein, thank you very much, Happy New Year:-)

Runny 27th January 2010 16:25

Just installed this on the 1.1 Bugfixed version. Works great. Thx.

OverNight 26th February 2010 03:51

That's what I'm searching for, is possible to edit it for to use with xbtit?

Thanks

Edgein 1st March 2010 11:21

I think it is
but I have no experience with xbtit
ask again in the xbtit forum

sorry m8 i cant help you

grtzz Edgein


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

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