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

[size=12px]If posting about "database error" or something along that lines,[/size]

[size=12px]does no good if you dont also add the info from your_siteurl/admincp.php?action=sqlerr[/size]
Please Help — 2012-12-09 11:04:10 in General Chat
"Zohaib, post: 87312":
Hi, all i am new here... i installed TT V2 on my server but i have two problems

1.when i change my setting and in StaffCP==> Configuration and click on update button so noting happened

2. and i m uploading Torrent file with Extrenal Trackers when i click on Update Stats so always showing me Trackers time out please retry later

i needs this two problems sulotion .... Please Help Me
StaffCP thing is READ ONLY!!!!!!

and learn to search on the other 1... its been answered 2000000000 times before!
cool does $LANG["Q&A"] = "Q&A"; work ??LOL... you know php and & LOL
Here is an 2.08 version of [url="http://www.torrenttrader.pw/topic/8931-donate-mbgb-to-other-users-v2"]http://www.torrenttrader.pw/topic/8931-donate-mbgb-to-other-users-v2[/url]
It allows you to Donate MB/GB to Other Users for version v2.08 modified the orginal version due to errors and things..
all credit goes to tb-dev and the original poster of the other post.

Find code in account.php

<?php print("<b>".T_("IP").":</b> " . $CURUSER["ip"] . "n"); ?><br />

add after code

<a href="uptransfer.php"><b><?php echo T_("DONATE_UPLOAD_CREDITS"); ?></b></a><br />
Languages, credit goes to Tiloup:)
Fran&ccedil;ais
$LANG["DONATE_UPLOAD_CREDITS"] = "Faites un Cr&eacute;dits Upload";

English
$LANG["DONATE_UPLOAD_CREDITS"] = "Donate Upload Credits";

Code working perfect...
Enjoy
Add the file in attachment in your root site.


Proof:

Ps: I guess you could also put an link some place like the site navigation block but I like having it in the account.php.
I have this at the top of my index page,

well after stdhead(T_("HOME")); lo



if ($site_config["MEMBERSONLY"]) {

loggedinonly();

} //$site_config["MEMBERSONLY"]

untested but also you could do something like this




if (!$CURUSER) {

header("Location: account-login.php");

}



I personally feel guest people should only be able to view account-login and other pages like signup and recovery:) saves on spys causing issues hehe
not sure what "no sound" means LOL..

but this seems to work on my dev site.





//======================================================================#

// Add Gigs To Users

//======================================================================#

if ($action == "addgigs") {

   if ($_SERVER['REQUEST_METHOD'] == 'POST') {

       if ($_POST['doit'] == 'yes') {

           SQL_Query_exec("UPDATE users SET uploaded = uploaded + 2147483648 WHERE status='confirmed'");

           show_error_msg("Upload", "2GB upload is sent to everyone...", 1);

           die;

       } //$_POST['doit'] == 'yes'

       if ($_POST["username"] == "" || $_POST["gigs"] == "" || $_POST["gigs"] == "")

           show_error_msg("Error", "Missing form data.", 1);

       $username = sqlesc($_POST["username"]);

       $gigs = $_POST["gigs"];

       $uploaded = $_POST["uploaded"];

       $userid = $CURUSER["id"];

       $mb_basic = 1024 * 1024;

       if (isset($_POST['unit'])) {

           if ($_POST["unit"] == '1')

               $nobits = $gigs * $mb_basic;

           if ($_POST["unit"] == '2')

               $nobits = $gigs * $mb_basic * 1024;



       } //isset($_POST['unit'])

       $res = SQL_Query_exec("SELECT id,modcomment FROM users WHERE username=$username");

       $arr = mysql_fetch_row($res);

       if (!$arr)

           show_error_msg(T_("ERROR"), "Unable to update account.", 1);

       $modcomment = $arr[1];

       $modcomment = gmdate("Y-m-d") . " - " . $CURUSER['username'] . " has given " . mksize($nobits) . " to this user.n " . $modcomment;

       SQL_Query_exec("UPDATE users SET modcomment = " . sqlesc($modcomment) . ", uploaded=uploaded + $nobits WHERE username=$username");

       autolink("$site_config[sITEURL]/account-details.php?id=$arr[0]", "You gave " . mksize($nobits) . " To " . $username);

       die;

   } //$_SERVER['REQUEST_METHOD'] == 'POST'

   stdhead("Update Users Upload Amounts");

   navmenu();

   begin_frame("Update Users Uploaded Amounts", false, 10, false);

   echo "<form method="post" action="admincp.php?action=addgigs">";

?>

<center><font color=red size=2><b>To add gigs put in the user's name and amount then choose MB for megabytes or GB for gigabytes.</b></font></center>

<p align=center><table border=0 width=100% cellspacing=0 cellpadding=0>

<tr><td class="rowhead"><b>User name</b></td><td class="row1"><input type="text" name="username" size="40"/></td></tr>

<tr><td class="rowhead"><b>Amount</b></td><td class="row1"><input type="text" name="gigs" size="5"/><select name=unit><option value=1>MB</option><option value=2>GB</option></td></tr>

<tr><td colspan="2" class="row1" align="center"><input type="submit" value="Okay" class="btn"/></td></tr>

</table>

</form>

<?

   end_frame();

   stdfoot();

} //$action == "addgigs"

