Changeset 5735 for extensions/lightbox
- Timestamp:
- Apr 9, 2010, 3:07:06 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/lightbox/lightbox.php
r4826 r5735 1 1 <?php 2 2 3 global $page, $conf, $template ;3 global $page, $conf, $template, $user; 4 4 5 5 include_once(LIGHTBOX_PATH.'functions.inc.php'); 6 6 $params = unserialize($conf['lightbox']); 7 7 $conf['lightbox_rel'] = isset($conf['lightbox_rel']) ? ++$conf['lightbox_rel'] : 0; 8 9 switch ($user['template']) 10 { 11 case 'simple': 12 $selector = '#thumbnails a'; 13 break; 14 15 default: 16 $selector = '.thumbnails a'; 17 break; 18 } 8 19 9 20 $template->func_known_script(array('id'=>'colorbox', 'src'=>get_root_url().'plugins/lightbox/jquery.colorbox.js'), $smarty); … … 12 23 <script type="text/javascript"> 13 24 $(document).ready(function(){ 14 $(" .thumbnails a").attr("href", function () {25 $("'.$selector.'").attr("href", function () { 15 26 return this.name; 16 27 }); 17 $(" .thumbnails a").colorbox({28 $("'.$selector.'").colorbox({ 18 29 current: "", 19 30 transition: "'.$params['transition'].'",
Note: See TracChangeset
for help on using the changeset viewer.