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
[ADDON] Recommended Torrents
Controls ·  Search New posts · Mark unread

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

Unknown User
2007-10-09 11:28:27
####################################################
##
## MOD Title: Recommendet Torrents
##
## MOD Author: Sk@yver
##
## MOD Description: This MOD will add the ability to
## recommend torrents and show
## recommended or top 10 torrents
## in torrent browse page.
##
## MOD Required Settings: NO
##
## MOD Compatibility: TTv2.x
## Support multilanguage: Yes
## Installation Level: Easy
## Installation Time: 5min.
## SQL changes: YES
##
## Files To Edit: 5
## languages/english.lang #Or your language
## torrents.php
## torrents-edit.php
## account.php
## backend/config.php
##
## Files To Upload: 0
##
####################################################

MOD instruction is in the Attachment.



SQL

ALTER TABLE `torrents` ADD `recommended` enum('yes','no') NOT NULL default 'no';
ALTER TABLE `users` ADD `recommended` enum('rcm','top','hide') NOT NULL default 'rcm';
open torrents.php

find:

stdhead("" . BROWSE_TORRENTS . "");

add after

/// START RECOMMENDED TORRENTS ///
if ($site_config['RECOMMENDED_ON'] AND $count){

if($show == "recommended"){
    $CURUSER["recommended"]="rcm";
}

if($CURUSER["recommended"]=="top" OR $show == "top10"){
    $top10 = mysql_query("SELECT torrents.id, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id ORDER BY seeders + leechers DESC LIMIT 10") or die(mysql_error());
    if(mysql_num_rows($top10) > 0){
    begin_frame("" . TOP_10 . "");
        echo "<div align=center><a href=torrents.php?show=recommended><b>" . SHOW_RECO . "</b></a></div><br>";
        torrenttable($top10);
    end_frame();
    }
    $CURUSER["recommended"]="top10";;
}

if ($CURUSER["recommended"]=='rcm'){
    $recom = mysql_query("SELECT torrents.id, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE torrents.recommended='yes'") or die(mysql_error());
    if(mysql_num_rows($recom) > 0){
    begin_frame("" . RECO_TOR . "");
        echo "<div align=center><a href=torrents.php?show=top10><b>" . SHOW_TOP_10 . "</b></a></div><br>";
        torrenttable($recom);
    end_frame();
    }
}
}
/// END RECOMMENDED TORRENTS ///

open torrents-edit.php

find

$updateset[] = "freeleech = '".$_POST["freeleech"]."'";

add after

/// START RECOMMENDED TORRENTS ///
$updateset[] = "recommended = '" . ($_POST["recommended"] ? "yes" : "no") . "'";
// END RECOMMENDED TORRENTS ///
find

echo "<tr><td align=right><B>Free Leech: </b></TD><TD><input type="checkbox" name="freeleech"" . (($row["freeleech"] == "1") ? " checked="checked"" : "" ) . " value="1" />Leeching is free? (Only Uploading Counts)<br>";
}

add after

/// START RECOMMENDED TORRENTS ///
if ($site_config['RECOMMENDED_ON'] AND $CURUSER["class"] > 4){
    echo "<tr><td align=right><B>".RECO_TOR.": </b></TD><TD><input type="checkbox" name="recommended"" . (($row["recommended"] == "yes") ? " checked="checked"" : "" ) . " value="1" /> " . SHOW_IN_RECÎ . "<br>";
}
// END RECOMMENDED TORRENTS ///

open account.php

find

print("<TR><TD align=right class=table_col1 valign=top><B>Category Filter: </B></td><TD align=left class=table_col1><i>The system will only display the following categories when browsing (uncheck all to disable filter).</i><BR>".$categories."</td></tr>");

add after

/// START RECOMMENDED TORRENTS ///
if ($site_config['RECOMMENDED_ON']){
    print("<TR><TD align=right class=table_col1><B>".RECO_TOR.":</b></td><TD align=left class=table_col1><input type=radio name=reco". ($CURUSER["recommended"] == "rcm" ? " checked" : "") . " value=rcm>".RECO_TOR."<input type=radio name=reco". ($CURUSER["recommended"] == "top" ? " checked" : "") . " value=top>".TOP_10."<input type=radio name=reco". ($CURUSER["recommended"] == "hide" ? " checked" : "") . " value=hide>".HIDE."</td></tr>");
}
/// END RECOMMENDED TORRENTS ///

find

$pmnotif = $_POST["pmnotif"];

add after

/// START RECOMMENDED TORRENTS ///
$reco = $_POST["reco"];
/// END RECOMMENDED TORRENTS ///

find

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

add after

/// START RECOMMENDED TORRENTS ///
$updateset[] = "recommended = ".sqlesc($reco);
/// END RECOMMENDED TORRENTS ///

open backend/config.php

add anywhere

