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
User Posts

Go to Profile

add

if (!$site_config["MEMBERSONLY"] || $CURUSER) {



after

<?





add

}



after

end_block();
[MOD] Thanks — 2008-11-27 20:29:59 in v2 Only Mods Complete
don't you know what is SQL ?
do you mean your name is still in useronlineblok after you log out ?

change time

$expire = 600; // time in seconds

mean refresh all  10 minutes

change for 300 for 5 minutes.......

You have to be carefull with lags :D
thanks nice one
Taken from [url="http://www.torrenttrader.org/index.php?showtopic=7687&hl=bookmark&st=0"]here[/url]

So Credit to all who worked on it

I just clean it for v2.05

SQL

CREATE TABLE `bookmarks` (

`id` int(10) unsigned NOT NULL auto_increment,

`userid` int(10) unsigned NOT NULL default '0',

`torrentid` int(10) unsigned NOT NULL default '0',

PRIMARY KEY (`id`)

) TYPE=MyISAM AUTO_INCREMENT=13;
account.php

find


<?print("<a href=mailbox.php><b>My Messages</b></a>");?>





add after



&nbsp;|&nbsp;

<?print("<a href=bookmark.php><b>My Bookmarks</b></a>");?>





torrents-details.php

find



print("<b>" . HITS . ": </b>" . $row["hits"] . "\n<br />");





add after



// Bookmarks mod

$bookt = mysql_query("SELECT torrentid FROM bookmarks WHERE torrentid = $row[id] AND userid = $CURUSER[id]");

if (mysql_num_rows($bookt) > 0)

print("<tr><td align=left><b>Bookmark:</b></td><td><font color=red>You already have this torrent <a href='bookmark.php'>bookmarked.</a></font></td></tr><td>&nbsp;</td><td><a href='takedelbookmark.php?bookmarkid=". $row[id] ."'><img src='images/delchat.gif' border='0' width='10px' alt='delete' title='delete' /></a></td></tr>\n");

else

print("<tr><td align=left><b>Bookmark:</b></td><td><a href='bookmarks.php?torrent=$row[id]'>Add this torrent</a> to <a href='bookmark.php'>My Bookmarks</a></td></tr>\n");

  //end bookmarks





function.php

find



mysql_query("DELETE FROM torrents WHERE id = $id");





add after



mysql_query("DELETE FROM bookmarks WHERE torrentid = $id");





find



mysql_query("DELETE FROM ratings WHERE user = $userid");





add after



mysql_query("DELETE FROM bookmarks WHERE userid = $userid");





find



case 'rating':

echo "<td class=ttable_head>".RATINGS."</td>";

break;





add after



case 'bookmark':

if ($variant == "bookmarks")

echo "<td class=ttable_head>Delete</td>";

break;





find



case 'rating':

if (!$row["rating"])

$rating = "--";

else

$rating = "<a title='$row[rating]/5'>".ratingpic($row["rating"])."</a>";

//$rating = ratingpic($row["rating"]);

//$srating .= "$rpic (" . $row["rating"] . " out of 5) " . $row["numratings"] . " users have rated this torrent";

print("<td class=ttable_col$x align=center>$rating</td>");

break;





add after



case 'bookmark':

if ($variant == "bookmarks")

echo "<td class=ttable_col2 align=center><a href='takedelbookmark.php?bookmarkid=$id' title='Delete'><img src='images/delchat.gif' border='0' width='10px' alt='delete' title='delete' /></a></td>";

break;





config.php

find



$site_config["torrenttable_columns"] = "category,name,dl,uploader,comments,size,seeders,leechers,health,external";





change for



$site_config["torrenttable_columns"] = "category,name,dl,uploader,comments,size,seeders,leechers,health,external,boo

kmark";





bookmark.php ==>upload it



<?

require_once("backend/functions.php");

dbconn(false);



if (!isset($_GET[user]))

 $user = $CURUSER[id];

else

 $user = $_GET[user];



$res = mysql_query("SELECT username FROM users WHERE id = $user") or sqlerr();

$arr = mysql_fetch_array($res);



stdhead("Bookmarks for " . $arr[username]);



//print ("<h1>Bookmarks for <a href=userdetails.php?id=$user><b>$arr[username]<b></a></h2>");