//======================================================================#

// End Add Gigs To Users

//======================================================================#

"karl_brit, post: 87116":
Didn't work on tt 2.08..

upload field worked fine but upon upload "database error" followed the guide to the tee..
well if you got that DID NOT FOLLOW RIGHT...

anyway posting about that error does NO good without the error from sqlerr ............................................................... siteurl/admincp.php?action=sqlerr

my guess you tried to add to db something the an field did not exist.. wrong order................
nice but tech if you changed

$dict['comment'] = "Downloaded & Seeded By Movie-Torrentz.tv";



to



$dict['comment'] = "Downloaded & Seeded By ".$site_config['SITENAME'];



be 1 less edit hehe.





other ones you can add





 $dict['publisher'] = $site_config['SITEURL'];

 $dict['created by'] = "Torrent created by a ".$site_config['SITENAME']." uploader";

Something thats kind of bugged me lol that there is no real quick way to access your account-details.php default..

So an fix in blocks/login_block.php

replace

begin_block($CURUSER["username"]);
with




   begin_block('<a href="' . $site_config["SITEURL"] . '/account-details.php?id=' . $CURUSER["id"] . '">' . $CURUSER["username"] . '</a>');




I have used an link like that forever on my main site + gives you the option to use class_user function if you so have added that function on your site.

my guess you installed the tracker to an sub dir or something .. try changing this

$rangclass = "<img src=/images
to

$rangclass = "<img src=images
i suppose anything is possible LOL.. maybe I might look into doing it auto..  but again more stuff you have in cleanup the slower the site runs at times..
This is an 2.08 version of the Uploader Ranks from [url="https://www.torrenttrader.org/topic/12755-uploader-rank/"]https://www.torrentt...-uploader-rank/[/url]

All credit goes to the original creators.

1st sqls



CREATE TABLE `rangclass` (

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

`name` varchar(50) default NULL,

`rangpic` varchar(50) default NULL,

PRIMARY KEY (`id`)

) ENGINE=MyISAM AUTO_INCREMENT=3;



INSERT INTO `rangclass` VALUES (1, '1 Rank', 'goblet_bronze.gif');

INSERT INTO `rangclass` VALUES (2, '2 Rank', 'goblet_silver.gif');

INSERT INTO `rangclass` VALUES (3, '3 Rank', 'goblet_gold.gif');



ALTER TABLE `users` ADD `rangclass` int( 10 ) unsigned NOT NULL default '0' AFTER class;

Add this to your language file.




// Addons and Mods

$LANG["ADDON_UPLOADER_RANK"] = "Uploader Rank";






find your account-details.php





//Layout

stdhead(sprintf(T_("USER_DETAILS_FOR"), $user["username"]));






add above







///rang klass uploader/////

$rangclass1 = "<option value=0>---". T_("ADDON_UPLOADER_RANK") ."---</option>n";

$res28 = SQL_Query_exec("SELECT * FROM rangclass ORDER BY name");

while ($rank = mysql_fetch_array($res28))

$rangclass1 .= "<option value=$rank[id]" . htmlspecialchars($user['rangclass'] == $rank['id'] ? " selected" : "") . ">$rank[name]</option>n";

$res22 = SQL_Query_exec("SELECT name,rangpic FROM rangclass WHERE id=$user[rangclass] LIMIT 1");

if (mysql_num_rows($res22) == 1) {

$arr22 = mysql_fetch_assoc($res22);

$rangclass = "<img src=/images/$arr22[rangpic] alt="$arr22[name]" title="$arr22[name]" style='margin-left: 5pt' align=top></td>";

} //mysql_num_rows($res22) == 1

//////end rang klass//////




find







if ($CURUSER["class"] > $user["class"]){

print("<tr><td>".T_("CLASS").": </td><td align=left><select name=class>n");

$maxclass = $CURUSER["class"];

for ($i = 1; $i < $maxclass; ++$i)

print("<option value=$i" . ($user["class"] == $i ? " selected" : "") . ">$prefix" . get_user_class_name($i) . "n");

print("</select></td></tr>n");

}




