Bravo List
Register
Go Back   > Bravo List > Source Code > Active Trackers > Torrent Trader
Reply
Thread Tools
  #1  
Old 19th March 2013, 17:34
Extremlym's Avatar
Extremlym Extremlym is offline
Senior Member
 
Join Date: Oct 2012
P2P
Posts: 102
Cool Bookmark on browse TT v2.7?
hello,

i need a Bookmark mod for TTv2.7
Reply With Quote
  #2  
Old 19th March 2013, 23:35
daffy's Avatar
daffy daffy is offline
Senior Member
 
Join Date: Mar 2009
United Kingdom
Posts: 550
Default
add sql

Code:
CREATE TABLE IF NOT EXISTS `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`)
)
also

Code:
ALTER TABLE torrents ADD addbookmark char(3) NOT NULL DEFAULT no
torrent-details.php

add where want to show

Code:
   // Bookmarks mod
                           
echo "<FIELDSET class=download><LEGEND></a><B>Bookmark this torrent</B></LEGEND>";
echo "<CENTER><table border=0 width=98%><TR><TD>"; 

$bookt = mysql_query("SELECT torrentid FROM bookmarks WHERE torrentid =" .$row[id]);
$bookt1 = mysql_fetch_array($bookt);
if ($bookt1[0] == $row[id])
{
     
    print ("<div align=left><b>You already have this torrent in Your Bookmark Click. [<a href='takedelbookmark.php?bookmarkid=". $row[id] ."'><font color=red>HERE</font></a>] to remove it</b>");
}
    else {

    print ("<div align=left><b>Click <a href=bookmarks.php?torrent=$row[id]><b><font color=red>HERE</font><b></a><b> to save to bookmarks which can be viewed <a href='bookmark.php'><font color=red>HERE</font></b></a>.\n");}
      
      
echo "</table></FIELDSET><BR>"; 
// End Bookmarks mod
add attached to root

add link to bookmark.php in account.php
Attached Files
File Type: php bookmark.php (1.5 KB, 19 views)
File Type: php bookmarks.php (836 Bytes, 16 views)
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


http://i.imgur.com/DtcRfH5.gif

I also Setup And Modify Trackers PM For Details
Reply With Quote
  #3  
Old 27th March 2013, 11:30
Extremlym's Avatar
Extremlym Extremlym is offline
Senior Member
 
Join Date: Oct 2012
P2P
Posts: 102
Post
ERROR

http://extremlymtorrents.com/bookmark.php

Fatal error: Call to undefined function SQL_Query_exec() in /home/extremly/public_html/bookmark.php on line 17
Reply With Quote
  #4  
Old 27th March 2013, 15:08
daffy's Avatar
daffy daffy is offline
Senior Member
 
Join Date: Mar 2009
United Kingdom
Posts: 550
Default
Work it out, its not rocket science.
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


http://i.imgur.com/DtcRfH5.gif

I also Setup And Modify Trackers PM For Details
Reply With Quote
  #5  
Old 7th April 2013, 20:16
Extremlym's Avatar
Extremlym Extremlym is offline
Senior Member
 
Join Date: Oct 2012
P2P
Posts: 102
Default SOLVED!
SQL
PHP Code:
CREATE TABLE `bookmarks` (
`
idint(10unsigned NOT NULL auto_increment,
`
useridint(10unsigned NOT NULL default '0',
`
torrentidint(10unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
TYPE=MyISAM AUTO_INCREMENT=13
account.php find
PHP Code:
<?print("<a href=mailbox.php><b>My Messages</b></a>");?>
add after
PHP Code:
&nbsp;|&nbsp;
<?print("<a href=bookmark.php><b>My Bookmarks</b></a>");?>
torrents-details.php find
PHP Code:
print("<b>" HITS ": </b>" $row["hits"] . "\n<br />"); 
add after
PHP Code:
// 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
PHP Code:
mysql_query("DELETE FROM torrents WHERE id = $id"); 
add after
PHP Code:
mysql_query("DELETE FROM bookmarks WHERE torrentid = $id"); 
find
PHP Code:
mysql_query("DELETE FROM ratings WHERE user = $userid"); 
add after
PHP Code:
 mysql_query("DELETE FROM bookmarks WHERE userid = $userid"); 
find
PHP Code:
 case 'rating':
                                echo 
"<td class=ttable_head>".RATINGS."</td>";
                        break; 
add after
PHP Code:
 case 'bookmark':
                if (
$variant == "bookmarks"
echo 
"<td class=ttable_head>Delete</td>";
                        break; 
find
PHP Code:
 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
PHP Code:
 $site_config["torrenttable_columns"] = "category,name,dl,uploader,comments,size,seeders,leechers,health,external"
change for
PHP Code:
 $site_config["torrenttable_columns"] = "category,name,dl,uploader,comments,size,seeders,leechers,health,external,boo
kmark"

bookmark.php ==>upload it
PHP Code:
 <?
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
PHP Code:
<?
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
PHP Code:
 <?
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']);
?>
Reply With Quote
  #6  
Old 9th September 2013, 18:42
firefly007's Avatar
firefly007 firefly007 is offline
SUPPORT GURU
 
Join Date: Jun 2010
P2P
Posts: 721
Default
I will post my bookmark mod as soon as its done.. It also allows you to use your key to download later.
__________________




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

Reply With Quote
  #7  
Old 25th June 2015, 18:34
I_lie_and_steal_code_and_call_it_mine I_lie_and_steal_code_and_call_it_mine is offline
I have no idea how to code
 
Join Date: Jun 2015
Posts: 9
Thumbs up
PHP Code:
<?
to

PHP Code:
<?php
At top of all php files


would be a good start too


would be

PHP Code:
<?php
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']);
?>
Reply With Quote
  #8  
Old 26th June 2015, 00:01
daffy's Avatar
daffy daffy is offline
Senior Member
 
Join Date: Mar 2009
United Kingdom
Posts: 550
Default
your over 2 years late to reply bro lol
__________________
"FFS PPL READ GOD DAMMIT, WHAT AM I GOOGLE?"
"I Kill You!" simples


http://i.imgur.com/DtcRfH5.gif

I also Setup And Modify Trackers PM For Details
Reply With Quote
Reply

Tags
bookmark , browse , tt , v27


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 14:39. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.