TorrentFlux.com Welcome, Guest. Please login or register.
02-09-2010, 03:11:13
Home Help Search Login Register donate
TorrentFlux Home | TorrentFlux Hosting

+  TorrentFlux Forums
|-+  Bugs, Fixes, and Feature Requests
| |-+  Feature Requests
| | |-+  [Req.:][TF-2.(0/1)] Checkboxes for Dirview
« previous next »
Pages: [1] Go Down Print
Author Topic: [Req.:][TF-2.(0/1)] Checkboxes for Dirview  (Read 2478 times)
mb.Tab
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 574


Gotta love my Avatar !!





View Profile WWW
« on: 03-02-2006, 14:44:22 »

Hi Folks.

I got a special request from one of our members who asked if it would be possible to have some checkboxes in the dir-view so one could easily select the files that will be deleted; so one doesnt have to delete one file after another....hope you got me....so please someone set this up Smiley


PS.: I attached a lil pic so u know what im talking about Wink

mb.Tab
Logged

IhatemyISP
Forum Code Monkey
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 841






View Profile WWW
« Reply #1 on: 03-02-2006, 14:58:12 »

Not an unreasonable request. I'm sure this could be added relatively easily.

I'll put in a vote to see this one done up.

Cheers.
Logged

Pentium III 667mhz | 155GB RAID 0 | 256MB RAM | Redhat 7.3 - 2.4.18-3 | Python 2.4.1 | PHP 5.1.4 (cgi-fcgi) | Lighttpd 1.4.11
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile
« Reply #2 on: 03-02-2006, 19:12:50 »

The multi torrent delete hack could be modified to do this easily enough.

Any chance of somewhere being setup where all these requests and noted and users can vote on to see whats most popular/wanted so people know what to spend their time on Wink
Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
IhatemyISP
Forum Code Monkey
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 841






View Profile WWW
« Reply #3 on: 03-02-2006, 21:39:16 »

The multi torrent delete hack could be modified to do this easily enough.

Any chance of somewhere being setup where all these requests and noted and users can vote on to see whats most popular/wanted so people know what to spend their time on Wink


It might possibly pop up sometime soon Wink
Logged

Pentium III 667mhz | 155GB RAID 0 | 256MB RAM | Redhat 7.3 - 2.4.18-3 | Python 2.4.1 | PHP 5.1.4 (cgi-fcgi) | Lighttpd 1.4.11
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile
« Reply #4 on: 03-03-2006, 13:41:47 »

Well here is something that'll work for TF2.1b2. Let me know if there is any problems with it as I've a fairly hacked up version of TF running right now.

First, add this to dir.php

Code
Added under
function ConfirmDelete(file)
{
   return confirm("You are about to delete: " + file)
}
 
function checkCheck(thisIn)
{
   var form = thisIn.form, i = 0;
   for(i=0; i < form.length; i++)
   {
       if( form[i].type == 'checkbox' && form[i].name != 'checkall')
       {
           form[i].checked = thisIn.checked;
       }
   }
}
 

Code
Added under
//get the real parentURL
if (preg_match("/^(.+)\/.+$/",$dir,$matches) == 1)
{
  $parentURL="dir.php?dir=" . urlencode($matches[1]);
}
 
/* --- Multi Delete Hack --- */
echo "<table cellpadding=2 width=740>";
echo '<form action="multi.php" method="post" name="multidir">';
echo '<input type="hidden" name="action" value="fileDelete" />';
echo '<tr><td colspan="3"><a href="'.$parentURL.'"><img src="images/up_dir.gif" width="16" height="16" title="'._BACKTOPARRENT.'" border=0>['._BACKTOPARRENT.']</a></td>';
echo '<td align="right"><a href="javascript:document.multidir.submit()" onclick="return ConfirmDelete(\'Multiple Files\')"><img src="images/delete_on.gif" title="Delete" border="0" height="16" width="16"></a><input type="checkbox" onclick="checkCheck(this);" /></td></tr>';
/* --- Multi Delete Hack --- */
 
You need to comment out the following line too.
echo "<table cellpadding=2 width=740>";
 


Then add the following in dir.php also. It's found in two places.
Code
/* --- Multi Delete Hack --- */
/* checkbox appended to line */
echo "<a href=\"dir.php?del=".urlencode($dir.$entry)."\" onclick=\"return ConfirmDelete('".addslashes($entry)."')\"><img src=\"images/delete_on.gif\" width=16 height=16 title=\""._DELETE."\" border=0></a><input type=\"checkbox\" name=\"file[]\" value=\"".urlencode($dir.$entry)."\">";
/* --- Multi Delete Hack --- */
 

Then in functions.php
Code
/* --- Multi Delete Hack --- */
/* Closing form tag added */
echo "[<a href=\"index.php\">"._RETURNTOTORRENTS."</a>]";
echo "</form>";
/* --- Multi Delete Hack --- */
 


Attached is multi.php (modified) which is needed to make this work. I'll be fixing dir.php so that the multi delete link will appear above the checkboxes later on and will edit the post then.
« Last Edit: 06-16-2006, 17:31:30 by ryaner » Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
Paczesiowa
Full Member
***
Offline Offline

TF Base: Linux 2.x
Posts: 177



View Profile
« Reply #5 on: 06-16-2006, 07:39:08 »

ryaner this works great for me but could u add button to select/unselect all?
when I download a movie (50 rar files) unrar it there are 51 files and I want to delete 50 of them. click click click click click click
(40 clicks later)
click click

so u see it's kind of pain in the [backside]:]
Logged

puttyman
Jr. Member
**
Offline Offline

Posts: 59



View Profile
« Reply #6 on: 06-16-2006, 09:28:07 »

That would be cool to have this hack .
Logged
ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile
« Reply #7 on: 06-16-2006, 17:32:11 »

Code modified there to have the checkbox. Let me know if it works as I may have missed something when updating it.
Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
Paczesiowa
Full Member
***
Offline Offline

TF Base: Linux 2.x
Posts: 177



View Profile
« Reply #8 on: 06-16-2006, 18:23:09 »

it's working:D

big tx!
Logged

ryaner
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 919





View Profile
« Reply #9 on: 06-16-2006, 18:41:56 »

Not a problem. Wasn't sure if it was going to work or not as I'm falling asleep here at my desk waiting on the rest of the days code to checkin to subversion. Damn slow dev box  :'(
Logged

SERVER: Debian Sarge 2.6.16| AMD XP2000+ | 1.5GB Ram  | 1.6T - Raid 5 | TF 2.1 | Apache 2.0.54 | PHP 4.3.10 | MySQL 4.1.11 | Mod/Hacks: XFER Transfer Stats/Multi Torrent Delete/Seed Time Hack/Ajax Details/Torrent Details/RSS Hack
Beowulf
Newbie
*
Offline Offline

Posts: 29



View Profile
« Reply #10 on: 02-04-2007, 15:10:38 »

Does anybody know, if this hack works with TF 2.3 final? Would be nice to know.
Logged
Qrome
Administrator
Hero Member
*****
Offline Offline

TF Base: Linux 2.x
Posts: 2783


TorrentFlux.com





View Profile
« Reply #11 on: 02-04-2007, 16:13:48 »

Does anybody know, if this hack works with TF 2.3 final? Would be nice to know.

TF 2.2 and 2.3 have directory listing with check boxes already
Logged

Check out the new FireFox Extension by IceWind for TorrentFlux called TorrentFlux Add -- right click on torrents and have them added to your TorrentFlux list.
Pages: [1] Go Up Print 
« previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by SMF 1.1.1 | SMF © 2006, Simple Machines LLC Powered by PHP