From fb3c2cecd0373d9b90cc4c8b50ff93e0206a91cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Sat, 1 Oct 2016 11:26:30 +0200 Subject: [PATCH 1/2] Update e107_admin/image.php Add lang codes. --- e107_admin/image.php | 86 ++++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 44 deletions(-) diff --git a/e107_admin/image.php b/e107_admin/image.php index fa5d02807..b95536788 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -195,7 +195,7 @@ class media_cat_ui extends e_admin_ui ); // FIXME LAN - $this->fields['media_cat_type']['writeParms'] = array('image' => 'Image', 'file' => 'File', 'video' => 'Video'); + $this->fields['media_cat_type']['writeParms'] = array('image' => IMALAN_143, IMALAN_144 => 'File', 'video' => 'Video'); if($this->getAction() == 'list') { @@ -257,7 +257,7 @@ class media_cat_ui extends e_admin_ui // XXX temporary disable when there is no owners, discuss if(!$new_data['media_cat_owner']) { - e107::getMessage()->addError('No media owner found.'); // FIXME LAN + e107::getMessage()->addError(IMALAN_173); // FIXME LAN return false; } //$replace = array("_"," ","'",'"',"."); //FIXME Improve @@ -696,24 +696,24 @@ class media_admin_ui extends e_admin_ui protected $fields = array( 'checkboxes' => array('title'=> '', 'type' => null, 'data'=> null, 'width' =>'5%', 'forced'=> TRUE, 'thclass'=>'center', 'class'=>'center'), 'media_id' => array('title'=> LAN_ID, 'type' => 'number', 'data'=> 'int', 'width' =>'5%', 'forced'=> TRUE, 'nolist'=>TRUE), - 'media_preview' => array('title'=>'Preview', 'type'=>'method', 'data'=>false, 'forced'=>true, 'width' => '110px', 'thclass' => 'center', 'class'=>'center'), - 'media_url' => array('title'=> 'Path', 'type' => 'text', 'data'=> 'str', 'inline'=>false, 'thclass' => 'left', 'class'=>'left', 'width' => 'auto', 'writeParms'=>'size=xxlarge'), + 'media_preview' => array('title'=> LAN_PREVIEW, 'type'=>'method', 'data'=>false, 'forced'=>true, 'width' => '110px', 'thclass' => 'center', 'class'=>'center'), + 'media_url' => array('title'=> IMALAN_110, 'type' => 'text', 'data'=> 'str', 'inline'=>false, 'thclass' => 'left', 'class'=>'left', 'width' => 'auto', 'writeParms'=>'size=xxlarge'), 'media_category' => array('title'=> LAN_CATEGORY, 'type' => 'comma', 'inline'=>false, 'data'=> 'str', 'width' => '10%', 'filter' => true, 'batch' => true, 'class'=>'left'), // Upload should be managed completely separately via upload-handler. // 'media_upload' => array('title'=> "Upload File", 'type' => 'upload', 'data'=> false, 'readParms' => 'hidden', 'writeParms' => 'disable_button=1', 'width' => '10%', 'nolist' => true), 'media_name' => array('title'=> LAN_TITLE, 'type' => 'text', 'data'=> 'str', 'inline'=>true, 'width' => 'auto'), - 'media_caption' => array('title'=> "Caption", 'type' => 'text', 'data'=> 'str', 'inline'=>true, 'width' => 'auto'), + 'media_caption' => array('title'=> LAN_CAPTION, 'type' => 'text', 'data'=> 'str', 'inline'=>true, 'width' => 'auto'), // media_description is type = textarea until bbarea can be reduced to not include youtube etc 'media_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'textarea', 'data'=> 'str', 'width' => 'auto', 'thclass' => 'left first', 'readParms' => 'truncate=100', 'writeParms' => 'counter=0'), - 'media_type' => array('title'=> "Mime Type", 'type' => 'dropdown', 'data'=> 'str', 'filter'=>true, 'width' => 'auto', 'noedit'=>TRUE), + 'media_type' => array('title'=> IMALAN_118, 'type' => 'dropdown', 'data'=> 'str', 'filter'=>true, 'width' => 'auto', 'noedit'=>TRUE), 'media_author' => array('title'=> LAN_USER, 'type' => 'user', 'data'=> 'int', 'width' => 'auto', 'thclass' => 'center', 'class'=>'center','readParms' => 'link=1', 'filter' => true, 'batch' => true, 'noedit'=>TRUE ), 'media_datestamp' => array('title'=> LAN_DATESTAMP, 'type' => 'datestamp', 'data'=> 'int', 'width' => '10%', 'noedit'=>TRUE), // User date - 'media_size' => array('title'=> "Size", 'type' => 'number', 'data'=> 'int', 'width' => 'auto', 'readonly'=>2), - 'media_dimensions' => array('title'=> "Dimensions", 'type' => 'text', 'data'=> 'str', 'width' => '5%', 'readonly'=>TRUE, 'class'=>'nowrap','noedit'=>TRUE), + 'media_size' => array('title'=> LAN_SIZE, 'type' => 'number', 'data'=> 'int', 'width' => 'auto', 'readonly'=>2), + 'media_dimensions' => array('title'=> IMALAN_120, 'type' => 'text', 'data'=> 'str', 'width' => '5%', 'readonly'=>TRUE, 'class'=>'nowrap','noedit'=>TRUE), 'media_userclass' => array('title'=> LAN_USERCLASS, 'type' => 'userclass', 'data'=> 'str', 'inline'=>true, 'width' => '10%', 'thclass' => 'center','filter'=>TRUE,'batch'=>TRUE ), - 'media_tags' => array('title'=> "Tags/Keywords", 'type' => 'tags', 'inline'=>true, 'data'=> 'str', 'width' => '10%', 'filter'=>TRUE,'batch'=>TRUE ), - 'media_usedby' => array('title'=> 'Used by', 'type' => 'hidden', 'data'=> 'text', 'width' => 'auto', 'thclass' => 'center', 'class'=>'center', 'nolist'=>true, 'readonly'=>TRUE ), + 'media_tags' => array('title'=> IMALAN_132, 'type' => 'tags', 'inline'=>true, 'data'=> 'str', 'width' => '10%', 'filter'=>TRUE,'batch'=>TRUE ), + 'media_usedby' => array('title'=> IMALAN_21, 'type' => 'hidden', 'data'=> 'text', 'width' => 'auto', 'thclass' => 'center', 'class'=>'center', 'nolist'=>true, 'readonly'=>TRUE ), 'options' => array('title'=> LAN_OPTIONS, 'type' => 'method', 'data'=> null, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class' => 'center', 'batch'=>true, 'noedit'=>true) ); @@ -760,7 +760,7 @@ class media_admin_ui extends e_admin_ui 'watermark_opacity' => array('title'=> IMALAN_96, 'tab'=>1, 'type' => 'number', 'data' => 'int', 'help'=>IMALAN_97), // 'validate' => 'regex', 'rule' => '#^[\d]+$#i', 'help' => 'allowed characters are a-zA-Z and underscore')), // https://developers.google.com/youtube/player_parameters - 'youtube_apikey' => array('title'=> "YouTube Public API key", 'tab'=>2, 'type' => 'text', 'data'=>'str', 'help'=>IMALAN_99, 'writeParms'=>array('post'=>" More")), + 'youtube_apikey' => array('title'=> "YouTube Public API key", 'tab'=>2, 'type' => 'text', 'data'=>'str', 'help'=>IMALAN_99, 'writeParms'=>array('post'=>" ".LAN_MORE."")), 'youtube_default_account' => array('title'=> IMALAN_98, 'tab'=>2, 'type' => 'text', 'data'=>'str', 'help'=>IMALAN_99), @@ -880,7 +880,7 @@ class media_admin_ui extends e_admin_ui $path = e_THEME.$pref['sitetheme']."/fonts/"; $fDir = $fl->get_files(e_THEME.$pref['sitetheme']."/fonts/",".ttf",'',2); - $fonts = array(0=>'None'); + $fonts = array(0=>LAN_NONE); foreach($fDir as $f) { $id = $tp->createConstants($f['path'].$f['fname'],'rel'); @@ -892,16 +892,16 @@ class media_admin_ui extends e_admin_ui $this->prefs['watermark_font']['readParms'] = $fonts; $wm_pos = array( - 'BR' => "Bottom Right", - 'BL' => "Bottom Left", - 'TR' => "Top Right", - 'TL' => "Top Left", - 'C' => "Center", - 'R' => "Right", - 'L' => "Left", - 'T' => "Top", - 'B' => "Bottom", - '*' => "Tile" + 'BR' => IMALAN_133, + 'BL' => IMALAN_134, + 'TR' => IMALAN_135, + 'TL' => IMALAN_136, + 'C' => IMALAN_137, + 'R' => IMALAN_138, + 'L' => IMALAN_139, + 'T' => IMALAN_140, + 'B' => IMALAN_141, + '*' => IMALAN_142 ); $this->prefs['watermark_pos']['writeParms'] = $wm_pos; @@ -1066,25 +1066,25 @@ class media_admin_ui extends e_admin_ui } // if 'for' has no value, files are placed in /temp and not added to the db. - $text = "

