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

uploader app — 2011-12-19 06:12:34 in v2 Only Mods Complete
after adding the following sql to mine it seems to work ok.

ALTER TABLE `uploadapp` ADD `grpacct` tinyint(1) NOT NULL DEFAULT '0';

ALTER TABLE `uploadapp` ADD `grpname` varchar(100) NOT NULL DEFAULT '';

ALTER TABLE `uploadapp` ADD `grpdes` varchar(4) NOT NULL DEFAULT '';

ALTER TABLE `uploadapp` ADD `othergrps` tinyint(1) NOT NULL DEFAULT '0';
you will never get it to work on i.e. that browser is not html 5 able..  Use firefox or chrome and its fine and more secure... Unless you like being hacked then in that case stick with i.e.
Nice mod but 1 change I would do to hide category's not available is in

function navmenu(){

find

while($menu=mysql_fetch_array($affiche_menu))	{



and after add:



	$num_rows_class = get_row_count("staffnavigate", "WHERE categorie = $menu[id]  AND $max_classe >= classe");

if ($num_rows_class != '0') {



then find



print("				</tr>

</table>

</fieldset><br/>");



and after add:



)
just use the mod here [url="http://www.torrenttrader.org/index.php?showtopic=12259&hl="]http://www.torrenttrader.org/index.php?sho...c=12259&hl=[/url] you can add custom stuff to it for other icons then just following the instructions in the mod to add it places you want.  I use it on my site, well an modified version but its not hard to do.
[ADDON] Forums — 2011-11-26 21:16:56 in v2 Only Mods Complete
Forums work perfect using the svn admincp and the svn forums.php.  Alot has changed in them and might not work if you use parts of stuff..
maybe in account details.php.... but again would take reading :)
looks like your screen is not big enough to display the full line.. to me i would have just made another column but again i got torrent-details for an reason  :)  ;)  :)  :)  :)

Ok not that I really wanted it lol but might help some of my lazy users hehehe

in function.php remove the stuff you add and find

:)

			   case 'dl':

echo "<th class='ttable_head'>".T_("DL")."</th>";
and Before add:


			case 'thanks':

echo "<th class='ttable_head' width=10%>Thanks</td>";

break;





and then search for



			case 'dl':

print("<td class=ttable_col$x align=center><a href=\"download.php?id=$id&name=" . rawurlencode($row["filename"]) . "\"><img src=" . $site_config['SITEURL'] . "/images/icon_download.gif border=0 alt=\"Download .torrent\"></a></td>");



and before add:



			case 'thanks':

 $res_thanks = SQL_Query_exec("SELECT `thanks` FROM torrents WHERE id=".$row["id"]);

 $row_thanks = mysql_fetch_row($res_thanks);

 mysql_free_result($res_thanks);

 $your_thanks = explode(",", $row_thanks[0]);

if (!in_array($CURUSER["username"], $your_thanks)) {

 $mythank = '<form action="thanks2.php" method="post"><input type="hidden" name="torrent" value="'.$row["id"].'" /><input type="submit" value="Thanks!" /></form>';

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

} else {

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



}

break;





now create a new file called thanks2.php with the following stuff and upload it the root of your server aka where index.php is

<?php

require_once("backend/functions.php");

dbconn(false);

loggedinonly();



$id = (int)$_POST['torrent'];



if (!is_valid_id($id)) die;



$res = mysql_query("SELECT `thanks` FROM torrents WHERE id=$id");

$row = mysql_fetch_assoc($res);

mysql_free_result($res);

if (!$row) show_error_msg("Error", "Sorry no .torrent found with this ID, it has probably been deleted.",1);



$thanksl = explode(",", $row['thanks']);



if (in_array($CURUSER['username'], $thanksl)) show_error_msg("Error", "You have already left thanks for this torrent.",1);



mysql_query(sprintf("UPDATE `torrents` SET thanks = CONCAT_WS(',', `thanks`, %s) WHERE `id`=%d", sqlesc($CURUSER['username']), $id)) or die(mysql_error());



$referring_url = $_SERVER['HTTP_REFERER'];

$requested_url = $_SERVER['REQUEST_URI'];



header("Refresh: 3;url=$referring_url");

show_error_msg("Success", "Thanks added.<BR>Redirecting...", 1);

