Changeset 8629 for extensions/cl_conflit/conflit.inc.php
- Timestamp:
- Jan 12, 2011, 3:23:39 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/cl_conflit/conflit.inc.php
r8187 r8629 2 2 // +-----------------------------------------------------------------------+ 3 3 // | Piwigo - a PHP based picture gallery | 4 // | cl_conflit 4 // | cl_conflit | 5 5 // +-----------------------------------------------------------------------+ 6 6 // | Copyright(C) 2010 cljosse | … … 29 29 //============================================================ 30 30 /* 31 * cl_conflit_script 31 * cl_conflit_script_1 32 32 */ 33 static public function cl_conflit_script ()33 static public function cl_conflit_script_1() 34 34 { 35 global $template,$user,$conf,$picture ,$page,$cl_plugin; 36 35 global $template,$user,$conf,$picture ,$page,$cl_plugin; 36 if (isset( $page['body_id']) && $page['body_id']=='theAdminPage' ) return ; 37 $ma_page=isset($page['body_id'])?$page['body_id']:"" ; 38 if ($ma_page=='thePiwiShackControllerPage') return ; 37 39 $my_path = basename(dirname(__FILE__)).'/' ; 38 40 $my_path = dirname(__FILE__).'/'; 39 41 $template->set_filenames(array('cl_conflit_init'=>$my_path. "template/conflit.tpl" ) ); 40 $debug = isset($conf['debug']) ? $conf['debug'] : false ; 41 $cl_conflit_parametres = cl_conflit_Get_Options() ; 42 43 42 $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; 43 $cl_conflit_parametres = cl_conflit_Get_Options() ; 44 44 $theme=$user['theme']; 45 45 $url = get_root_url(); 46 46 $template->assign( 47 47 array( … … 50 50 'cl_version' => $cl_plugin['version'] , 51 51 'name' => $cl_plugin['name'] , 52 52 'MY_ROOT' => $url, 53 53 'theme' => $theme , 54 'DEBUG' => $ debug,55 'CONFLIT_ ROOT' => CONFLIT_PATH)54 'DEBUG' => $DEBUG , 55 'CONFLIT_PATH' => CONFLIT_PATH) 56 56 ); 57 58 if( $page['body_id'] == 'theAdminPage' ) return ; 57 59 58 return $template->parse( 'cl_conflit_init', false); 60 }// function cl_conflit_script 59 }// function cl_conflit_script_1 61 60 //================================================================================= 62 61 /* 63 * 62 * cl_conflit_script_2 64 63 */ 65 64 static public function cl_conflit_script_2() 66 65 { 67 66 global $template,$user,$conf,$picture ,$page,$cl_plugin; 68 69 $my_path = basename(dirname(__FILE__)).'/' ;70 67 $my_path = dirname(__FILE__).'/'; 71 $debug = isset($conf['debug']) ? $conf['debug'] : false ; 72 73 $theme=$user['theme']; 68 $DEBUG = isset($conf['cl_debug']) ? $conf['cl_debug'] : "false" ; 69 $ma_page=isset($page['body_id'])?$page['body_id']:"" ; 70 $theme=$user['theme']; 71 if ($ma_page=='thePiwiShackControllerPage') return ; 74 72 75 73 $template->assign( … … 77 75 'cl_version' => $cl_plugin['version'] , 78 76 'name' => $cl_plugin['name'] , 79 'ma_page' => $ page['body_id'],77 'ma_page' => $ma_page, 80 78 81 79 'theme' => $theme , 82 'DEBUG' => $ debug,83 'CONFLIT_ ROOT' => CONFLIT_PATH)80 'DEBUG' => $DEBUG , 81 'CONFLIT_PATH' => CONFLIT_PATH) 84 82 ); 85 83 86 $autoscript="<script type='text/javascript'> 87 88 if (typeof (save_framework) == 'function') 89 save_framework('".$page['body_id']."'); 90 </script>"; 91 $template->append('footer_elements',$autoscript); 92 return ; 93 94 84 $autoscript="<script type='text/javascript'> 85 /* cl_conflit_script_2 */ 86 if (typeof (save_framework) == 'function') 87 save_framework('".$page['body_id']."'); 88 </script>"; 89 $template->append('footer_elements',$autoscript); 90 return ; 95 91 }// function cl_conflit_script_2 96 92 97 //================================================================= 98 /* 99 * 100 */ 101 static public function cl_conflit_script_3($content) 102 { 103 global $template,$user,$conf,$picture ,$page,$cl_plugin; 104 105 $my_path = basename(dirname(__FILE__)).'/' ; 106 $my_path = dirname(__FILE__).'/'; 107 $debug = isset($conf['debug']) ? $conf['debug'] : false ; 108 109 $theme=$user['theme']; 110 111 $ThePicture = $template->get_template_vars('current'); 112 $tpl_name = $user['theme'] ; 113 if ( !empty($content) ) { return $content; } 114 if ($ThePicture['is_picture'] <> 1 ) { return $content; ; } 115 116 $cl_conflitjs = '<script type="text/javascript" charset="utf-8" src="'; 117 $autocss = $cl_conflitjs.'themes/default/js/jquery.packed.js"></script>'."\n"; 118 $template->append('head_elements',$autocss); 119 120 $autocss="<script type='text/javascript'> 121 // jQuery('#theImage').css({opacity:'0.0'}); 122 </script>"; 123 124 $template->append('footer_elements',"\n".$autocss); 125 return $content ; 126 127 128 }// function cl_conflit_script_3 93 //================================================ 129 94 /* 130 * 95 * cl_conflit_admin 131 96 */ 132 97 static public function cl_conflit_admin($menu) … … 184 149 185 150 } 186 187 188 189 190 151 ?>
Note: See TracChangeset
for help on using the changeset viewer.