Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Gazelle (http://www.bvlist.com/forumdisplay.php?f=40)
-   -   Top Ten on index (http://www.bvlist.com/showthread.php?t=10274)

firefly007 21st February 2015 20:22

Top Ten on index
 
Hi, So like I said I will start making a few mods for Gazelle.

Ok so to keep it simple Ive created a single function file where most of my code will be added now and in the future, you are welcome to move it where you like. The reason why I've done it like this is 1) It makes it very easy for installation and save a lot of time and hair pulling explaining where and how it must be added.

http://gfxpeers.net/Untitled-1.jpg

So here go's..

1)

Ok first create a file called firefly_functions.php in /classes/ and copy this in.

Please note!
depending on where your cat icons are you will need to edit /static/image/cat/ in cat_switch() function and point it to where your cat icons are.

Code:




function cat_switch($id, $w, $h) {

    global $CategoryIcons;

    return '';

}

function top_index($catid, $limit, $title) {

    global $DB;

    $DB -> query("SELECT tg.ID, tg.CategoryID, tg.Name, tg.Time,
                        t.GroupID, t.Size, t.Leechers, t.Seeders
                    FROM `torrents_group` AS tg INNER JOIN `torrents` AS t
                    ON tg.ID = t.GroupID
                    WHERE tg.CategoryID = $catid
                    ORDER BY tg.Time DESC LIMIT $limit");
    $VAR = ('
');
    $VAR .= ('
' . $title . '
');
    $VAR .= ("");
    while ($row = $DB -> next_record()) {

        $VAR .= ("");

    }
    $VAR .= ("
TypeNameAdded
" . cat_switch($row["CategoryID"], 40, 40) . "" . $row["Name"] . " " . $row["3"] . " " . $row["Leechers"] . " " . $row["Seeders"] . "
");
    $VAR .= ('
');

    return $VAR;

}

Take Note!!

In my config.php my categories are as follows..

Quote:


$Categories = array('Music',
'Applications',
'E-Books',
'Audiobooks',
'E-Learning Videos',
'Movies|HD',
'TV|SD',
'TV|SD_x264',
'TV|HD_x264',
'GAME|PC',
'Movies|DVD',
'Movies|XVID',
'AUDIO|MP3',
'Comedy',
'Comics');

$CategoryIcons = array('music.png',
'apps.png',
'elearning.png',
'audiobook.png',
'elearning.png',
'movieshd.png',
'TV-XviD.png',
'tv264.gif',
'tv_x246_hd.png',
'cat_games_pciso.gif',
'cat_movies_dvdr.gif',
'cat_movies_xvid.gif',
'cat_music_music.gif',
'TV-XviD.png',
'cat_anime.gif'
);

2)

Open/Edit script_start.php and add

Code:

require(SERVER_ROOT.'/classes/firefly_functions.php');
Under

Code:


require(SERVER_ROOT.'/classes/class_paranoia.php'); //Require the paranoia check_paranoia function

3)

Edit:

Code:

/sections/index/private.php
and add

Code:

print top_index(7,10,"Topten Tv Series");
Where ever you like but I added it after.

Code:


    if (++$Count > 4) {
        break;
    }
}
?>

4)

This is what you need to input.

Code:

top_index(7,10,"Topten Tv Series")
is as follows top_index({cat id},{amount of returned},{Name of cat});

5) Now add some CSS /static/styles/{Theme name} and add.

Code:


.new_box{

    margin: 0 auto;
    border-radius: 0px 0px 7px 7px;
  -moz-border-radius: 0px 0px 7px 7px;
  -webkit-border-radius: 0px 0px 7px 7px;
    margin-bottom: 20px;
    background-color: #101010;
    line-height: 300%;
   
}

.new_head{
    background-color: #1a1a1a!important;
    font-weight: bold;
    height: 37px;
    text-indent: 8px;
}

If you have any problems, please let me know.. Good luck!

Reitak 25th February 2015 15:40

thanks for this, maybe i will try it. :)
It would be nice if you can help with this, on torrent page where are names of torrent, under where are tags add who post torrent (name) and in what category

Godzilla (2014)
Posted by Reitak (clickable name -> profil) in Movies (clickable category)

:drink:


All times are GMT +2. The time now is 01:22.

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