CMS MADE SIMPLE FORGE

Uploads

 

[#4155] Single Mode

avatar
Created By: Darren Kierman (kierweb)
Date Submitted: Wed Oct 07 03:27:17 -0400 2009

Assigned To:
Version: 1.9.3
CMSMS Version: None
Severity: Major
Resolution: None
State: Open
Summary:
Single Mode
Detailed Description:
It appears that the icon and size variables do not work when using
single/detailed mode.


History

Comments
avatar
Date: 2009-10-09 07:36
Posted By: Darren Kierman (kierweb)

I manged to fix doing the following (hopefully you can adjust this in the SVN!):

add

$row->size = intval($data['upload_size'] / 1024.0 + 0.5);

before 

$row->category = $category['upload_category_name'];


and then replace

$row->filetype = $this->_GetFiletype( $data['upload_name'] );
if( $row->filetype !== false )
        {
                $row->iconurl = $imgpath.$filetype['image'];
        }
else
        {
                $onerow->iconurl = $imgpath.'unknown.png';
        }


with

                    // filetype
$filetype = $this->_GetFileType(
$data['upload_name'] );
                                if( $filetypes != '' )
                                        {
$res = array_search(
$filetype['name'], explode(',',$filetypes ) );
if( $res === NULL || $res ===
FALSE )
                                                        {
// we have found
a file that isn't a type we requested.
                                                                continue;
                                                        }
                                        }

$imgpath =
'modules/'.basename(dirname(__FILE__)).'/images/';
                                if( $filetype !== false )
                                        {
$row->iconurl =
$imgpath.$filetype['image'];
                                                $row->filetype = $filetype;
                                        }
                                else
                                        {
$row->iconurl =
$imgpath.'unknown.png';
                                        }

      
avatar
Date: 2009-10-09 07:42
Posted By: Darren Kierman (kierweb)

I better tell which file ....

action.detail.php

      
Updates

Updated: 2009-10-09 07:36
resolution_id: => 5