Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > Gazelle
Reply
  #1  
Old 21st February 2015, 20:22
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default 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.

Click the image to open in full size.

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 '<img src="http://'.$_SERVER['SERVER_NAME'].'/static/image/cat/' . $CategoryIcons[$id] . '" width="' . $w . '" height="' . $h . '">';

}

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 = ('<div class="new_box">');
    $VAR .= ('<div class="new_head"><strong>' . $title . '</strong></div>');
    $VAR .= ("<table><tr><th>Type</th><th>Name</th><th>Added</th><th><div align='center'><img src='https://s.iptorrents.com/pic/seeders.png' width='20' height='20' align='absmiddle'></div></th><th><div align='center'><img src='https://s.iptorrents.com/pic/leechers.png' width='20' height='20' align='absmiddle'></div></th></tr>");
    while ($row = $DB -> next_record()) {

        $VAR .= ("<tr><td height='40' width='40'>" . cat_switch($row["CategoryID"], 40, 40) . "</td><td><a href='/torrents.php?id=" . $row["ID"] . "' target='_blank'>" . $row["Name"] . "</a></td><td> " . $row["3"] . "</td><td> " . $row["Leechers"] . "</td><td> " . $row["Seeders"] . "</td></tr>");

    }
    $VAR .= ("</table>");
    $VAR .= ('</div>');

    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!
__________________




Please Support Majority Report


You can contact me on Skype live:phesadent.elect but please let me know first.


If you are ever need me desperately then please email me at dan.oak44@gmail.com and I will contact u within a week.


Due to free time I'm able to help interested member's with their tracker.

Please Note!
Depending on your requests I will charge you for my assistance for Tracker installs and mods.
All my mods are custom and prices will very depending on the request.
I'm able to install any tracker and mods including themes.

Please PM me


Last edited by firefly007; 22nd February 2015 at 11:52.
Reply With Quote
The Following User Says Thank You to firefly007 For This Useful Post:
rfadown (22nd February 2015)
  #2  
Old 25th February 2015, 15:40
Reitak Reitak is offline
Senior Member
 
Join Date: Feb 2015
Posts: 25
Default
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)

Reply With Quote
Reply

Tags
index , ten , top

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