1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-10 16:46:50 +02:00

Upgrade Fixes - Legacy Download image paths and Download Category icons.

This commit is contained in:
Cameron
2016-12-05 15:41:19 -08:00
parent 11a90dcbbb
commit e6be1b8a2c
4 changed files with 56 additions and 13 deletions

View File

@@ -138,7 +138,7 @@ class download_cat_ui extends e_admin_ui
protected $fields = array(
'checkboxes' => array('title'=> '', 'type' => null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'),
'download_category_icon' => array('title'=> LAN_ICON, 'type' => 'icon', 'width' => '5%', 'thclass' => 'center','class'=>'center','writeParms'=>'glyphs=1' ),
'download_category_icon' => array('title'=> LAN_ICON, 'type' => 'method', 'width' => '5%', 'thclass' => 'center','class'=>'center','writeParms'=>'glyphs=1' ),
'download_category_id' => array('title'=> LAN_ID, 'type' => 'number', 'width' =>'5%', 'forced'=> TRUE),
'download_category_name' => array('title'=> LAN_TITLE, 'type' => 'text', 'inline' => true, 'width' => 'auto', 'thclass' => 'left', 'writeParms'=>'size=xxlarge'),
'download_category_sef' => array('title'=> LAN_SEFURL, 'type' => 'text', 'inline' => true, 'width' => 'auto', 'thclass' => 'left', 'writeParms'=>'size=xxlarge'),
@@ -196,6 +196,34 @@ class download_cat_form_ui extends e_admin_form_ui
break;
}
}
public function download_category_icon($curVal,$mode)
{
if(!empty($curVal) && strpos($curVal, chr(1)))
{
list($curVal,$tmp) = explode(chr(1),$curVal);
}
switch($mode)
{
case 'read':
return e107::getParser()->toIcon($curVal, array('legacy'=>'{e_IMAGE}icons/'));
break;
case 'write':
return $this->iconpicker('download_category_icon', $curVal,null,array('glyphs'=>true, 'legacyPath'=>'{e_IMAGE}icons/'));
break;
case 'filter':
case 'batch':
return null;
break;
}
}
}
@@ -250,8 +278,8 @@ class download_main_admin_ui extends e_admin_ui
'download_active' => array('title'=> DOWLAN_21, 'type' => 'method', 'data' => 'int', 'width' => '5%', 'thclass' => 'center', 'class' => 'center', 'batch' => TRUE, 'filter'=>TRUE, 'noedit' => true),
'download_datestamp' => array('title'=> LAN_DATE, 'type' => 'datestamp', 'data' => 'int', 'width' => 'auto', 'thclass' => '', 'readParms' => 'long', 'writeParms' => ''),
'download_thumb' => array('title'=> DOWLAN_20, 'type' => 'image', 'data' => 'str', 'width' => '100px', 'thclass' => 'center', 'class'=>'center', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','readonly'=>TRUE ),
'download_image' => array('title'=> DOWLAN_19, 'type' => 'image', 'data' => 'str', 'width' => '100px', 'thclass' => 'center', 'class'=>'center', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','readonly'=>TRUE, 'batch' => FALSE, 'filter'=>FALSE),
'download_thumb' => array('title'=> DOWLAN_20, 'type' => 'image', 'data' => 'str', 'width' => '100px', 'thclass' => 'center', 'class'=>'center', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60&legacyPath={e_FILE}downloadthumbs', 'readonly'=>TRUE ),
'download_image' => array('title'=> DOWLAN_19, 'type' => 'image', 'data' => 'str', 'width' => '100px', 'thclass' => 'center', 'class'=>'center', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60&legacyPath={e_FILE}downloadimages', 'readonly'=>TRUE, 'batch' => FALSE, 'filter'=>FALSE),
'download_comment' => array('title'=> DOWLAN_102, 'type' => 'boolean', 'data' => 'int', 'width' => '5%', 'thclass' => 'center', 'batch' => TRUE, 'filter'=>TRUE, 'noedit' => true),
'download_class' => array('title'=> DOWLAN_113, 'type' => 'userclass', 'width' => 'auto', 'inline'=>true, 'data' => 'int','batch' => TRUE, 'filter'=>TRUE),
@@ -1387,7 +1415,7 @@ $columnInfo = array(
$text .= " </select>";
*/
$text .= $frm->imagepicker('download_image', $download_image,'','download_image');
$text .= $frm->imagepicker('download_image', $download_image,'',array('mode'=>'download_image', 'legacyPath'=>'{e_FILE}downloadimages'));
if ($subAction == "dlm" && $download_image)
{
@@ -1418,7 +1446,7 @@ $columnInfo = array(
$text .= " </select>";
*/
$text .= $frm->imagepicker('download_thumb', $download_thumb,'','download_thumb');
$text .= $frm->imagepicker('download_thumb', $download_thumb,'',array('mode'=>'download_thumb', 'legacyPath'=>'{e_FILE}downloadthumbs'));
$text .= "