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
Torrent Images
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / v2.08 / v2 Only Mods Complete

Unknown User
2010-12-12 10:27:32
SQL

ALTER TABLE `torrents` ADD `timages` TEXT NOT NULL;


In torrents-details.php find:




., ., ., ., ., ., torrents.freeleech,





Add





torrents.timages,





example





., ., ., ., ., ., torrents.freeleech, torrents.timages,





Find





" .  format_comment($row['descr']) . "





Add after:





print ("<table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"6\"><tr>

<td class=table_col2 colspan=\"2\">

<center>".format_comment($row['timages'])."</center>

</td>

</tr>");





In torrents-upload.php find:





, anon and add timages

example: , anon, timages





Find:





, $anon and add $timages

example: , $anon, $timages





Find:





$category = "<select name=\"type\">\n<option value=\"0\">" . CHOOSE_ONE . "</option>\n";







Add above:





print ("<tr><td align=right>Images: </td><td align=left><textarea name=\"timages\" rows=\"4\" cols=\"80\">[img=image] [img=image]

[img=image] [img=image] </textarea><br></td></tr>");





In torrents-edit.php find:





$updateset[] = "category = " . (0 + $type);





After add





$updateset[] = "timages = " . sqlesc($timages);





Find





	$updateset[] = "visible = '" . ($_POST["visible"] ? "yes" : "no") . "'";

if (!empty($_POST['tube']))

$tube = unesc($_POST['tube']);

$updateset[] = "tube = " . sqlesc($tube);





After add:





$timages = $_POST["timages"];

if ($timages) {

if (!preg_match('(gif|jpg|jpeg|png|JPG|PNG|GIF)', $timages))

stderr("Bad format");

}







Find:





echo "<tr><td align=right width=60><B>Name: </b></TD><TD><input type=\"text\" name=\"name\" value=\"" . htmlspecialchars($row["name"]) . "\" size=\"55\" /></td></tr>";





After add:





echo "<tr><td align=right><B>Images: </b></td><td><textarea name=\"timages\" rows=\"4\" cols=\"80\">".$row['timages']."</textarea></td></tr>";





Images:

torrents-upload.php



torrents-details.php



torrents-edit.php

Unknown User
2010-12-12 10:40:05
And I have problem for this mod, when i want to upload torrent i got error:

"No ID. Server error, please report."

Then I delete $timages from torrents-upload.php file when work perfect, but dont show images.

When i have to go torrents-edit.php edit torrent and add images, only in this way show images.

Who can help me on this situation?

My mysql_query code:

$ret = mysql_query("INSERT INTO torrents (filename, owner, name, descr, vip, image1, category, tube, added, info_hash, size, numfiles, save_as, announce, external, nfo, torrentlang, torrentage, anon, timages) VALUES (" .

  implode(",", array_map("sqlesc", array($fname, $CURUSER['id'], $name, $descr, $vip, $inames[0], $inames[1], $type, $tube, get_date_time(), $infohash, $torrentsize, $filecount, $fname, $announce, $external, $nfo, $langid, $ageid, $anon, $timages))).")");
Unknown User
2011-01-03 12:17:09
Kaip man padaryti kad tuos paveiksliukus automatiskai sumazintu?

****English*****

How to make picks to auto resize?
Unknown User
2011-01-03 22:31:55
susikurk nauja koda pvz [pic][/pic] tai gali padaryti funtions faile tiesiog nukopink [img]%7Boption%7D[/img] koda ir img pakeis i pic ar kaip nori ir paciam kode uzdiek width=200 ir viskas

Quote:
// [pic]http://www/image.gif[/pic]$s = preg_replace("/\[pic\](http:\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\[\/pic\]/i", "<a href=\"\\1\" rel=\"lightbox[vacation]\"><IMG border=\"0\" src=\"\\1\" width=172 title=\"Click to enlarge\"></a>", $s);

// [pic=http://www/image.gif]

$s = preg_replace("/\[pic=(http:\/\/[^\s'\"<>]+(\.gif|\.jpg|\.png|\.bmp|\.jpeg))\]/i", "<a href=\"\\1\" rel=\"lightbox[vacation]\"><IMG border=\"0\" src=\"\\1\" width=172 title=\"Click to enlarge\"></a>", $s);
Unknown User
2011-01-04 12:50:23
Dekui

****English*****

Thanks
Unknown User
2011-01-05 15:02:35
nier uz ka
Unknown User
2011-01-17 12:04:55
you're torrents detail style it's very good!

how to make?
Unknown User
2011-01-20 15:26:46
"Majestic, post: 69648":
you're torrents detail style it's very good!how to make?
Thx.  ;)

Is very easy to do  ;)
Unknown User
2011-01-20 15:41:46
it is done using tables...
Unknown User
2011-01-20 17:00:20
this is my torrent detail test, you can look this and help me for bad codage?

<?php
//

//  TorrentTrader v2.x

// This file was last updated: 28/November/2007 by TorrentialStorm

//

// http://www.torrenttrader.org

//

//

require_once("backend/functions.php");

require_once("backend/BDecode.php");

require_once("backend/parse.php");//replace with parse later

dbconn();

$torrent_dir = $site_config["torrent_dir"];

