Changeset 16014
- Timestamp:
- Jun 24, 2012, 9:19:27 PM (12 years ago)
- Location:
- extensions/lmt
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/lmt/admin/plugin_admin_list.tpl
r15341 r16014 12 12 ajaxfct:'admin.img.list', 13 13 numPage:pagenum, 14 filter:$("#filter").val() 14 filter:$("#filter").val(), 15 token:'{/literal}{$token}{literal}' 15 16 }, 16 17 url: "{/literal}{$datas.LMT_AJAX_URL_LIST}{literal}", -
extensions/lmt/admin/plugin_admin_manage.tpl
r7560 r16014 18 18 { 19 19 ajaxfct:'admin.manage.list', 20 numPage:pagenum 20 numPage:pagenum, 21 token:'{/literal}{$token}{literal}' 21 22 }, 22 23 url: "{/literal}{$datas.LMT_AJAX_URL_LIST}{literal}", -
extensions/lmt/lmt_aip.class.inc.php
r15382 r16014 70 70 GPCRequestBuilder::loadJSandCSS(); 71 71 } 72 73 add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS')); 74 add_event_handler('loc_end_page_header', array(&$this->css_icn, 'applyCSS')); 75 76 GPCCss::applyGpcCss(); 77 } 72 } 73 78 74 79 75 /* … … 85 81 86 82 $template->set_filename('plugin_admin_content', dirname(__FILE__)."/admin/lmt_admin.tpl"); 83 GPCCore::setTemplateToken(); 87 84 88 85 if(!isset($_GET['tab'])) $_GET['tab']='list'; -
extensions/lmt/lmt_aip_release.class.inc.php
r7560 r16014 35 35 36 36 /* 37 initialize events call for the plugin38 */39 public function initEvents()40 {41 parent::initEvents();42 add_event_handler('loc_end_page_header', array(&$this->css, 'applyCSS'));43 }44 45 /*46 37 display administration page 47 38 */ -
extensions/lmt/lmt_ajax.php
r15341 r16014 25 25 */ 26 26 if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']=''; 27 if(preg_match('/^admin\./i', $_REQUEST['ajaxfct'])) 28 { 29 define('IN_ADMIN', true); 30 } 27 if(preg_match('/^admin\./i', $_REQUEST['ajaxfct'])) define('IN_ADMIN', true); 28 if(!defined('AJAX_CALL')) define('AJAX_CALL', true); 31 29 32 30 // the common.inc.php file loads all the main.inc.php plugins files … … 60 58 global $user; 61 59 62 if(!isset($_REQUEST['ajaxfct'])) $_REQUEST['ajaxfct']='';60 GPCAjax::checkToken(); 63 61 if(!isset($_REQUEST['errcode'])) $_REQUEST['errcode']=''; 64 62 … … 198 196 'file' => $row['file'], 199 197 'cat' => $tmpcat, 200 'thumb' => str_replace(PHPWG_ROOT_PATH, './', DerivativeImage:: thumb_url(array('id'=>$row['image_id'], 'path'=>$row['path'])))198 'thumb' => str_replace(PHPWG_ROOT_PATH, './', DerivativeImage::url(IMG_SQUARE, array('id'=>$row['image_id'], 'path'=>$row['path']))) 201 199 ); 202 200 } … … 290 288 'file' => $row['file'], 291 289 'cat' => $tmpcat, 292 'thumb' => str_replace(PHPWG_ROOT_PATH, './', DerivativeImage:: thumb_url(array('id'=>$row['image_id'], 'path'=>$row['path'])))290 'thumb' => str_replace(PHPWG_ROOT_PATH, './', DerivativeImage::url(IMG_SQUARE, array('id'=>$row['image_id'], 'path'=>$row['path']))) 293 291 ); 294 292 } -
extensions/lmt/lmt_pip.class.inc.php
r7560 r16014 46 46 if($this->config['lmt_licence_activated']=='y') 47 47 { 48 add_event_handler('loc_end_page_header', array(&$this->css_icn, 'applyCSS'));49 48 add_event_handler('loc_end_picture', array(&$this, 'manageLicenceElement')); 50 49 … … 56 55 } 57 56 58 57 public function loadCSS() 58 { 59 //parent::loadCSS(); -- don't call the ancestor! 60 GPCCore::addHeaderCSS('lmt_icn.css', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles()."_icn.css"); 61 } 59 62 60 63 /* ------------------------------------------------------------------------- … … 110 113 if($url!="") 111 114 { 112 $text = "<table style='margin:auto;'><tr><td><a href='".$url."'".$target."><img $alternateText class='logo88x31' s tyle='top:-4px;' src='". LMT_PATH."img/".strToLower($licence['licence'])."_88x31.png'></a></td><td>".$licence['aut_text1']."<br/>".$licence['aut_text2']."</td></tr></table>";115 $text = "<table style='margin:auto;'><tr><td><a href='".$url."'".$target."><img $alternateText class='logo88x31' src='". LMT_PATH."img/".strToLower($licence['licence'])."_88x31.png'></a></td><td>".$licence['aut_text1']."<br/>".$licence['aut_text2']."</td></tr></table>"; 113 116 } 114 117 else 115 118 { 116 $text = "<table style='margin:auto;'><tr><td><img $alternateText class='logo88x31' s tyle='top:-4px;' src='". LMT_PATH."img/".strToLower($licence['licence'])."_88x31.png'></td><td>".$licence['aut_text1']."<br/>".$licence['aut_text2']."</td></tr></table>";119 $text = "<table style='margin:auto;'><tr><td><img $alternateText class='logo88x31' src='". LMT_PATH."img/".strToLower($licence['licence'])."_88x31.png'></td><td>".$licence['aut_text1']."<br/>".$licence['aut_text2']."</td></tr></table>"; 117 120 } 118 121 break; -
extensions/lmt/lmt_root.class.inc.php
r11342 r16014 14 14 --------------------------------------------------------------------------- */ 15 15 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/CommonPlugin.class.inc.php'); 16 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCCss.class.inc.php');17 include_once(PHPWG_PLUGINS_PATH.'GrumPluginClasses/classes/GPCAjax.class.inc.php');18 16 19 17 class LMT_root extends CommonPlugin 20 18 { 21 protected $css; //the css object22 protected $css_icn; //the css object23 24 19 static public $licences=array('BY', 'BY-ND', 'BY-NC', 'BY-NC-ND', 'BY-NC-SA', 'BY-SA', 'CRIGHT', 'CLEFT', 'CC0', 'PD', 'DEFAULT'); 25 20 … … 35 30 36 31 $this->setTablesList(array('images', 'licence_author')); 37 38 $this->css = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles().".css"); 39 $this->css_icn = new GPCCss(dirname($this->getFileLocation()).'/'.$this->getPluginNameFiles()."_icn.css"); 40 } 41 42 /** 43 * destructor 44 */ 45 public function __destruct() 46 { 47 unset($this->css); 48 unset($this->css_icn); 49 parent::__destruct(); 50 } 51 52 public function initEvents() 53 { 54 add_event_handler('blockmanager_register_blocks', array(&$this, 'register_blocks') ); 55 } 56 57 /** 58 * menu block management 59 */ 60 public function register_blocks() 61 { 62 } 63 32 } 33 34 35 public function loadCSS() 36 { 37 global $template; 38 39 parent::loadCSS(); 40 GPCCore::addUI('gpcCSS'); 41 GPCCore::addHeaderCSS('lmt.css', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles().".css"); 42 GPCCore::addHeaderCSS('lmt_icn.css', 'plugins/'.$this->getDirectory().'/'.$this->getPluginNameFiles()."_icn.css"); 43 } 64 44 65 45 /** -
extensions/lmt/main.inc.php
r15341 r16014 108 108 global $prefixeTable; 109 109 110 if( defined('IN_ADMIN'))110 if(!defined('AJAX_CALL')) 111 111 { 112 //LMT admin interface loaded and active only if in admin page 113 include_once("lmt_aim.class.inc.php"); 114 $obj=new LMT_AIM($prefixeTable, __FILE__); 115 $obj->initEvents(); 116 } 117 else 118 { 119 //LMT public interface loaded and active only if in public page 120 if(CommonPlugin::checkGPCRelease(LMT_GPC_NEEDED)) 112 if(defined('IN_ADMIN')) 113 { 114 //LMT admin interface loaded and active only if in admin page 115 include_once("lmt_aim.class.inc.php"); 116 $obj=new LMT_AIM($prefixeTable, __FILE__); 117 $obj->initEvents(); 118 } 119 else 121 120 { 122 121 //LMT public interface loaded and active only if in public page 123 include_once("lmt_pip.class.inc.php"); 124 $obj=new LMT_PIP($prefixeTable, __FILE__); 122 if(CommonPlugin::checkGPCRelease(LMT_GPC_NEEDED) and !mobile_theme()) 123 { 124 //LMT public interface loaded and active only if in public page 125 include_once("lmt_pip.class.inc.php"); 126 $obj=new LMT_PIP($prefixeTable, __FILE__); 127 } 125 128 } 126 129 }
Note: See TracChangeset
for help on using the changeset viewer.