Changeset 17604
- Timestamp:
- Aug 21, 2012, 12:07:18 AM (12 years ago)
- Location:
- extensions/lmt
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/lmt/lmt_aip.class.inc.php
r16014 r17604 215 215 foreach($filter_list_values as $key=>$val) 216 216 { 217 $filter_list_labels[] = "[". l10n("lmt_lbl_cc_s-".strtolower($val))."] ".l10n("lmt_lbl_cc-".strtolower($val));217 $filter_list_labels[] = "[".$this->translateCopyright("lmt_lbl_cc_s-".strtolower($val))."] ".$this->translateCopyright("lmt_lbl_cc-".strtolower($val)); 218 218 if($val==$_REQUEST['filter']) 219 219 { … … 224 224 $filter_list_values = array_merge(array(''), $filter_list_values); 225 225 $filter_list_labels = array_merge(array(l10n('lmt_nofilter')), $filter_list_labels); 226 $default_licence = l10n("lmt_lbl_cc-".strtolower($this->config['lmt_licence_default']));226 $default_licence = $this->translateCopyright("lmt_lbl_cc-".strtolower($this->config['lmt_licence_default'])); 227 227 $default_licence_img =LMT_PATH."img/".strtolower($this->config['lmt_licence_default'])."_80x15.png"; 228 228 … … 373 373 foreach($licences_list_values as $key=>$val) 374 374 { 375 $licences_list_labels[] = "[". l10n("lmt_lbl_cc_s-".strtolower($val))."] ".l10n("lmt_lbl_cc-".strtolower($val));375 $licences_list_labels[] = "[".$this->translateCopyright("lmt_lbl_cc_s-".strtolower($val))."] ".$this->translateCopyright("lmt_lbl_cc-".strtolower($val)); 376 376 } 377 377 … … 439 439 foreach($lmt_licence_default_values as $key=>$val) 440 440 { 441 $lmt_licence_default_labels[] = "[". l10n("lmt_lbl_cc_s-".strtolower($val))."] ".l10n("lmt_lbl_cc-".strtolower($val));441 $lmt_licence_default_labels[] = "[".$this->translateCopyright("lmt_lbl_cc_s-".strtolower($val))."] ".$this->translateCopyright("lmt_lbl_cc-".strtolower($val)); 442 442 443 443 $tmp[]="'".str2url("ilmt_redirect_url-".strToLower($val))."'"; 444 444 $datas['lmt_redirect_urls'][str2url('lmt_redirect_url-'.strToLower($val))]=array( 445 'text' => l10n("lmt_lbl_cc_s-".strToLower($val)),445 'text' => $this->translateCopyright("lmt_lbl_cc_s-".strToLower($val)), 446 446 'langs' => array() 447 447 ); … … 660 660 "author_list" => array(), 661 661 "img_directory" => LMT_PATH."img/", 662 "default_licencepublished" => l10n("lmt_lbl_under-".strToLower($this->config['lmt_licence_default'])),662 "default_licencepublished" => $this->translateCopyright("lmt_lbl_under-".strToLower($this->config['lmt_licence_default'])), 663 663 "default_licenceL" => strToLower($this->config['lmt_licence_default']), 664 "default_licenceU" => l10n("lmt_lbl_cc_s-".strToLower($this->config['lmt_licence_default'])),664 "default_licenceU" => $this->translateCopyright("lmt_lbl_cc_s-".strToLower($this->config['lmt_licence_default'])), 665 665 "lmt_licence_logo" => $this->config['lmt_licence_logo'], 666 666 "nbauthor" => 0, … … 770 770 { 771 771 $datas['shortlicencetext'][$val] = array( 772 "txt" => l10n("lmt_lbl_cc_s-".strtolower($val)),773 "published" => l10n("lmt_lbl_under-".strtolower($val))772 "txt" => $this->translateCopyright("lmt_lbl_cc_s-".strtolower($val)), 773 "published" => $this->translateCopyright("lmt_lbl_under-".strtolower($val)) 774 774 ); 775 775 } -
extensions/lmt/lmt_pip.class.inc.php
r16014 r17604 17 17 //include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCPublicIntegration.class.inc.php'); 18 18 19 load_language('plugin.lang', LMT_PATH); 19 global $user; 20 20 21 21 22 class LMT_PIP extends LMT_root … … 46 47 if($this->config['lmt_licence_activated']=='y') 47 48 { 49 add_event_handler('user_init', array(&$this, 'loadLang')); 48 50 add_event_handler('loc_end_picture', array(&$this, 'manageLicenceElement')); 49 51 … … 61 63 } 62 64 65 public function loadLang() 66 { 67 load_language('plugin.lang', LMT_PATH); 68 } 69 63 70 /* ------------------------------------------------------------------------- 64 71 FUNCTIONS TO MANAGE LMT DISPLAY … … 66 73 public function manageLicenceElement() 67 74 { 68 global $template, $page, $user ;75 global $template, $page, $user, $lang; 69 76 70 77 $licence=$this->getImageLicence($page['image_id']); … … 87 94 } 88 95 89 $alternateText=" alt='".htmlspecialchars( l10n('lmt_lbl_cc_s-'.strtolower($licence['licence'])), ENT_QUOTES)."'96 $alternateText=" alt='".htmlspecialchars($this->translateCopyright('lmt_lbl_cc_s-'.strToLower($licence['licence'])), ENT_QUOTES)."' 90 97 title='".htmlspecialchars( 91 l10n('lmt_lbl_under-'.strtolower($licence['licence'])).' '.92 l10n('lmt_lbl_cc_s-'.strtolower($licence['licence'])).' : '.93 l10n('lmt_lbl_cc-'.strtolower($licence['licence'])),ENT_QUOTES98 $this->translateCopyright('lmt_lbl_under-'.strtolower($licence['licence'])).' '. 99 $this->translateCopyright('lmt_lbl_cc_s-'.strtolower($licence['licence'])).' : '. 100 $this->translateCopyright('lmt_lbl_cc-'.strtolower($licence['licence'])),ENT_QUOTES 94 101 )."' "; 95 102 … … 123 130 if($url!="") 124 131 { 125 $text ="<br/>". l10n("lmt_lbl_under-".strToLower($licence['licence']))." <a href='".$url."'".$target.">".l10n("lmt_lbl_cc_s-".strToLower($licence['licence']))."</a> ".$licence['aut_text1']." ".$licence['aut_text2'];132 $text ="<br/>".$this->translateCopyright("lmt_lbl_under-".strToLower($licence['licence']))." <a href='".$url."'".$target.">".$this->translateCopyright("lmt_lbl_cc_s-".strToLower($licence['licence']))."</a> ".$licence['aut_text1']." ".$licence['aut_text2']; 126 133 } 127 134 else 128 135 { 129 $text ="<br/>". l10n("lmt_lbl_under-".strToLower($licence['licence']))." ".l10n("lmt_lbl_cc_s-".strToLower($licence['licence']))." ".$licence['aut_text1']." ".$licence['aut_text2'];136 $text ="<br/>".$this->translateCopyright("lmt_lbl_under-".strToLower($licence['licence']))." ".$this->translateCopyright("lmt_lbl_cc_s-".strToLower($licence['licence']))." ".$licence['aut_text1']." ".$licence['aut_text2']; 130 137 } 131 138 break; … … 137 144 public function manageWarningText() 138 145 { 139 global $template, $user ;146 global $template, $user, $lang; 140 147 141 148 … … 149 156 } 150 157 151 $alternateText=" alt='".htmlspecialchars( l10n('lmt_lbl_cc_s-'.strtolower($this->config['lmt_licence_default'])), ENT_QUOTES)."'158 $alternateText=" alt='".htmlspecialchars($this->translateCopyright('lmt_lbl_cc_s-'.strtolower($this->config['lmt_licence_default'])), ENT_QUOTES)."' 152 159 title='".htmlspecialchars( 153 l10n('lmt_lbl_under-'.strtolower($this->config['lmt_licence_default'])).' '.154 l10n('lmt_lbl_cc_s-'.strtolower($this->config['lmt_licence_default'])).' : '.155 l10n('lmt_lbl_cc-'.strtolower($this->config['lmt_licence_default'])),ENT_QUOTES160 $this->translateCopyright('lmt_lbl_under-'.strtolower($this->config['lmt_licence_default'])).' '. 161 $this->translateCopyright('lmt_lbl_cc_s-'.strtolower($this->config['lmt_licence_default'])).' : '. 162 $this->translateCopyright('lmt_lbl_cc-'.strtolower($this->config['lmt_licence_default'])),ENT_QUOTES 156 163 )."' "; 157 164 158 165 $patterns = array('/\[logo=80x15\]/i', '/\[logo=88x31\]/i', '/\[logo=text\]/i'); 159 166 $replacements = array( 160 "<img $alternateText class='logo80x15' src='". LMT_PATH."img/".str ToLower($this->config['lmt_licence_default'])."_80x15.png'>",161 "<img $alternateText class='logo88x31' src='". LMT_PATH."img/".str ToLower($this->config['lmt_licence_default'])."_88x31.png'>",162 l10n("lmt_lbl_cc_s-".strToLower($this->config['lmt_licence_default']))167 "<img $alternateText class='logo80x15' src='". LMT_PATH."img/".strtolower($this->config['lmt_licence_default'])."_80x15.png'>", 168 "<img $alternateText class='logo88x31' src='". LMT_PATH."img/".strtolower($this->config['lmt_licence_default'])."_88x31.png'>", 169 $this->translateCopyright("lmt_lbl_cc_s-".strtolower($this->config['lmt_licence_default'])) 163 170 ); 164 171 -
extensions/lmt/lmt_root.class.inc.php
r16014 r17604 243 243 } 244 244 245 public function translateCopyright($key) 246 { 247 global $lang; 248 if(isset($lang[$key]) and $lang[$key]=='') return(''); 249 return(l10n($key)); 250 } 251 245 252 } //class 246 253 -
extensions/lmt/lmt_version.inc.php
r15341 r17604 15 15 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 16 16 17 define('LMT_VERSION', '1.4. 0');18 define('LMT_VERSION2', '01.04.0 0');17 define('LMT_VERSION', '1.4.1'); 18 define('LMT_VERSION2', '01.04.01'); 19 19 define('LMT_GPC_NEEDED', '3.5.2'); 20 20 ?> -
extensions/lmt/main.inc.php
r16461 r17604 2 2 /* 3 3 Plugin Name: LMT 4 Version: 1.4. 04 Version: 1.4.1 5 5 Description: Appliquer une licence sur ses photos / Apply a licence on photos 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=282 … … 73 73 | | | . compatibility with piwigo 2.4 74 74 | | | 75 | 1.4.1 | 2012/08/20 | * mantis bug:2726 76 | | | . Copyright display is not correct 77 | | | => use $this->translateCopyright() insted of l10n() 78 | | | => load langage file when user_init() is done 79 | | | 80 | | | 81 | | | 82 | | | 75 83 | | | 76 84
Note: See TracChangeset
for help on using the changeset viewer.