[size=12px][font='Arial Black']I ported this from tbdev by Tony![/font][/size]
:huh:
Upload the image on images as sticky.gif

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

