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

Torrent Images — 2011-01-05 15:02:35 in v2 Only Mods Complete
nier uz ka
Torrent Images — 2011-01-03 22:31:55 in v2 Only Mods Complete
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);
Torrent Images — 2010-12-12 10:40:05 in v2 Only Mods Complete
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))).")");
Torrent Images — 2010-12-12 10:27:32 in v2 Only Mods Complete
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

Warned Level — 2010-04-21 12:45:05 in v2 Only Mods Complete
Thx. ArcticWolf
Warned Level — 2010-04-20 12:33:24 in v2 Only Mods Complete
Hi, I find this mod in TBDEV.

I tried to change the torrenttrader, but failed to do

Code:

Anyways, here we go

ALTER TABLE `users` ADD `timeswarned` int(10) NOT NULL default '0';
Now go to userdetails.php



and after




print("<tr><td class=rowhead>Class</td><td align=left>" . get_user_class_name($user["class"]) . "</td></tr>\n");







add this





//===Warned Progress Bar by TripleH @ TBDEV.NET

$UserTimesWarned = $user["timeswarned"];



switch($UserTimesWarned)

{

  case 0:

  $warnedbar = "<img src=pic/warn_0.png>";

  break;



  case 1:

  $warnedbar = "<img src=pic/warn_1.png> - <b>30%</b>";

  break;



  case 2:

  $warnedbar = "<img src=pic/warn_2.png> - <b>60%</b>";

  break;



  case 3:

  $warnedbar = "<img src=pic/warn_3.png - <b>90% - <font class=small>Be careful! One more warning and your account will be disabled</font></b>";

  break;



  case ($UserTimesWarned > 4):

  $warnedbar = "<img src=pic/warn_max.png> - <b>100% - Disabled</b>";

  break;

}



print("<tr><td class=rowhead>Warned level</td><td align=left>$warnedbar <font class=small>(".$UserTimesWarned." warning" . ($UserTimesWarned > 1 ? "s" : "") . ")</font></td></tr>\n");

//===Warned Progress Bar by TripleH @ TBDEV.NET







And now not understand





Now go over to modtask.php, and search for





$updateset[] = "warned = 'yes'





and replace it with





$updateset[] = "warned = 'yes', timeswarned = timeswarned+1";





where modtask on torrenttrader



Now, in order to auto disable the account when a user gets the 4th warning, add this part into cleanup.php





//=== Warned Level Mod - TripleH @ TBDev.Net (Thanks arcticwolf44 for this piece of code)

$res = mysql_query("SELECT id, modcomment FROM users WHERE timeswarned = 4 AND enabled = 'yes'") or sqlerr(__FILE__, __LINE__);

if (mysql_num_rows($res) > 0)

{

$dt = sqlesc(get_date_time());

while ($arr = mysql_fetch_assoc($res))

{



$modcomment = htmlspecialchars($arr["modcomment"]);

$modcomment = gmdate("Y-m-d") . " - Auto Disabled for having over 3 Warning by -AutoSystem.\n". $modcomment;

$modcom = sqlesc($modcomment);



mysql_query("UPDATE users SET enabled='no', modcomment = $modcom WHERE id = $arr[id]") or sqlerr(__FILE__, __LINE__);

}

}

//===





And that's all

NOTE: In short time I will add the script which auto disables the user, it's basically just a condition which checks if the user has more than 3 warnings -> set enabled = 'no';



[url="http://www.tbdev.net/index.php?app=core&module=attach&section=attach&attach_id=6699"]Images[/url]

Mod Note: Please give credit to original author.
Great work this mod works fine

small correction:

<a href=\"java script:popusers('userfind_to_nick.php');\">Find a NickName</a>");

there must be

<a href=\"javascript:popusers('userfind_to_nick.php');\">Find a NickName</a>");
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