|
#1
|
||||
|
||||
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. 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; } In my config.php my categories are as follows.. Quote:
Open/Edit script_start.php and add Code:
require(SERVER_ROOT.'/classes/firefly_functions.php'); Code:
require(SERVER_ROOT.'/classes/class_paranoia.php'); //Require the paranoia check_paranoia function Edit: Code:
/sections/index/private.php Code:
print top_index(7,10,"Topten Tv Series"); Code:
<? if (++$Count > 4) { break; } } ?> This is what you need to input. Code:
top_index(7,10,"Topten Tv Series") 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; }
__________________
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. |
The Following User Says Thank You to firefly007 For This Useful Post: | ||
rfadown (22nd February 2015)
|
#2
|
|||
|
|||
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) |
Tags |
index , ten , top |
|
|