$res = mysql_query("SELECT COUNT(id) FROM bookmarks WHERE userid = $user");

$row = mysql_fetch_array($res);

$count = $row[0];



list($pagertop, $pagerbottom, $limit) = pager(25, $count, "bookmarks.php?");



$res = mysql_query("SELECT bookmarks.id as bookmarkid, users.username,users.id as owner, torrents.id, torrents.name, torrents.type, torrents.comments, torrents.leechers, torrents.seeders, ROUND(torrents.ratingsum / torrents.numratings) AS rating, categories.name AS cat_name, categories.image AS cat_pic, torrents.save_as, torrents.numfiles, torrents.added, torrents.filename, torrents.size, torrents.views, torrents.visible, torrents.hits, torrents.times_completed, torrents.category FROM bookmarks LEFT JOIN torrents ON bookmarks.torrentid = torrents.id LEFT JOIN users on torrents.owner = users.id LEFT JOIN categories ON torrents.category = categories.id WHERE bookmarks.userid = $user ORDER BY torrents.id DESC $limit")  or sqlerr();



begin_frame("My Bookmarks");



print($pagertop);

torrenttable($res, "bookmarks", TRUE);

print($pagerbottom);



end_frame();

stdfoot();



?>





bookmarks.php ==> upload it



<?

require_once("backend/functions.php");

dbconn();



$gottorrent = (int)$_GET["torrent"];



if (!isset($gottorrent))

 show_error_msg("Error"," ... No torrent selected",1);



if ((get_row_count("bookmarks", "WHERE userid=$CURUSER[id] AND torrentid = $gottorrent")) > 0)

 show_error_msg("Error","Already bookmarked torrent",1);



if ((get_row_count("torrents", "WHERE id = $gottorrent")) > 0) {

mysql_query("INSERT INTO bookmarks (userid, torrentid) VALUES ($CURUSER[id], $gottorrent)") or die(mysql_error());



stdhead("Bookmarks");

begin_frame ("Successfully");

echo "Torrent bookmarked";

echo "<br /><a href=torrents-details.php?id=$gottorrent>Back To Torrent</a>";

end_frame();

stdfoot();

}

else  show_error_msg("Error","ID not found",1);



?>





takedelbookmark.php ==>upload it



<?

require_once("backend/functions.php");

dbconn(true);

loggedinonly();



$delid = (int)$_GET['bookmarkid'];



$res2 = mysql_query ("SELECT id, userid FROM bookmarks WHERE torrentid = $delid AND userid = $CURUSER[id]") or die();



$arr = mysql_fetch_assoc($res2);

if (!$arr)

show_error_msg("Error!","ID not found in your bookmarks list...",1);



mysql_query ("DELETE FROM bookmarks WHERE torrentid = $delid AND userid = $CURUSER[id]") or die();

header("Refresh: 0;url=".$_SERVER['HTTP_REFERER']);

?>



Upload delchat.gif to your images folder

That's all  :unsure:

Let's go for an update  :D

It correct Dodez code and date

It write the message in shoutbox with 3 way :

1- email confirmation is off ==> it write the message when user just registred

2- email confirmation is on==> it write the message when user confirm by following the link in the email sent (not before!!!)

3- pending status==> it write the message if status is confirmed in PCstaff

In account-signup.php, change:

}else{ //email confirmation is off

header("Refresh: 0; url=account-confirm-ok.php?type=noconf");

}
For:


}else{ //email confirmation is off

$query = "INSERT INTO shoutbox (msgid, user, message, date, userid) VALUES (NULL, 'System', 'New User: [url=".$site_config['SITEURL']."/account-details.php?id=".$id."]".$wantusername."[/url]', '".get_date_time()."', '0')";

mysql_query($query);

header("Refresh: 0; url=account-confirm-ok.php?type=noconf");

}





In account-confirm.php, change:



$res = mysql_query("SELECT password, secret, status FROM users WHERE id = $id");





For:



$res = mysql_query("SELECT password, secret, status, username FROM users WHERE id = $id");





Change:



if (!mysql_affected_rows())

show_error_msg("Error","Unable to activate account please contact a admin",1);





