My Assistant
Logged in as: OPPZeroCool ( Log Out )
My Controls · View New Posts · My Assistant · 0 New Messages
Bugs T-Xore 0.0.4, For New Version 0.0.5 |
murkster |
Oct
15 2006, 12:13 PM
Post #91
|
Chicken Noodle Group: Member Posts: 8 Joined: 17-February 06 Member No.: 357,202 |
QUOTE
murkster: I've noticed that the description does not get displayed on my details page either. I don't have time to fix it now, but I'm sure if you look at the "internal files" code on details.php, you can modify it to do a query to the DB, get your description, and then display in a table below internal files. Good luck. Have been working on it, still not quite getting the correct results, as mentioned I'm a total n00b to php , but will have another go... Thanks again.. This post has been edited by murkster: Oct 15 2006, 12:13 PM |
murkster |
Oct
21 2006, 07:05 PM
Post #92
|
Chicken Noodle Group: Member Posts: 8 Joined: 17-February 06 Member No.: 357,202 |
Done it..!!! Finally got the upload description to work, BUT... you'll like this; I had to use Dreamweaver, then edit its connection script to work with the live site.. (Rufus RoughCut ) But its working..!!! Thx all..!! |
OT-omer |
Oct
21 2006, 11:01 PM
Post #93
|
Omer Group: Member Posts: 455 Joined: 2-February 05 From: Netherlands Member No.: 254,362 |
Hi all, am having "fun" with X-tore, namely the upload comments, I have tried the suggested fix on a previous post with no joy Stared at the code for hours over the weekend, but being the fuktard I am with reguards to PHP I really got nowhere.... Any help anyone..?? (The comments are sent to the correct table and stored, but are not displayed... ) Thx for any help... hey murkster, Are you talking about the torrent description field on the upload.php page? or are you talking about the comments field on details.php? There is a big difference. Just to give everyone an update on my uda.php (scrape script) problem... I'm going to include my modified code, as well as the output I get when running it. I really hope someone can offer some input here. Thanks in advance. CODE
<? /* Project : T-Xore version 0.0.4 released on 06/2006 By Bogaa This piece of software is free to use by anyone and may be redistributed and modified by anyone in any way. We can't be held liable for damage or copyright infringement claims. Read the documentation! Bogaa's Homepage : http://www.meganova.org Project Homepage : http://www.devnova.org */ ob_implicit_flush(); // GLOBALS @ini_set("max_execution_time", "10600"); @ini_set ( "memory_limit", "128M"); $y = 0; // Connect to database require_once '../config.php'; require_once 'secure.php'; require_once '../BDecode.php'; connect ($dbhost, $dbuser, $dbpass, $database); // Lower the priority of this apache process @exec('renice +20 '.getmypid()); adminheader('Admin section : Update Torrent Stats'); // Fetch Trackers From sql $result = mysql_query("SELECT DISTINCT tracker FROM torrents ORDER BY id DESC") or die(mysql_error()); echo '<h1>Updating all torrents in '.mysql_num_rows($result).' Trackers</h1><pre>'; @ob_flush(); while($row = mysql_fetch_assoc($result)) { $tracker = $row['tracker']; $tracker = trim(str_replace('/announce', '/scrape', $tracker)); echo "Fetching From :\t<span title=\"$tracker\">".substr($tracker,0,50)."</span>\t\t"; @ob_flush(); echo $tracker . "<br>"; $sleepBetweenTries = 5; // seconds $times = 5; for ($i = 0; $i < $times; $i++ ) { $fp = file_get_contents($tracker); if ($fp!==false) { break; } sleep($sleepBetweenTries); } //@$fp = file_get_contents($tracker); if(!$fp) { echo "\t Tracker is not responding<br />"; @ob_flush(); } else { $stats = BDecode($fp); $query = "SELECT hash, seeds, peers "; $query .= "FROM torrents "; $query .= "WHERE tracker = '".$row['tracker']."'"; $res_tor = mysql_query($query) or die('Error in SQL query: '.mysql_error()); while($row_tor = mysql_fetch_assoc($res_tor)) { $y++; $binhash = addslashes(pack("H*", $row_tor['hash'])); $hash = $row_tor['hash']; $_seeds = $stats['files'][$binhash]['complete']; $_peers = $stats['files'][$binhash]['incomplete']; $last_update = date("YmdHis"); // temporary fix if(isset($_seeds) && isset($_peers)) { @mysql_query("UPDATE torrents SET seeds = '$_seeds', peers = '$_peers', updated= '$last_update' WHERE hash = '$hash' LIMIT 1") or die(mysql_error()); } } mysql_free_result($res_tor); echo " :: "; echo " $y torrents have been updated<br />"; @ob_flush(); } } mysql_free_result($result); echo "</pre><h3>$y torrents have been updated</h3>"; footer(); ?> And here is some of the output I get when running it. As you can see, some trackers work, while others don't... QUOTE
Updating all torrents in 22 Trackers Fetching From : http://www.filelist.org:81/scrape.php http://www.filelist.org:81/scrape.php Warning: file_get_contents(http://www.filelist.org:81/scrape.php) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://www.filelist.org:81/scrape.php) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://www.filelist.org:81/scrape.php) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://www.filelist.org:81/scrape.php) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://www.filelist.org:81/scrape.php) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Tracker is not responding Fetching From : http://www.crikeym8.com/scrape.php?pid=4cb3d6d3293 http://www.crikeym8.com/scrape.php?pid=4cb3d6d32931ab4bea9e445d383523f5 :: 2 torrents have been updated Fetching From : http://tpb.tracker.thepiratebay.org/scrape http://tpb.tracker.thepiratebay.org/scrape :: 3 torrents have been updated Fetching From : http://tracker.bitebbs.com:6969/scrape http://tracker.bitebbs.com:6969/scrape Warning: file_get_contents(http://tracker.bitebbs.com:6969/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://tracker.bitebbs.com:6969/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://tracker.bitebbs.com:6969/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://tracker.bitebbs.com:6969/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://tracker.bitebbs.com:6969/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Tracker is not responding Fetching From : http://tracker.phogotorrents.com:2006/scrape http://tracker.phogotorrents.com:2006/scrape Warning: file_get_contents(http://tracker.phogotorrents.com:2006/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://tracker.phogotorrents.com:2006/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://tracker.phogotorrents.com:2006/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://tracker.phogotorrents.com:2006/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://tracker.phogotorrents.com:2006/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Tracker is not responding Fetching From : http://exchangemediatorrents.net/scrape.php http://exchangemediatorrents.net/scrape.php :: 4 torrents have been updated Fetching From : http://tracker.torrent.to:2710/scrape http://tracker.torrent.to:2710/scrape Warning: file_get_contents(http://tracker.torrent.to:2710/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://tracker.torrent.to:2710/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://tracker.torrent.to:2710/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://tracker.torrent.to:2710/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://tracker.torrent.to:2710/scrape) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Tracker is not responding Fetching From : http://www.acetorrents.net/scrape.php http://www.acetorrents.net/scrape.php :: 6 torrents have been updated Fetching From : http://torrentpipeline.org/scrape.php http://torrentpipeline.org/scrape.php Warning: file_get_contents(http://torrentpipeline.org/scrape.php) [function.file-get-contents]: failed to open stream: HTTP request failed! in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://torrentpipeline.org/scrape.php) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://torrentpipeline.org/scrape.php) [function.file-get-contents]: failed to open stream: Connection timed out in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://torrentpipeline.org/scrape.php) [function.file-get-contents]: failed to open stream: HTTP request failed! in /home/hrhdtorr/public_html/admin/uda.php on line 49 Warning: file_get_contents(http://torrentpipeline.org/scrape.php) [function.file-get-contents]: failed to open stream: HTTP request failed! in /home/hrhdtorr/public_html/admin/uda.php on line 49 Tracker is not responding Fetching From : http://tracker.allnight.nl/scrape.php http://tracker.allnight.nl/scrape.php :: 7 torrents have been updated Fetching From : http://www.torrentsforall.net/scrape.php http://www.torrentsforall.net/scrape.php :: 8 torrents have been updated Fetching From : http://thepeerhub.com/scrape.php http://thepeerhub.com/scrape.php :: 9 torrents have been updated Fetching From : http://tracker.silvertorrents.org/scrape.php http://tracker.silvertorrents.org/scrape.php :: 10 torrents have been updated find in admin/uda.php near line 44 CODE
@$fp = file_get_contents($tracker); replace this with CODE
$fp = @file_get_contents($tracker); i don't know but maybe it will help -------------------- |
OT-omer |
Yesterday, 01:15 AM
Post #94
|
Omer Group: Member Posts: 455 Joined: 2-February 05 From: Netherlands Member No.: 254,362 |
Why not increase t-xore 0.0.4 to
t-xore to 0.0.5 This mod is a login function, members can post comments with their own name and upload torrents with their own name and have their own profile page. How to install: 1.Download files that i have attached. 2.Edite somethings in your files. What should be edited. Open config.php. Find line near 351: CODE
echo '</title> </head><body> <script type="text/javascript" src="dyn.js"></script> <a name="start"></a><h1 style="font-size:50px;letter-spacing:27px">'.$sitename.'</h1> <form id="search" action="search.php"><input name="term" size="25" /> <select name="cat"><option value="0">-All-</option><option value="6">Anime</option><option value="4">Games</option><option value="7">Misc</option><option value="1">Movies</option><option value="3">Music</option><option value="2">Series</option><option value="5">Software</option></select> <input type="submit" value="search" /></form> <div id="menu" class="fade-cfd8f8"> <a href="index.php">Home</a> | <a href="browse.php">Browse</a> | <a href="upload.php">Upload</a> | <a href="about.php">About</a></div> <br />'; Replace this with this: CODE
echo '</title> </head><body> <script type="text/javascript" src="dyn.js"></script>'; if (isset($_COOKIE['username'])&&isset($_COOKIE['userid'])) { echo '<div style="float:right;"><span class="user">'.$_COOKIE['username'].'</span> | <a href="profile.php">Profile</a> | <a href="logout.php">Logout</a></div>'; } else { echo '<div style="float:right;"><a href="login.php">Login</a> | <a href="register.php">Register</a></div>'; } echo ' <a name="start"></a><h1 style="font-size:50px;letter-spacing:27px">'.$sitename.'</h1> <form id="search" action="search.php"><input name="term" size="25" /> <select name="cat"><option value="0">-All-</option><option value="6">Anime</option><option value="4">Games</option><option value="7">Misc</option><option value="1">Movies</option><option value="3">Music</option><option value="2">Series</option><option value="5">Software</option></select> <input type="submit" value="search" /></form> <div id="menu" class="fade-cfd8f8"> <a href="index.php">Home</a> | <a href="browse.php">Browse</a> | <a href="upload.php">Upload</a> | <a href="about.php">About</a></div> <br />'; And save your config.php file. Open details.php find line near 73 CODE
echo '<tr><td>Peers</td><td> '.getpeer($peers).'</td></tr>'; after that add this CODE
if (!$posted_by==0) { echo '<tr><td>Uploaded by</td><td> '.$posted_by.'</td></tr>'; } Find line near 113 or 117 CODE
echo '<div '.$row_color.'><strong>'.htmlentities($name).'</strong> On <strong>'.$date.'</strong><br /><br />'.nl2br(htmlentities($post)).'</div><br /><br />'; replace with this CODE
echo '<div '.$row_color.'><strong>'.$name.'</strong> On <strong>'.$date.'</strong><br /><br />'.nl2br(htmlentities($post)).'</div><br /><br />'; Find line near 127 or 130 CODE
echo '<input name="user" value="name" onclick=\'value=""\' /><br /><br />'; add replace with this CODE
if (isset($_COOKIE['username'])&&isset($_COOKIE['userid'])) { echo 'Username: <span class="user">'.$_COOKIE['username'].'</span><br />'; } else { echo '<input name="user" value="name" onclick=\'value=""\' /><br /><br />'; } Find line near 151 or 162 CODE
$name = trim($_POST['user']); Replace with this CODE
if (isset($_COOKIE['username'])&&isset($_COOKIE['userid'])) { $name='<a href="profile.php?id='.$_COOKIE['userid'].'"><span class="user">'.$_COOKIE['username'].'</span></a>'; mysql_query("UPDATE users SET comments = comments+1 WHERE userid = '".$_COOKIE['userid']."'"); } else { $name = trim(htmlentities($_POST['user'])); } Save you details.php file And open you upload.php file. find line near 134 CODE
// Drop torrent stats into db mysql_query("INSERT INTO torrents & #40;ip,torrentname,hash,maincat,subcat,tracker,size,seeds,peers,added,updated,registration,descripti on) VALUES ('$REMOTE_ADDR','$torrentname','$infohash','$maincat','$subcat','$tracker','$size','$seeds','$peers','$date','$updated','$registration','$desc_enum')") or die (mysql_error()); Replace with this CODE
if (isset($_COOKIE['username'])&&isset($_COOKIE['userid'])) { $name=$_COOKIE['username']; // Drop torrent stats into db mysql_query("INSERT INTO torrents & #40;ip,torrentname,hash,maincat,subcat,tracker,size,seeds,peers,added,updated,registration,descripti on,posted_by) VALUES ('$REMOTE_ADDR','$torrentname','$infohash','$maincat','$subcat','$tracker','$size','$seeds','$peers','$date','$updated','$registration','$desc_enum','$name')") or die (mysql_error()); } else { // Drop torrent stats into db mysql_query("INSERT INTO torrents & #40;ip,torrentname,hash,maincat,subcat,tracker,size,seeds,peers,added,updated,registration,descripti on,posted_by) VALUES ('$REMOTE_ADDR','$torrentname','$infohash','$maincat','$subcat','$tracker','$size','$seeds','$peers','$date','$updated','$registration','$desc_enum','0')") or die (mysql_error()); } Find line near 140 CODE
$desc_id = mysql_insert_id(); Add after that this CODE
if (isset($_COOKIE['username'])&&isset($_COOKIE['userid'])) { mysql_query("UPDATE users SET uploads = uploads+1 WHERE userid = '".$_COOKIE['userid']."'"); $name='<a href="profile.php?id='.$_COOKIE['userid'].'"><span class="user">'.$_COOKIE['username'].'</span></a>'; $comment = 'I hope you will enjoy, '.$torrentname.''; $ip= $REMOTE_ADDR; $date = date('YmdHis'); mysql_query ("INSERT INTO comments (id, ip, post, date, name) VALUES ('$desc_id', '$ip','$comment','$date','$name')") or die (mysql_error()); } And save your upload.php file. don't forget to add database file too in you mysql database file : upgrade.sql Have a fun. If you get some errors please post it here. This post has been edited by OT-omer: Yesterday, 12:09 PM Attached File(s) t_xore_login.rar ( 2.99k ) Number of downloads: 11 |
OT-omer |
Yesterday, 04:54 AM
Post #95
|
Omer Group: Member Posts: 455 Joined: 2-February 05 From: Netherlands Member No.: 254,362 |
Add this in you stylesheet.css CODE
.info { padding:2px; border:1px solid #CCC; } .user { font-weight:bold; color:#569; } |
murkster |
Yesterday, 09:34 PM
Post #96
|
Chicken Noodle Group: Member Posts: 8 Joined: 17-February 06 Member No.: 357,202 |
OT-omer - I love you...!!!!
That is working great on the test server and the live one..!!! Brill!!! Many Thx... extreme cool Karma | OT-omer |
Dandy Don |
Today, 09:03 AM
Post #97
|
Tomato Group: Member Posts: 74 Joined: 8-May 06 Member No.: 384,048 |
OUTSTANDING !!!!! Thanks OT-omer, I will be testing this ASAP on a test server, a Mac, and a live server. EDIT: have it running, and came accross this: "Please fill out entire form" on making a comment. EDIT 2 : It seems that the error I'm geting is that it's jumping up a directory. current new install is installed as a subdirectory of a current T-Xore install ( seperate DB) It shows user on "comments", but when click submit, it errors as stated above with a url from the upper directory. I'll try it on another machine in the morning. EDIT3 : I added a new torrent since the changes, and when I do, I get this : QUOTE
You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near '&
#40;ip,torrentname,hash,maincat,subcat,tracker,size,seeds,peers,added,updated,'
at line 2 This post has been edited by Dandy Don: Today, 11:02 AM -------------------- ** Not responsible for spelling mistakes .. I know I
can't spell |
OT-omer |
Today, 11:23 AM
Post #98
|
Omer Group: Member Posts: 455 Joined: 2-February 05 From: Netherlands Member No.: 254,362 |
I don't know but i have tested on
xampp and worked fine try this out. Open details.php Find line near 171 CODE
$comment = trim($_POST['comment']); $ip= $REMOTE_ADDR; $date = date('YmdHis'); Ather that add this CODE
if (isset($_COOKIE['username'])&&isset($_COOKIE['userid'])) { $value=($comment==''); } else { $value=($comment=='' || $name==''); } And find line near 174 or 182 CODE
if ($comment == '' || $name == '') replace with CODE
if ($value) And save you details.php Open upload.php Find linenear 40 CODE
$torrentname = trim(strip_tags($_POST['filename'])); replace with this CODE
$torrentname = trim(strip_tags(addslashes($_POST['filename']))); If this doesn't help please post the torrent that you want upload here This post has been edited by OT-omer: Today, 11:34 AM |
murkster |
Today, 11:53 AM
Post #99
|
Chicken Noodle Group: Member Posts: 8 Joined: 17-February 06 Member No.: 357,202 |
Hi all, Dandy - Don; had the same problem when I checked this morning, turns out all you have to do is replace QUOTE
& #40; with an open bracket
QUOTE
( Also you can specify the base URI, in config.php may help ? WOW, I figured something..!!!!! Thx all.. This post has been edited by murkster: Today, 12:09 PM |
guibean |
Today, 04:09 PM
Post #100
|
Tomato Group: Contributor Posts: 69 Joined: 22-September 05 Member No.: 313,949 |
OUTSTANDING !!!!! Thanks OT-omer, I will be testing this ASAP on a test server, a Mac, and a live server. EDIT: have it running, and came accross this: "Please fill out entire form" on making a comment. EDIT 2 : It seems that the error I'm geting is that it's jumping up a directory. current new install is installed as a subdirectory of a current T-Xore install ( seperate DB) It shows user on "comments", but when click submit, it errors as stated above with a url from the upper directory. I'll try it on another machine in the morning. EDIT3 : I added a new torrent since the changes, and when I do, I get this : QUOTE
You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the
right syntax to use near '&
#40;ip,torrentname,hash,maincat,subcat,tracker,size,seeds,peers,added,updated,'
at line 2 100% Work replace & #40; with ( Replace with this QUOTE
if
(isset($_COOKIE['username'])&&isset($_COOKIE['userid'])) { $name=$_COOKIE['username']; // Drop torrent stats into db mysql_query("INSERT INTO torrents (ip,torrentname,hash,maincat,subcat,tracker,size,seeds,peers,added,updated,registration,description, posted_by) VALUES ('$REMOTE_ADDR','$torrentname','$infohash','$maincat','$subcat','$tracker','$size','$seeds','$peers','$date','$updated','$registration','$desc_enum','$name')") or die (mysql_error()); } else { // Drop torrent stats into db mysql_query("INSERT INTO torrents (ip,torrentname,hash,maincat,subcat,tracker,size,seeds,peers,added,updated,registration,description, posted_by) VALUES ('$REMOTE_ADDR','$torrentname','$infohash','$maincat','$subcat','$tracker','$size','$seeds','$peers','$date','$updated','$registration','$desc_enum','0')") or die (mysql_error()); } -------------------- |
Lo-Fi Version | 0.1521
sec --
15 queries
GZIP
Enabled Time is now: 23rd October 2006 - 08:18 PM |