From your computer

"; + $text = IMALAN_145; $text .= '
-

No HTML5 support.

+

'.IMALAN_146.'

'; $text .= '
'; $frm = e107::getForm(); $text .= $frm->open('upload-url-form','post'); $text .= '
'; - $text .= "

From a remote location

"; + $text .= IMALAN_147; $text .= "
"; $text .= ""; $text .= " - + - + "; - $text .= " + $text .= ""; $text .= "
Image/File URL:".IMALAN_148.": ".$frm->admin_button('upload_remote_url',1,'create','Start Upload')."".$frm->admin_button('upload_remote_url',1,'create',IMALAN_149)."
Caption (optional):
".LAN_CAPTION." (".LAN_OPTIONAL."):
"; @@ -1112,7 +1112,7 @@ class media_admin_ui extends e_admin_ui if($this->getQuery('bbcode') != 'video' && $this->getQuery('bbcode') != 'glyph') { - $text .= "
  • Choose from Library
  • \n"; + $text .= "
  • ".IMALAN_151."
  • \n"; } else { @@ -1130,12 +1130,12 @@ class media_admin_ui extends e_admin_ui if(getperms('A|A1') && ($this->getQuery('bbcode') != 'video' && $this->getQuery('bbcode') !='glyph')) { - $text .= "
  • Upload a File
  • "; + $text .= "
  • ".IMALAN_150."
  • "; } if(varset($options['bbcode']) == 'img') { - $text .= "
  • Appearance
  • \n"; + $text .= "
  • ".IMALAN_152."
  • \n"; } if($this->getQuery('glyphs') == 1 || $this->getQuery('bbcode') == 'glyph') @@ -1208,13 +1208,13 @@ class media_admin_ui extends e_admin_ui - Caption: + ".LAN_CAPTION.": - Dimensions: + ".IMALAN_120.": px   ❌   px @@ -1222,27 +1222,27 @@ class media_admin_ui extends e_admin_ui - Text flow: - ".$frm->selectbox('float', array('default'=>'Default','left'=>"Left",'right'=>'Right'))." + ".IMALAN_157.": + ".$frm->selectbox('float', array('default'=>LAN_DEFAULT,'left'=>IMALAN_139,'right'=>IMALAN_138))." - Margin-Left: + ".IMALAN_158.": px - Margin-Right: + ".IMALAN_159.": px - Margin-Top: + ".IMALAN_160.": px - Margin-Bottom: + ".IMALAN_161.": px @@ -1917,7 +1917,7 @@ class media_admin_ui extends e_admin_ui { if($this->getAction() == 'avatar') { - $text = "Avatar Pre-selection Folder:
    ".e_AVATAR_DEFAULT.""; //TODO LAN + $text = IMALAN_155.":
    ".e_AVATAR_DEFAULT.""; return array('caption'=>EMESSLAN_TITLE_INFO, 'text'=>$text); } @@ -2009,7 +2009,7 @@ class media_admin_ui extends e_admin_ui - $users = (in_array($fileName,$imageUsed)) ? "Image in use" : 'Not in use'; + $users = (in_array($fileName,$imageUsed)) ? "".IMALAN_153."" : ''.IMALAN_154.''; //directory? if(is_dir(e_MEDIA."avatars/".$image_name)) @@ -2085,7 +2085,7 @@ class media_admin_ui extends e_admin_ui ".$frm->admin_button('e_check_all', LAN_CHECKALL, 'action')." ".$frm->admin_button('e_uncheck_all', LAN_UNCHECKALL, 'action')." ".$frm->admin_button('submit_show_delete_multi', LAN_DELCHECKED, 'delete')." - ".$frm->admin_button('submit_show_deleteall', "Delete all unused images", 'delete')." + ".$frm->admin_button('submit_show_deleteall', IMALAN_156, 'delete')."
    @@ -3071,6 +3071,4 @@ if (isset($_POST['check_avatar_sizes'])) //Just in case... if(!e_AJAX_REQUEST) require_once("footer.php"); - - ?> From d1708196df3769736d2e4fd125419abf07bba1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor?= Date: Fri, 7 Oct 2016 11:43:44 +0200 Subject: [PATCH 2/2] Update image.php Fixed --- e107_admin/image.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_admin/image.php b/e107_admin/image.php index b95536788..cb02f0f4f 100644 --- a/e107_admin/image.php +++ b/e107_admin/image.php @@ -195,7 +195,7 @@ class media_cat_ui extends e_admin_ui ); // FIXME LAN - $this->fields['media_cat_type']['writeParms'] = array('image' => IMALAN_143, IMALAN_144 => 'File', 'video' => 'Video'); + $this->fields['media_cat_type']['writeParms'] = array('image' => IMALAN_143, 'file' => IMALAN_144, 'video' => IMALAN_163); if($this->getAction() == 'list') {