Do not remember me!
/ / / Torrent plugins

Torrent plugins

Please, how can I install it? http://www.dle9.com/moduli/besplatnye-moduli/3470-dle-psevdo-treker.html I need a torrent plugins. Added by: in PHP Questions on
The installation steps is included within the package, so here is English translation for those steps of installation

===========================================================
1) - Rename the folder "{€€’…€}" inside folder "templates" to your actual template name
- Upload all files to your server
===========================================================
2) Open /engine/modules/functions.php and

Find:
if( ! defined( 'DATALIFEENGINE' ) ) {
die( "Hacking attempt!" );
}

Add below
include(ENGINE_DIR.'/modules/torrent/psxtorrent.php');

Find and REMOVE:
function show_attach($story, $id, $static = false) {
global $db, $config, $lang, $user_group, $member_id;

$find_1 = array();
$find_2 = array();
$replace_1 = array();
$replace_2 = array();

if( $static ) {

if( is_array( $id ) and count( $id ) ) $where = "static_id IN (" . implode( ",", $id ) . ")";
else $where = "static_id = '".intval($id)."'";

$db->query( "SELECT id, name, onserver, dcount FROM " . PREFIX . "_static_files WHERE $where" );

$area = "&area=static";

} else {

if( is_array( $id ) and count( $id ) ) $where = "news_id IN (" . implode( ",", $id ) . ")";
else $where = "news_id = '".intval($id)."'";

$db->query( "SELECT id, name, onserver, dcount FROM " . PREFIX . "_files WHERE $where" );

$area = "";

}

while ( $row = $db->get_row() ) {

$size = formatsize( @filesize( ROOT_DIR . '/uploads/files/' . $row['onserver'] ) );
$row['name'] = explode( "/", $row['name'] );
$row['name'] = end( $row['name'] );

$find_1[] = '[attachment=' . $row['id'] . ']';
$find_2[] = "#\[attachment={$row['id']}:(.+?)\]#i";

if ( ! $user_group[$member_id['user_group']]['allow_files'] ) {

$replace_1[] = "<span class=\"attachment\">{$lang['att_denied']}</span>";
$replace_2[] = "<span class=\"attachment\">{$lang['att_denied']}</span>";

} elseif( $config['files_count'] == 'yes' ) {

$replace_1[] = "<span class=\"attachment\"><a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >{$row['name']}</a> [{$size}] ({$lang['att_dcount']} {$row['dcount']})</span>";
$replace_2[] = "<span class=\"attachment\"><a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >\\1</a> [{$size}] ({$lang['att_dcount']} {$row['dcount']})</span>";

} else {

$replace_1[] = "<span class=\"attachment\"><a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >{$row['name']}</a> [{$size}]</span>";
$replace_2[] = "<span class=\"attachment\"><a href=\"{$config['http_home_url']}engine/download.php?id={$row['id']}{$area}\" >\\1</a> [{$size}]</span>";

}

}

$db->free();

$story = str_replace ( $find_1, $replace_1, $story );
$story = preg_replace( $find_2, $replace_2, $story );

return $story;

}

============================================================
3) Open /engine/inc/files.php
Find:
if( ! defined( 'DATALIFEENGINE' ) ) {
die( "Hacking attempt!" );
}

Add Below:
require_once ENGINE_DIR . '/classes/torrent.class.php';
include_once(ENGINE_DIR . '/data/dcls.config.php');

Find:
      if( @file_exists( ROOT_DIR . "/uploads/files/" . $file_prefix . $image_name ) ) {

Add Below:
if ($dclsconfig[vkl] == "on" ){ //  check if the module is enable
$fidname = '.torrent';
$proverka = strpos($image_name, $fidname);
if ($proverka !== false) {
$torrent = new Torrent( ROOT_DIR . "/uploads/files/" . $file_prefix . $image_name );
if ( $errorss = $torrent->errors() ) { // error checking and if they have nothing do

} else { // if there is no error then do your job with the torrent
if ( $dclsconfig[retreck] == "on" ) { // check whether the need to add tracker
$massivtreck = array_merge_recursive( $torrent->announce() , explode( "," , str_replace( " ", "", $dclsconfig[retrecker] ) ) );
$torrent->announce(false);
$torrent->announce($massivtreck); // add your tracker
}
if ( $dclsconfig[trcomment] = "on" ){ // check whether you need to add comment
if ( $news_id == 0 ) {
$commenttr = 10101 ;
$torrent->comment($commenttr); // add comment
} else {
$commenttr = str_replace("%link%", $config[http_home_url] . "index.php?newsid=" . /*$_REQUEST['news_id']*/$news_id, $dclsconfig[commenttr]); // forming comment
$torrent->comment($commenttr); // add comment
}
}
$torrent->save( ROOT_DIR . "/uploads/files/" . $file_prefix . $image_name ); // Save the changes in torrent
}
}
}

===========================================================
4) Open /engine/download.php
Find:
$id = intval ( $_REQUEST['id'] );

Replace with:
if ($_REQUEST['idd'] == "" ){
$id = intval ( $_REQUEST['id'] );
} else {
$idd = base64_decode($_REQUEST['idd']);
$id = intval ( $idd );
}

===========================================================
5) Open the file and main.tpl before </head> insert
<script type="text/javascript" src="{THEME}/dcls.js"></script>

===========================================================
6) Open your style.css file and insert the end of the file
    /*  dcls type  */
