| 10 | | $template->func_known_script(array('id'=>'jquery', 'src'=>get_root_url().'themes/default/js/jquery.packed.js'), $smarty); |
| 11 | | $template->func_known_script(array('id'=>'colorbox', 'src'=>get_root_url().'plugins/lightbox/js/jquery.colorbox-min.js'), $smarty); |
| 12 | | $template->block_html_head('', ' |
| 13 | | <link rel="stylesheet" href="'.get_root_url().'plugins/lightbox/theme/'.$params['theme'].'/colorbox.css" type="text/css" media="screen"> |
| 14 | | <script type="text/javascript"> |
| | 10 | $template->func_combine_script(array('id'=>'jquery.colorbox', 'path'=>'plugins/lightbox/js/jquery.colorbox-min.js', 'load'=>'footer'), $smarty); |
| | 11 | $template->func_combine_css(array('path'=>'plugins/lightbox/theme/'.$params['theme'].'/colorbox.css'), $smarty); |
| | 12 | $template->block_footer_script(array('require'=>'jquery.colorbox'), ' |
| 16 | | jQuery("'.$selector.'").attr("href", function () { |
| 17 | | return this.name; |
| 18 | | }); |
| 19 | | jQuery("'.$selector.'").colorbox({ |
| 20 | | current: "", |
| 21 | | transition: "'.$params['transition'].'", |
| 22 | | speed: "'.$params['transition_speed'].'", |
| 23 | | initialWidth: "'.(!empty($params['initial_width']) ? $params['initial_width'] : $config_default['initial_width']).'", |
| 24 | | initialHeight: "'.(!empty($params['initial_height']) ? $params['initial_height'] : $config_default['initial_height']).'", |
| 25 | | width: '.(!empty($params['fixed_width']) ? '"'.$params['fixed_width'].'"' : 'false').', |
| 26 | | height: '.(!empty($params['fixed_height']) ? '"'.$params['fixed_height'].'"' : 'false').' |
| 27 | | }, |
| 28 | | function() { |
| 29 | | jQuery.post("'.get_root_url().'plugins/lightbox/save_history.php", { |
| 30 | | imgid: this.id, |
| 31 | | catid: "'.@$page['category']['id'].'", |
| 32 | | section: "'.@$page['section'].'", |
| 33 | | tagids: "'.@implode(',', @$page['tag_ids']).'" |
| | 14 | jQuery("'.$selector.'").attr("href", function () { |
| | 15 | return this.name; |
| | 16 | }); |
| | 17 | jQuery("'.$selector.'").colorbox({ |
| | 18 | current: "", |
| | 19 | transition: "'.$params['transition'].'", |
| | 20 | speed: "'.$params['transition_speed'].'", |
| | 21 | initialWidth: "'.(!empty($params['initial_width']) ? $params['initial_width'] : $config_default['initial_width']).'", |
| | 22 | initialHeight: "'.(!empty($params['initial_height']) ? $params['initial_height'] : $config_default['initial_height']).'", |
| | 23 | width: '.(!empty($params['fixed_width']) ? '"'.$params['fixed_width'].'"' : 'false').', |
| | 24 | height: '.(!empty($params['fixed_height']) ? '"'.$params['fixed_height'].'"' : 'false').' |
| | 25 | }, |
| | 26 | function() { |
| | 27 | jQuery.post("'.get_root_url().'plugins/lightbox/save_history.php", { |
| | 28 | imgid: this.id, |
| | 29 | catid: "'.@$page['category']['id'].'", |
| | 30 | section: "'.@$page['section'].'", |
| | 31 | tagids: "'.@implode(',', @$page['tag_ids']).'" |
| | 32 | }); |