$nfo_dir = $site_config["nfo_dir"];

//check permissions

if ($site_config["MEMBERSONLY"]){

loggedinonly();

if($CURUSER["view_torrents"]=="no")

show_error_msg("Error","You do not have permission to view torrents",1);

}

//************ DO SOME "GET" STUFF BEFORE PAGE LAYOUT ***************

$id = (int) $_GET["id"];

$scrape = (int)$_GET["scrape"];

if (!is_valid_id($id))

show_error_msg("ERROR","Thats not a valid ID",1);

//GET ALL MYSQL VALUES FOR THIS TORRENT

$res = mysql_query("SELECT torrents.anon, torrents.thanks, torrents.seeders, torrents.banned, torrents.leechers, torrents.info_hash, torrents.filename, torrents.nfo, torrents.last_action, torrents.numratings, torrents.name, torrents.owner, torrents.save_as, torrents.descr, torrents.synopsis, torrents.movie, torrents.screenshot, torrents.visible, torrents.size, torrents.added, torrents.views, torrents.hits, torrents.times_completed, torrents.id, torrents.type, torrents.external, torrents.image1, torrents.image2, torrents.announce, torrents.numfiles, torrents.freeleech, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating, torrents.numratings, categories.name AS cat_name, torrentlang.name AS lang_name, torrentlang.image AS lang_image, categories.parent_cat as cat_parent, users.username, users.privacy FROM torrents LEFT JOIN categories ON torrents.category = categories.id LEFT JOIN torrentlang ON torrents.torrentlang = torrentlang.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.id = $id") or die(mysql_error());

$row = mysql_fetch_array($res);

$moderator = $CURUSER["edit_torrents"] == "yes";

//DECIDE IF TORRENT EXISTS

if (!$row || ($row["banned"] == "yes" && !$moderator))

show_error_msg("Error","" . TORRENT_NOT_FOUND . "",1);

//torrent is availiable so do some stuff

if ($_GET["hit"]) {

mysql_query("UPDATE torrents SET views = views + 1 WHERE id = $id");

header("Location: torrents-details.php?id=$id");

die;

}

stdhead("Details for torrent \"" . $row["name"] . "\"");

if ($CURUSER["id"] == $row["owner"])

$owned = 1;

else

$owned = 0;

if ($CURUSER["edit_torrents"]=="yes")

$owned = 1;

//take rating

if ($_GET["takerating"] == 'yes'){

$rating = (int)$_POST['rating'];

if ($rating <= 0 || $rating > 5)

show_error_msg("Rating Error", "Invalid rating",1);

$res = mysql_query("INSERT INTO ratings (torrent, user, rating, added) VALUES ($id, " . $CURUSER["id"] . ", $rating, '".get_date_time()."')");

if (!$res) {

if (mysql_errno() == 1062)

show_error_msg("Rating Error", "You have already rated this torrent.",1);

else

show_error_msg("Rating Error", "A Unknown Error, contact staff",1);

}

mysql_query("UPDATE torrents SET numratings = numratings + 1, ratingsum = ratingsum + $rating WHERE id = $id");

show_error_msg(".RATING.", "".RATING_THANK."<BR><BR><a href=torrents-details.php?id=$id>" . BACK_TO_TORRENT . "</a>");

}

//take comment add

if ($_GET["takecomment"] == 'yes'){

loggedinonly();

$commentbody = $_POST['body'];

if (!$commentbody)

show_error_msg("Error","You did not enter anything!",1);

mysql_query("UPDATE torrents SET comments = comments + 1 WHERE id = $id") or die(mysql_error());

mysql_query("INSERT INTO comments (user, torrent, added, text) VALUES (".$CURUSER["id"].", ".$id.", '" .get_date_time(). "', " . sqlesc($body).")") or die(mysql_error());

if (mysql_affected_rows() == 1)

show_error_msg("".COMPLETED."","".COMMENT_ADDED."",0);

else

show_error_msg("Error","Unable to add comment",0);

}//end insert comment

//START OF PAGE LAYOUT HERE

$char1 = 50; //cut length

$shortname = CutName(htmlspecialchars($row["name"]), $char1);

begin_frame("" . TORRENT_DETAILS_FOR . " \"" . $shortname . "\"");

echo "<div align=right>[<a href=report.php?torrent=$id><B>" . REPORT_TORRENT . "</B></a>]&nbsp;";

if ($owned)

echo "[<a href=torrents-edit.php?id=$row[id]><B>".EDIT_TORRENT."</B></a>]";

echo "</div>";

$previd = mysql_query("SELECT id, name FROM torrents WHERE id < $id ORDER BY id DESC LIMIT 1");

$prev = mysql_fetch_row($previd);

$previd = $prev[0];

$prevname = htmlspecialchars($prev[1]);

$nextid = mysql_query("SELECT id, name FROM torrents WHERE id > $id ORDER BY id ASC LIMIT 1");

$next = mysql_fetch_row($nextid);

$nextid = $next[0];

$nextname = htmlspecialchars($next[1]);

echo "<table border=0 width=100%><tr>";

if ($previd)

echo "<td align=center><a href='torrents-details.php?id=$previd'>[Torrent Pr
Unknown User
2011-02-13 08:33:10
Merci   :rolleyes:
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