add after





if ($CURUSER["class"] <= $user["class"]) {

if ($user["rangclass" == 0])

print("<tr><td>". T_("ADDON_UPLOADER_RANK") .": </td><td align=left><select name=rangclass>n" .$rangclass1. "n</select></td></tr>n");

else

print("<tr><td>". T_("ADDON_UPLOADER_RANK") .": </td><td align=left><input type=hidden name=rangclass value=".$user["rangclass"]."></td></tr>n");

} else {

print("<tr><td>". T_("ADDON_UPLOADER_RANK") .": </td><td align=left><select name=rangclass>n" .$rangclass1. "n</select></td></tr>n");

}






find



<?php echo T_("USERCLASS");?>: <?php echo get_user_class_name($user["class"]);?><br />



add after





<?php if ($user["rangclass"] > 0)?><?php echo T_("ADDON_UPLOADER_RANK");?>: <?php echo $rangclass;?><br />






save and close





find in admin-modtasks.php





$class = (int) $_POST["class"];



after add





$rangclass = $_POST["rangclass"];






find





invites=$invites,





add after





 rangclass='$rangclass'



save and close

add the images in to images folder

Very nice ty for filling this:)  But 1 option I would love is to be able to move an post itself not the whole topic.
THIS IS NOT AN TORRENT SITE!!!!!!!!!!!!!! LOCKED
i tried it on my beta site seems to work OK, i might modify it some to work with my custom browser thing I got on my main site
should work in thory LOL

but change

<?php echo T_("BROWSER"); ?>: <?php echo htmlspecialchars($user["browser"]);?><br />
to  
<?php echo T_("BROWSER"); ?>: <?php echo $browser;?><br />


Edit Cant use htmlspecialchars on display of images...
weird did you change your login password hash? like if you upgraded from another version some people change the password hash to match.. I would check account-signup.php and see how thats making the password hash.

I just tried it on my test site and works perfect..
Updated to work with 2.08 svn





#======================================================================#

# Add Users

#======================================================================#

if ($action == "adduser") {

   if ($CURUSER["class"] < "7") {

       show_error_msg("Error", "Sorry you do not have the rights to view this page!", 1);

   }

   if ($_SERVER["REQUEST_METHOD"] == "POST") {

       if ($_POST["username"] == "" || $_POST["password"] == "" || $_POST["email"] == "")

           show_error_msg(T_("ERROR"), T_("DONT_LEAVE_ANY_FIELD_BLANK"),1);

       if ($_POST["password"] != $_POST["password2"])

           show_error_msg(T_("ERROR"), T_("PASSWORDS_NOT_MATCH"),1);

       $username = sqlesc($_POST["username"]);

       $password = $_POST["password"];

       $email = sqlesc($_POST["email"]);

       $secret = mksecret();

       $passhash = sqlesc(passhash($password)); // hash the password

       $secret = sqlesc($secret);

       SQL_Query_exec("INSERT INTO users (added, last_access, secret, username, password, status, email) VALUES(NOW(), NOW(), $secret, $username, $passhash, 'confirmed', $email)");

       $res = SQL_Query_exec("SELECT id FROM users WHERE username=$username");

       $arr = mysql_fetch_row($res);

       if (!$arr)

           show_error_msg(T_("ERROR"), "Unable to create the account. The user name is possibly already taken.",1);

       header("Location: account-details.php?id=$arr[0]");

       die;

   }



   stdhead("Add user");

   navmenu();

   begin_frame();

?>

<div align=center>

<h1>Add user</h1>

<form method=post action=admincp.php?action=adduser>

<table border=1 cellspacing=0 cellpadding=5>

<tr><td class=rowhead>Username</td><td><input type=text name=username size=40></td></tr>

<tr><td class=rowhead>Password</td><td><input type=password name=password size=40></td></tr>

<tr><td class=rowhead>Re-type password</td><td><input type=password name=password2 size=40></td></tr>

<tr><td class=rowhead>E-mail</td><td><input type=text name=email size=40></td></tr>

<tr><td colspan=2 align=center><input type=submit value="Okay" class=btn></td></tr>

</table>

</form>

</div>

<?

   end_frame();

   stdfoot();

}

#======================================================================#

# END Add Users

#======================================================================#

err forgot this page dont use sqlesc on write:( change it to

$passhash = sqlesc(passhash($password));// hash the password
might be simpler to use

$passhash = passhash($password);// hash the password
in 2.08 svn.  That way all the password hashs match:)
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