XFileSharing Pro - Torrents Mod

Message
Author
afdah
Posts: 147
Joined: Jan 27, 2012 2:23 pm

Torrents Mod

#1 Postby afdah » Oct 23, 2012 11:37 am

torrents are published by default.
how do i disable this?

afdah
Posts: 147
Joined: Jan 27, 2012 2:23 pm

#2 Postby afdah » Oct 23, 2012 2:23 pm

i found the solution.

in file \cgi-bin\Torrents\plugins\Bitflu\00_StorageVFS.pm

change the below code

Code: Select all

   my $xfile = {file_tmp=>$file, file_name_orig=>$fname, file_public=>1, torrent=>1, sid=>$sid};
   # --------------------
   $xfile = &XUpload::ProcessFile($xfile,{ip=>'2.2.2.2',fld_name=>$fld_name});
   # --------------------
   &logg("ProcessTFile Error: $xfile->{file_status}") if $xfile->{file_status};


to the code below

Code: Select all

   my $xfile = {file_tmp=>$file, file_name_orig=>$fname, file_public=>0, torrent=>1, sid=>$sid};
   # --------------------
   $xfile = &XUpload::ProcessFile($xfile,{ip=>'2.2.2.2',fld_name=>$fld_name});
   # --------------------
   &logg("ProcessTFile Error: $xfile->{file_status}") if $xfile->{file_status};

randy
Posts: 321
Joined: Mar 13, 2012 7:00 pm

#3 Postby randy » Oct 24, 2012 11:07 pm

i was searching 1 year for it to disable it!!!

even sibsoft could not tell me :(

you're my hero :D

thank you so much!

afdah
Posts: 147
Joined: Jan 27, 2012 2:23 pm

#4 Postby afdah » Oct 24, 2012 11:35 pm

1 year? lol! we all know what kind of support sibsoft provide us. that's why the purpose of this forum. to support one another. :-)

randy
Posts: 321
Joined: Mar 13, 2012 7:00 pm

#5 Postby randy » Oct 24, 2012 11:40 pm

but I found out to disable make flash uploads public by default :D

took me some months :P

afdah
Posts: 147
Joined: Jan 27, 2012 2:23 pm

#6 Postby afdah » Oct 24, 2012 11:41 pm

lol! :-)

randy
Posts: 321
Joined: Mar 13, 2012 7:00 pm

#7 Postby randy » Oct 24, 2012 11:42 pm

yeah that code is not perfect and sibsoft should show more support for those questions because they are important!

afdah
Posts: 147
Joined: Jan 27, 2012 2:23 pm

#8 Postby afdah » Oct 24, 2012 11:43 pm

by the way, do your site use any video encoding mod?

randy
Posts: 321
Joined: Mar 13, 2012 7:00 pm

#9 Postby randy » Oct 24, 2012 11:44 pm

yes. they will also published by default I think! And I want to find out how to disable when copying files in my files not to show public also by default :(

afdah
Posts: 147
Joined: Jan 27, 2012 2:23 pm

#10 Postby afdah » Oct 24, 2012 11:51 pm

can email me using the email icon below?
i need to discuss with you something and i don't want to flood this forum with our discussion.

what do you mean by copying files in my files?

randy
Posts: 321
Joined: Mar 13, 2012 7:00 pm

#11 Postby randy » Oct 24, 2012 11:57 pm

ok updated my email. so everybody can send me email ;)

afdah
Posts: 147
Joined: Jan 27, 2012 2:23 pm

#12 Postby afdah » Oct 25, 2012 2:38 am

randy wrote:yes. they will also published by default I think! And I want to find out how to disable when copying files in my files not to show public also by default :(


in index.cgi, look for the below code.

Code: Select all

sub CloneFile
{
   my ($file,$fld_id) = @_;

   my $code = $ses->randchar(12);
   while($db->SelectOne("SELECT file_id FROM Files WHERE file_code=? OR file_real=?",$code,$code)){$code = $ses->randchar(12);}

   $db->Exec("INSERT INTO Files
        SET usr_id=?,
            srv_id=?,
            file_fld_id=?,
            file_name=?,
            file_descr=?,
            file_public=?,
            file_code=?,
            file_real=?,
            file_real_id=?,
            file_del_id=?,
            file_size=?,
            file_password=?,
            file_ip=INET_ATON(?),
            file_md5=?,
            file_spec=?,
            file_created=NOW(),
            file_last_download=NOW()",
         $ses->getUserId,
         $file->{srv_id},
         $fld_id||0,
         $file->{file_name},
         '',
         1,
         $code,
         $file->{file_real},
         $file->{file_real_id}||$file->{file_id},
         $file->{file_del_id},
         $file->{file_size},
         '',
         $ses->getIP,
         $file->{file_md5},
         $file->{file_spec}||'',
       );
   $db->Exec("UPDATE Servers SET srv_files=srv_files+1 WHERE srv_id=?",$file->{srv_id});
   return $code;
}


change to the below. noticed that i change from 1 to 0.

Code: Select all

sub CloneFile
{
   my ($file,$fld_id) = @_;

   my $code = $ses->randchar(12);
   while($db->SelectOne("SELECT file_id FROM Files WHERE file_code=? OR file_real=?",$code,$code)){$code = $ses->randchar(12);}

   $db->Exec("INSERT INTO Files
        SET usr_id=?,
            srv_id=?,
            file_fld_id=?,
            file_name=?,
            file_descr=?,
            file_public=?,
            file_code=?,
            file_real=?,
            file_real_id=?,
            file_del_id=?,
            file_size=?,
            file_password=?,
            file_ip=INET_ATON(?),
            file_md5=?,
            file_spec=?,
            file_created=NOW(),
            file_last_download=NOW()",
         $ses->getUserId,
         $file->{srv_id},
         $fld_id||0,
         $file->{file_name},
         '',
         0,
         $code,
         $file->{file_real},
         $file->{file_real_id}||$file->{file_id},
         $file->{file_del_id},
         $file->{file_size},
         '',
         $ses->getIP,
         $file->{file_md5},
         $file->{file_spec}||'',
       );
   $db->Exec("UPDATE Servers SET srv_files=srv_files+1 WHERE srv_id=?",$file->{srv_id});
   return $code;
}

randy
Posts: 321
Joined: Mar 13, 2012 7:00 pm

#13 Postby randy » Oct 27, 2012 5:47 pm

perfect man! thx


Return to “XFileSharing Pro”



Who is online

Users browsing this forum: No registered users and 0 guests