For:



if (!mysql_affected_rows()) {

show_error_msg("Error","Unable to activate account please contact a admin",1);

}

else {

$query = "INSERT INTO shoutbox (msgid, user, message, date, userid) VALUES (NULL, 'System', 'New User: [url=".$site_config['SITEURL']."/account-details.php?id=".$id."]".$row["username"]."[/url]', '".get_date_time()."', '0')";

mysql_query($query);

}





In admincp.php, find:



mysql_query("UPDATE users SET status='$ed_status' WHERE id=$id");





Add after:



$qq = MYSQL_QUERY("SELECT username FROM users WHERE id = $id");

$ee = MYSQL_FETCH_ARRAY($qq);

$query = "INSERT INTO shoutbox (msgid, user, message, date, userid) VALUES (NULL, 'SpiRiT', 'Bienvenue au nouveau membre : [url=".$site_config['SITEURL']."/account-details.php?id=".$id."]".$ee["username"]."[/url]', '".get_date_time()."', '0')";

mysql_query($query);



Thanks to The Phoenix_UK for his code, and to Dodez for his update code

Works perfectly on v2.05
works perfectly on v2.05 :D
Added on v2.05 and works well with minor changes

this is the code I change in function.php

			/// START BALLON MOD ///

$bimg = @mysql_fetch_array(@mysql_query("SELECT image1 FROM torrents WHERE id=$id"));

$balon =($bimg["image1"] ? "uploads/images/" . htmlspecialchars($bimg["image1"]) : "images/nocover.jpg");

 /// END BALONN MOD ///

print("<td class=ttable_col$x nowrap>".(count($expandrows)?"<a href=\"java script: klappe_torrent('t".$row['id']."')\"><img border=\"0\" src=\"".$site_config["SITEURL"]."/images/plus.gif\" id=\"pict".$row['id']."\" alt=\"Show/Hide\" class=\"showthecross\"></a>":"")."&nbsp;<a title=\"".$row["name"]."\" href=\"torrents-details.php?id=$id&amp;hit=1 \" onmouseover=\" return overlib('<img src=$balon width=120 border=0>', CENTER);\" onmouseout=\"return nd();\">$dispname</a></td>");
delete the change in index.php and add it in admincp.php before first:

begin_frame
bug found  :D

in nightmare's uploadapp.php find :

$votesyes=$votesno=$voted==0;





change for:



$votesyes=$votesno=$voted=0;
little bug, find:

begin_frame("Bad Ratio Users");

if ($site_config["MEMBERSONLY"] && !$CURUSER) {

echo "<BR><BR><b><CENTER>You Are Not Logged In<br>Only Members Can View Affiliates Please Login or Signup.</CENTER><BR><BR>";

} else{
change with:


begin_frame("Bad Ratio Users");

if ($site_config["MEMBERSONLY"] && !$CURUSER) {

echo "<BR><BR><b><CENTER>You Are Not Logged In<br>Only Members Can View Affiliates Please Login or Signup.</CENTER><BR><BR>";

end_frame();

} else{









gandalf you have to change in



$deleteclass = ADMINISTRATOR;


with your real administrator class name
when I do an application and I want see it after in uploadapp I see 1 vote yes but nobody vote



if I see uploadapp with staff account it is 0 votes

how to modify to clear older than 24h ?

I want to see last day messages
How to modify to have ALL in FreeLeech ??
-------------------
yes its a starting one but I've got a v2.03 in line very moded and work perfectly
This mod is complete

It just need to clean up

I've just install in fresh v2.05

and works perfectly
works perfectly with v2.05

I think it can be moved to complete mod

If you don't want to see picture "no video"

change

else

print ("<tr><td align=left><b>" . Youtube . ": </b></td><td><img border=\"0\" width=\"200\" height=\"164\" src=".$site_config["SITEURL"]."/images/novideo.jpg></td></tr>");





with



else

print ("");
not need any image

it's a clone of the shoutbox but only staff can see it

if you're on staff you see 2 box otherwise you just see one
works well in the shoutbox but not in comments

I tried in differents places but not working

Any help?
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: 3
  • Members: 0
  • Guests online: 3
  • Comments: 3
  • Messages: 1,728