?>



after that to get it to not show the thanks button if already thanked in index.php find



, torrents.anon



and replace it with



, torrents.anon, torrents.thanks


and if you want it on torrents.php find an replace the above stuff in that php too

You might ask why thanks2.php its because on my site I use an ajax thanks for the torrent-details page

sorry takes you an week to respond so nope not going to help.  I only help people that want to be helped.
I never understood why people want everything on the index page.. site has torrent details for an reason LOL, mids as well delete the torrent details and make it all off torrents.php  be easier on uploaders LOL
mass email — 2011-11-20 01:19:26 in v2 Only Mods Complete
those having issues with so called not sending emails, should really use the gmail mod here some place.  I am using it on my test site and it sends np to matter who I am testing it with.  + the fact if switch to using the gmail addon you can tech just plain shutdown your servers mail server.  1 less area for someone to try and hack in.
its because of the weird peer strings but I find replacing

$arr5[peer_id]
with


CutName($arr5['peer_id'], 8)


works better, still gives the same basic peer info just without the weird looking ending stuff

You forgot something.. prob did not upload modcp.php to your public_html folder.

also

Quote:
Parse error: syntax error, unexpected $end, expecting T_VARIABLE or '$' in /home/xxx/public_html/languages/english.php on line 103

Edit:

Ah I see an bug in them now with the svn version.

find in both modcp.php and modocp.php