/// START RECOMMENDED TORRENTS ///
$site_config['RECOMMENDED_ON'] = true; //enable/disable Recommended Torrents
$site_config['RECO_CLASS'] = 6; /// Level of users to recommende torrent (5=MOD) (6=SUPER MOD)
// END RECOMMENDED TORRENTS ///

finish lolll

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=1666"]Recommended_torrents_ADDON.zip[/url]

[url="http://devscorner.xyz/applications/core/interface/file/attachment.php?id=7180"]recommendedtorrents_block.php[/url]
Browse_Torrents.jpg
Browse_Torrents.jpg
Edit_Torrent.jpg
Edit_Torrent.jpg
Account_Setings.jpg
Account_Setings.jpg
Recommended_torrents_ADDON.zip
Download
recommendedtorrents_block.php
Download
Unknown User
2007-10-09 11:56:08
This seems like a great idea, I just have a question though ...

When adding a new torrent I see the option is available to set it as recommended - Most users will of course recommend their own torrents, so my question is what will be the result if all users post their torrents as recommended?
Unknown User
2007-10-09 12:25:14
MissDanni after installing this Addon.

In file backend/config.php

edit line:

$site_config['RECO_CLASS'] = 6;

confgure who is recomende torrents;

7=Administrator

6=Super Moderators and Administrator

5=Moderators, Super Moderator and Administrator

4=Uploader, Moderators, Super Moderator and Administrator (not recomended)

Defilt this mod configured to onli Super Moderator and Administrator recommende torent.

Sorry for my BAD English
Untitled.png
Untitled.png
Unknown User
2007-10-10 03:02:24
This is nice. I'm working on something based on a 1.x mod that was posted here (which I can't find..). Perhaps I'll integrate this into it.
Unknown User
2007-12-16 01:29:56
Link for V1.x ?
Unknown User
2008-01-29 19:51:48
work this one on windows ? is this correct ?

[url="http://img155.imageshack.us/my.php?image=zwischenablage01vr7.jpg"][/url]
Unknown User
2008-03-04 07:07:48
in languages/english.lang edit

define("SHOW_IN_REC
Unknown User
2008-03-20 09:33:47
well can you make a recommended torrents but not to show the name of the torrent , only the poster instead of the name in recommended can u?
Unknown User
2008-03-23 15:26:19
le module ne fonctione pas , rien ne saffiche et tout a
Unknown User
2008-08-02 19:04:29
"tedmin, post: 40254":
well can you make a recommended torrents but not to show the name of the torrent , only the poster instead of the name in recommended can u?

I think you mean like this:


In index.php Find:

//Site Notice
if ($site_config['SITENOTICEON']){
begin_frame("" . NOTICE . "");
echo stripslashes($site_config['SITENOTICE']);
end_frame();
}

Before Add:
/// Recommended torrents images
begin_frame("Recommended");
$news = mysql_query("SELECT id, name, added, image1, image2 FROM torrents WHERE banned ='no' AND visible='yes' AND torrents.recommended='yes' ORDER BY torrents.id DESC LIMIT 6"); ///limit number of images

if (mysql_num_rows($news) > 0) {
print("<table align=center cellpadding=0 cellspacing=0 width=100% border=0><tr>");
while ($row2 = mysql_fetch_array($news, MYSQL_NUM)) {
$tor = $row2['0'];
$altname = $row2['1'];
$where = "WHERE banned = 'no' AND visible='yes' AND torrents.id='$tor'";
$res = mysql_query("SELECT torrents.id, torrents.image1, torrents.image2, torrents.added, categories.name AS cat_name FROM torrents LEFT JOIN categories ON torrents.category = categories.id $where $orderby $limit");
$row = mysql_fetch_array($res);
$cat = $row['cat_name'];
$img1 = "<a href='$site_config[SITEURL]/torrents-details.php?id=$row[id]'><img border='0'
src='uploads/images/$row[image1]' alt="$altname / $cat" width=90></a>";
if ($row["image1"] != ""){
print("<td align=center>". $img1 ."<BR></td><td>&nbsp;</td>");
}
}
print("</tr></table>");
}
end_frame();
/// end recommended torrent images

This will add a frame on the index page. To use a block instead just change begin_frame to begin_block and end_frame to end_block
Unknown User
2008-08-16 21:03:02
work great ( 2.04) many thanks for your great work :blink:
Unknown User
2008-08-20 18:47:26
Thank you for this mode nice, but I have a small question:

Can not put it in torrents-upload the same system check when it is directly upload checked if it wants to recommend?
Unknown User
2008-10-18 23:43:07
thank you, exellent work. I also wanted to know if it was possible to recommend in index.php in scrolling.

his would be just one more has an excellent mods ;)
Unknown User
2008-11-08 08:25:09
very nice mod! can we scrolling?............that will be awesome!..............and how can we let the uploaders or other classes give the capability to recommende??

thnx and sory for my bad english!
Unknown User
2008-11-08 12:41:24
if i remember correctly there is a part that you had to add to your config.php that allows you to set the class for the staff or users who can recommend torrents
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