Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   Sticky torrents (http://www.bvlist.com/showthread.php?t=7097)

djlive 14th October 2011 14:17

Sticky torrents
 
I need the "stichy torrents" for tbdev 2008 if someone can help me thx:drink:

bestlap 23rd January 2013 10:33

Yes... and I need a recomended torrent in browse.php on tbdev 08 please help.
thanks :gum:

Chez 26th February 2013 18:40

1 Attachment(s)
Sticky Torrent Mod, credits to Alex2005

Add this to your database

PHP Code:

ALTER TABLE torrents ADD `stickyenum('yes','no'NOT NULL default 'no'

open Browse.php and fine

PHP Code:

$orderby "ORDER BY torrents.id DESC"

and change it to

PHP Code:

$orderby "ORDER BY torrents.sticky ASC, torrents.id DESC"

still in browse look for the big query

PHP Code:

$query "SELECT torrents.id, torrents.category, torrents.leechers, torrents.seeders... 

and add this to it

PHP Code:

torrents.sticky 

now open Edit.php and fine this

PHP Code:

tr("TYPE"$s1); 

and add this under it

PHP Code:

if(get_user_class() > UC_MODERATOR)
           
tr("sticky""<input type='checkbox' name='sticky'" . (($row["sticky"] == "yes") ? " checked='checked'" "" ) . " value='yes' />Set sticky this torrent!"1); 

open takeedit.php and fine

PHP Code:

$updateset[] = "category = " . ($type); 

and add this underneath

PHP Code:

if(get_user_class() > UC_MODERATOR){
if (
$_POST["sticky"] == "yes")
          
$updateset[] = "sticky = 'yes'";
   else
          
$updateset[] = "sticky = 'no'";


now open bittorrent.php and fine this

PHP Code:

$dispname htmlspecialchars($row["name"]); 

and add this underneath

PHP Code:

$sticky = ($row[sticky]=="yes" "<img src='pic/sticky.gif' bored='0' alt='sticky'>" ""); 

this is only an example so don't copy this next part

and then add where you want it to be shown (the $sticky) in bittorrent.php (remember this is only an example)

PHP Code:

if (sql_timestamp_to_unix_timestamp($row['added']) >= $last_browse)
                echo 
"\" title=\"" $dispname "\"><b>" $dispname "</b></a><img src='/pic/new.gif' border='0' alt=NEW>".$sticky."<b>" $description "</b>\n";
                else
                echo 
"\" title=\"" $dispname ."\"><b>" $dispname "</b></a>".$sticky."<b>" $description "</b>\n"

then add sticky.gif to your pic folder, sticky.gif attached below


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

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