
  |
How do you rate my Hack |
  |
|
| 5 |
|
0% |
[ 0 ] |
| 4 |
|
0% |
[ 0 ] |
| 3 |
|
0% |
[ 0 ] |
| 2 |
|
0% |
[ 0 ] |
| 1 |
|
0% |
[ 0 ] |
 |
|
|
|
Total Votes : 0 |
|
  |
|
  |
 |
nomid
UL: 0 B DL: 0 B Ratio: -
Joined: 2007-09-17
Posts: 11
|
|
This my first mod.
That's mod viewing file list.
http://img219.imageshack.us/my.php?image=screenaf6.jpg
This mod show only new torrents file list. Not old where upped before this mod.
------------------------ UPDATE THIS AFTER INSTALL ------------------------
This fix show "View Files" links only new torrents.
attach_mod/displaying_torrent.php
FIND:
| Code:
|
// FILE LIST
$linkki2 = append_sid('viewfiles.php?t='.$attach_id)."\" onclick=\"window.open('".append_sid('viewfiles.php?t='.$attach_id)."', '_viewfiles', 'WIDTH=600,left=200,resizable=no,scrollbars=yes');return false;\" target=\"viewfiles\" onLoad=\"document.viewfiles.focus();";
// FILE LISTA
|
REPLACE:
| Code:
|
$sqlx = "select filename from ".TORRENT_FILES_TABLE." where torrent = $attach_id ";
if ( !($resultx = $db->sql_query($sqlx)) ) {
message_die(GENERAL_ERROR, 'Could not obtain current torrent file information', '', __LINE__, __FILE__, $sqlx);
}
$rowx = $db->sql_fetchrow($resultx);
$onko_lista = ($rowx['filename']) ;
$files_true = 1;
if ( $onko_lista == "" )
{
$linkki2 = "";
$files_true = 0;
}
if ( $files_true == 1 )
{
$linkki2 = append_sid('<br /><br /><a href="viewfiles.php?t='.$attach_id)."\" onclick=\"window.open('".append_sid('viewfiles.php?t='.$attach_id)."', '_viewfiles', 'WIDTH=600,left=200,scrollbars=yes,buttons=no,toolbar=no,location=no,menubar=no,resizable=no,directories=no,fullscreen=no,dependent=no');return false;\" target=\"viewfiles\" onLoad=\"document.viewfiles.focus();" .'" class="genmed"><B>View Files</B></a>';
}
|
templates/subSilver/viewtopic_attach_body.tpl
FIND:
| Code:
|
<!-- // FILE LIST -->
<br /><br /><a href="{FILELIST_LINK}" class="genmed"><B>View Files</B></a></td>
|
Replace with
| Code:
|
<!-- // FILE LIST -->
<br /><br />{FILELIST_LINK}</td>
|
------------------------ UPDATE END ------------------------
| Description: |
|
 Download |
| Filename: |
FileList_mod.rar |
| Filesize: |
6.26 KB |
| Downloaded: |
184 Time(s) |
Last edited by nomid on 05-23-2008 10:10; edited 1 time in total
|
|
|
|
|
|
|
 |
 |
 |
 |
  |
|
  |
 |
Quake

Site Admin

UL: 4 MB DL: 2 KB Ratio: 2277.13
Joined: 2006-01-16
Posts: 486
|
|
I've tested this mod and it does work to get the files. But, however it does not capture the size of the files. If I correct this mod I will post the findings. If someone has already figured how to fix that part of it. Please post the findings.
Great Mod. Much needed.
Thanks.
Cleaned up;
viewfiles_body.tpl
REPLACE ALL
| Code:
|
<table width="100%" border="0" cellpadding="2" cellspacing="1" class="btTbl" align="center">
<tr class="row3">
<td colspan="3" class="gen" align="center" style="padding: 3px"><b> {TOR_NAME} {LATAUS_LINKKI}<b>Download</b></b></td>
</tr>
<!-- BEGIN grouprow -->
<tr class="row1">
<td class="genmed" width="80%"> {grouprow.FILE_NAME} </td>
<td class="genmed" align="center"> {grouprow.FILE_SIZE}</span></td>
</tr>
<!-- END grouprow -->
<tr class="row3">
<td colspan="3" class="gen" align="center" style="padding: 3px"></td>
</tr>
</table>
|
To edit the size of the popup
#
#-----[ OPEN ]---------------------------------------------
#
attach_mod/displaying_torrent.php
FROM
| Code:
|
// FILE LIST
$linkki2 = append_sid('viewfiles.php?t='.$attach_id)."\" onclick=\"window.open('".append_sid('viewfiles.php?t='.$attach_id)."', '_viewfiles', 'WIDTH=600,left=200,resizable=no,scrollbars=yes');return false;\" target=\"viewfiles\" onLoad=\"document.viewfiles.focus();";
// FILE LISTA
$template->assign_vars(array('FILELIST_LINK' => $linkki2));
|
TO
| Code:
|
// FILE LIST
$linkki2 = append_sid('viewfiles.php?t='.$attach_id)."\" onclick=\"window.open('".append_sid('viewfiles.php?t='.$attach_id)."', '_viewfiles', 'WIDTH=600,HEIGHT=300,left=200,resizable=no,scrollbars=yes');return false;\" target=\"viewfiles\" onLoad=\"document.viewfiles.focus();";
// FILE LISTA
$template->assign_vars(array('FILELIST_LINK' => $linkki2));
|
Editing the Size WIDTH=600,HEIGHT=300
Good size: WIDTH=400,HEIGHT=200
|
|
|
|
|
|
|
 |
|