.btTbl {
BORDER-RIGHT: #98aab1 0px solid;
BORDER-TOP: #98aab1 0px solid;
BORDER-LEFT: #98aab1 0px solid;
BORDER-BOTTOM: #98aab1 0px solid;
BACKGROUND-COLOR: #6699cc
}
.row1 {
BACKGROUND-COLOR: #f4f8fb
}
.row3 {
BACKGROUND-COLOR: #AACCFF;
font-weight: bold;
}
.gen {
FONT-SIZE: 10pt
}
.genmed {
FONT-SIZE: 9pt
}
.gensmall {
FONT-SIZE: 8pt
}
.spoiler-wrap {
CLEAR: both;
BORDER-RIGHT: #c3cbd1 1px solid;
BORDER-TOP: #c3cbd1 1px solid;
BACKGROUND: #AACCFF;
MARGIN: 6px auto;
BORDER-LEFT: #c3cbd1 2px solid;
WIDTH: 95%;
BORDER-BOTTOM: #c3cbd1 1px solid;
}

.spoiler-wrap-title a{
color: #3030BB;
}
.spoiler-wrap-title a:visited{
color: #3030BB;
}
.spoiler-wrap-title a:active{
color: #3030BB;
}


.spoiler-head {
PADDING-RIGHT: 14px;
PADDING-LEFT: 14px;
FONT-SIZE: 11px;
PADDING-BOTTOM: 3px;
MARGIN-LEFT: 6px;
LINE-HEIGHT: 15px;
PADDING-TOP: 1px;
}
.spoiler-body {
PADDING-RIGHT: 6px;
BORDER-TOP: #c3cbd1 1px solid;
DISPLAY: none;
PADDING-LEFT: 6px;
BACKGROUND: #f5f5f5;
PADDING-BOTTOM: 2px;
PADDING-TOP: 1px;
}

.nik_images {max-width:150px; vertical-align: bottom; margin-top:-6px}

/* search rutor */
.restable {


border-left: 1px solid #ebebeb;
border-right: 1px solid #ebebeb;
}

.restable th {
width: 100px;
padding: 6px;
text-align: left;
}

.restable thead tr {

cursor: pointer;
background: #AACCFF;
border: 1px solid #98aab1;
border-radius: 5px;
color: #fff;
text-shadow: 1px 1px 2px black;
}

.restable a {
text-decoration:none;
}

.restable a:hover {
text-decoration:underline;
}

.restable tr:nth-child(2n) {
background-color:#f7f7f7;
}

.restable tr {
background-color:#fefefe;
}

.restable tbody tr:hover {
background-color:#e7e7e7;
}

.restable td {
padding:6px;
vertical-align:middle;
border-bottom: 1px solid #cccccc;
color: #333333;
font-size:12px;
}

#pselect {
display: inline;
padding: 5px 12px;
background: #ebebeb;
border-bottom: 1px solid rgba(0, 0, 0, 0.251);
cursor: pointer;
border-radius: 5px;
color: #808080;
text-shadow: white 0px 1px 2px;
margin: 3px;
font-size: 15px;
}

#pselect.active, #pselect:hover {
background: #97d234 !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.251);
text-shadow: 1px 1px 2px black;
color: #fff !important;
}

.restable th {

white-space: inherit;
}

.restable th > span {
background: url("../images/torrent/nosorted.gif") 0px 50% no-repeat;
padding-left: 8px;
}
.restable .up > span {
background: url("../images/torrent/down.gif") 0px 50% no-repeat;
padding-left: 8px;
}
.restable .down > span {
background: url("../images/torrent/up.gif") 0px 50% no-repeat;
padding-left: 8px;
}

.restable b {
background: #e4ffb5;
}

.restable a:hover {
color: #5f8f0b;
}

==============================================================
7) Run Query to the database (usually you can go to PHPMyAdmin and click on "SQL" tab)
INSERT INTO `PREFIX_admin_sections` (`name`, `title`, `descr`, `icon`, `allow_groups`) VALUES
('dclsinc', 'Working with DCLS and Torrent files', 'Module to display the contents dcls and torrent files', 'dc.png', '1');

where "PREFIX" is replaced by the prefix of your database. (default is "dle" so you should use "dle_admin_sections")
==============================================================
8) Go to Admin "Module settings" of "Working with DCLS and Torrent files" and enable "Download torrent files and dcls" Answered by: dlefaq



+4

Comments 3

  1. Admin
    0
    Admin Currently Offline → 9 February 2015 01:49

    Thank you are the best!
     2 |  3
  2. djsoftonic
    0
    djsoftonic Currently Offline → 14 February 2015 04:43

    Hi,
    It's nice one. I downloaded it form the link and then I followed the steps in you told in this page but nothing is matching, not any folder name or nothing else. Please help me in it. I am looking for this since long time. I am using it on DLE 10.3
    Please help.
     N/A |  1
  3. dlefaq
    +1
    dlefaq Currently Offline → 14 February 2015 09:23

    djsoftonic,

    I think you are confusing the topic...the question was asking how to installed this module, which I found the instruction within the module itself, so what I did was translated that instruction from russian to English...

    Working or not working is not a question asking here, also you need to know this module was released as "beta" for DLE 8.x (according to the original topic at http://www.dle9.com/moduli/besplatnye-moduli/3470-dle-psevdo-treker.html)

    So if you want to use this module for productive website and real module which working properly then you should get the real module not 6 years old module which was built for DLE 8.x.

    The working module can be found in Torrent Tracker for DLE
     2 |  102

Information

Would you like to leave your comment? Please Login to your account to leave comments. Don't have an account? You can create a free account now.