function navmenu(){
and BEFORE it add:


 $action = $_REQUEST["action"];

$do = $_REQUEST["do"];



I just tested them on my beta site, they both work around 80%, missing some of the extra phps but works basically.  They are also kind of old on some of the options its better off to use the main admincp.php but again thats got some options i feel not all staff should be accessing..

Ok here is an mod I been using for an while about the new mysql wrapper in 2.07+

I love the new wrapper but as people notice it has no real ability to view the sql error if you get 1.

So I came up with this addon, as people prob realize its for 2.07+ and svn only,

I guess with some major mods could work for older versions but its mostly directed at the newer versions.

1st: sql

 DROP TABLE IF EXISTS `log_error`;

CREATE TABLE IF NOT EXISTS `log_error` (

  `id` int(10) NOT NULL auto_increment,

  `added` datetime default NULL,

  `txt` text,

  `type` text,

  `minclass` tinyint(2) NOT NULL default '5',

  `ip` varchar(70) NOT NULL default '',

  `username` varchar(70) NOT NULL default '',

  PRIMARY KEY  (`id`),

  KEY `added` (`added`)

) ENGINE=MyISAM  DEFAULT CHARSET=latin1;
2nd: add the following function to backend/functions.php


 function write_errorlog($text)

{

$ip = $_SERVER['REMOTE_ADDR'];

$text1 = $text ." On: ". $ip;

$text = sqlesc($text1);

$added = sqlesc(get_date_time());

$type = "error_log";

SQL_Query_exec("INSERT INTO log_error (added, txt, type) VALUES($added, $text, '$type')");

}





3: add the following function to languages/english.php



 $LANG["LOG_ERROR"] = "Error Log";





4: find in backend/mysql.class.php



		 error_log($msg);



and after add:



		 write_errorlog($msg);





That basically the hard part, now to link to the errorlog,  I personally use an link in blocks/navigate_block.php

makes it easier to find due to the fact its on every page but in thory if wanted to could add it to the main control panel for staff.

but in this post I will show how to do it in the navigate block

now some place in blocks/navigate_block.php add:



 if ($CURUSER && $CURUSER["edit_users"]=="yes")

{

echo "<li><a href='errorlog.php'>".T_("LOG_ERROR")."</a></li>";

}



now create the following page in the root of your site:

errorlog.php



 <?

error_reporting(E_ALL ^ E_NOTICE);

require_once("backend/functions.php");

dbconn(false);

loggedinonly();

global $site_config;

global $CURUSER;



$staff_page = T_("LOG_ERROR");

if (!$CURUSER || $CURUSER["edit_users"]!="yes"){

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

}

stdhead("$staff_page");



$res = SQL_Query_exec("SELECT COUNT(*) FROM log_error WHERE type='error_log'");

$row = mysql_fetch_array($res);

$count = $row[0];



$perpage = 100;



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



$res = SQL_Query_exec("SELECT added, txt FROM log_error WHERE type='error_log' ORDER BY added DESC $limit");

if (mysql_num_rows($res) == 0)





print("<b>".T_("LOG_IS_EMPTY")."</b> For: $staff_page\n");

else

{



echo $pagertop;



print("<table border=1 cellspacing=0 cellpadding=5>\n");

print("<tr><td class=tabletitle align=left>Date</td><td class=tabletitle align=left>Time</td><td class=tabletitle align=left>Event</td></tr>\n");

while ($arr = mysql_fetch_assoc($res))

{

$color = '#ececec';

if (strpos($arr['txt'],T_("WAS_CREATED"))) $color = "#ececec";

if (strpos($arr['txt'],T_("WAS_DELETED_BY"))) $color = "#ececec";

if (strpos($arr['txt'],T_("WAS_UPLOADED_BY"))) $color = "#ececec";

if (strpos($arr['txt'],T_("WAS_EDITED_BY"))) $color = "#ececec";

$date = substr($arr['added'], 0, strpos($arr['added'], " "));

$time = substr($arr['added'], strpos($arr['added'], " ") + 1);





print("<tr class=tableb><td style=background-color:$color><font color=black>$date</td><td style=background-color:$color><font color=black>$time</td><td style=background-color:$color align=left><font color=black>".$arr['txt']."</font></font></font></td></tr>\n");

}

print("</table>");

}

echo $pagerbottom;



print("<p>Times are in GMT.</p>\n");

stdfoot();



?>



That should be it, some people might ask why another db table, well keeps the error logs out of the main log table and makes it easier if really want to look at them in what ever you use to view the sql.

ah i get what you mean.

i would think changing

if ($CURUSER["class"] < "7")
changing 7 to what ever # you set

to


if (!$CURUSER || $CURUSER["control_panel"]!="yes")


would be an better way myself, that way dont really matter if you add classes lol as long as control_panel flag is set right in the db for your staff classes.

Heck works well in main control panel why not in the staff box hehe
Not sure what you mean about 2. but I use the mod or an version of it on my main site and it seems good for what people need help with.

Security wise so far np but again I changed stuff that others did here for security on all my pages.

I personally feel it would be better to have it all in 1 file, maybe if I get around to it will try that on 2.08 or svn if get really bored.

Ps: dont try and ask me what ones changed.  Its an change prg i use to change all .php on my hd folder of my site So I really have no idea of 1 changes hehe
yep you need to have an link with the id in it, 1st post has the 1 you put in the torrent details.

should be something like hxxp://mydomain/viewsnatches.php?id=1  or what ever id your torrent # is

in svn ONLY

Edit torrents-details.php

Find:

echo "[<a href='torrents-edit.php?id=$row[id]&amp;returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "'><b>".T_("EDIT_TORRENT")."</b></a>]";





Replace by:





echo "[<a href='torrents-edit.php?id=$row[id]&amp;returnto=" . urlencode($_SERVER["REQUEST_URI"]) . "'><b>".T_("EDIT_TORRENT")."</b></a>]";

echo "[<a href='viewsnatches.php?id=".$row['id']."'><b>View Snatched List</b></a>]";
oh i see the issue.. must have uploaded an non saved version.. oh well happends

change

		show_error_msg(T_("ERROR"),"No Torrent ID, Please dont direct link to this page without an torrent ID"),1);
to


		show_error_msg(T_("ERROR"),"No Torrent ID, Please dont direct link to this page without an torrent ID",1);



Fixed the other post
if i remember right the link needs viewsnatches.php?id=your_torrent_id_#

not sure why it dont have a check for this but again not my code LOL

but anyway this included file fixes that issue atleast it trying to access it without an torrent id.

Edit: New Upload of the fixed viewsnatches

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=5352"]viewsnatches.php[/url]
[ADDON] Forums — 2011-11-13 21:04:44 in v2 Only Mods Complete
you could in thory use the same type code used in the blocks to hide them from non logged in

if ($CURUSER){

// 1 set of querys to access forum db info

}

else {

// other set of querys to access only forums you want guests to view

}
in thory


if (get_user_class() >


will not work for guests due to the fact they have no class hehe
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: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728