Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
[MOD]Sticky Torrent
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2010-11-13 14:41:03
[size=12px][font='Arial Black']I ported this from tbdev by Tony![/font][/size]

ALTER TABLE torrents ADD `sticky` enum('0','1') NOT NULL default '0';
On torrent search.php and torrent.php find the big query and add:




torrents.sticky





and look something like this:





$query = "SELECT torrents.name, torrents.seeder, torrents.sticky....





Also on torrents-search.php and torrents.php



find:





$orderby = "ORDER BY  " . $column . " " . $ascdesc;





and replace with:





$orderby = "ORDER BY torrents.sticky desc, " . $column . " " . $ascdesc;







On torrents-edit



find:



 

  if ($CURUSER["edit_torrents"] == "yes")

$updateset[] = "freeleech = '".$_POST["freeleech"]."'";





add below:



 

 if ($CURUSER["edit_torrents"] == "yes")

$updateset[] = "sticky = '".$_POST["sticky"]."'";





find:





if ($row["external"] != "yes" && $CURUSER["edit_torrents"] == "yes"){

echo "<tr><td align=right><B>".FREE_LEECH.": </b></TD><TD><input type=\"checkbox\" name=\"freeleech\"" . (($row["freeleech"] == "1") ? " checked=\"checked\"" : "" ) . " value=\"1\" />".FREE_LEECH_MSG."<br>";

}





add below:





if ($CURUSER["edit_torrents"] == "yes")

echo "<tr><td align=right><B>".Sticky.": </b></TD><TD><input type=\"checkbox\" name=\"sticky\"" . (($row["sticky"] == "1") ? " checked=\"checked\"" : "" ) . " value=\"1\" />Sticky torrent<br>";





On funtions.php



find:





$smallname = htmlspecialchars(CutName($row["name"], $char1));





Add below



$sticky = ($row[sticky]=="1" ? "<img src='images/sticky.gif' bored='0' alt='sticky'>" : "");





Now you have to add the image wherever you want.



For example add $sticky on(dont copy this!!):





print("<td class=ttable_col$x nowrap><a href=\"torrents-details.php?id=$id&hit=1\" onmouseover=\" return overlib('<img  class=glossy src=$balon width=200 border=0>', CENTER);\" onmouseout=\"return nd();\">$sticky $dispname $checked</a><br>$descrs");



:huh:

Upload the image on images as sticky.gif



screen.jpg
screen.jpg
4.jpg
4.jpg
Unknown User
2010-11-13 14:52:44
thank you! Works!!
Unknown User
2010-11-13 18:43:01
ALTER TABLE torrents ADD `sticky` enum('1','2') NOT NULL default 'no';


this is incorrect and shouldnt even of worked for u.... enum is like a list and the default must be defined by the enum so i would just do it like freeleech

ALTER TABLE torrents ADD `sticky` enum('0','1') NOT NULL default '0';
Unknown User
2010-11-13 18:45:03
screen please :huh:
Unknown User
2010-11-13 18:49:46
also there is nothing to turn sticky off for torrents...
Unknown User
2010-11-13 19:06:58
this has already been made
Unknown User
2010-11-13 19:40:02
@djhowarth Just edit the torrent and turn it off .. @thedarklord i didn't find anything about stiky torrent..
Unknown User
2010-11-13 19:41:48
"GodLike, post: 67413":
@djhowarth Just edit the torrent and turn it off .. @thedarklord i didn't find anything about stiky torrent..

[url="http://www.torrenttrader.org/index.php?showtopic=7428&hl=sticky"]http://www.torrenttrader.org/index.php?sho...8&hl=sticky[/url]
Unknown User
2010-11-13 19:44:08
"thedarklord, post: 67414":
[url="http://www.torrenttrader.org/index.php?showtopic=7428&hl=sticky"]http://www.torrenttrader.org/index.php?sho...8&hl=sticky[/url]

Yes but this i think,this is only for prenium users
Unknown User
2010-11-13 19:53:04
"GodLike, post: 67415":
Yes but this i think,this is only for prenium users
argh so it is my bad lol
Unknown User
2010-11-13 20:29:28
Screens added!
Unknown User
2010-11-13 20:31:12
ALTER TABLE torrents ADD `sticky` enum('1','2') NOT NULL default '0';


Still wrong...
Unknown User
2010-11-13 20:37:57
Yes DJ my fault!! Now it is correct!

[updated firtst post]
Unknown User
2010-11-14 10:40:45
Quote:
$sticky = ($row[sticky]=="1" ? "<img src='images/sticky.gif' bored='0' alt='sticky'>" : "");

replace bored with border

Where exactly to insert image? And option not on torrent upload page?
Unknown User
2010-11-14 13:57:04
There isn't an option on torrent upload page only on edit!

Could you post your code to tell you how to instert the image(functions.php)
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728