Changeset 7252


Ignore:
Timestamp:
Oct 17, 2010, 11:14:40 PM (14 years ago)
Author:
plg
Message:

bug 1928 fixed: the Lightbox jQuery selector does not depend on the user theme
anymore. This change should make the Lightbox plugin compatible with any theme,
whatever the CSS class/id used for the thumbnails container. Thank you P@t for
investigation and solution.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/lightbox/lightbox.php

    r6373 r7252  
    66$params = unserialize($conf['lightbox']);
    77$conf['lightbox_rel'] = isset($conf['lightbox_rel']) ? ++$conf['lightbox_rel'] : 0;
    8 
    9 switch ($user['theme'])
    10 {
    11   case 'simple':
    12     $selector = '#thumbnails a';
    13     break;
    14 
    15   default:
    16     $selector = '.thumbnails a';
    17     break;
    18 }
     8$selector = 'a[rel=colorbox'.$conf['lightbox_rel'].']';
    199
    2010$template->func_known_script(array('id'=>'jquery', 'src'=>get_root_url().'themes/default/js/jquery.packed.js'), $smarty);
Note: See TracChangeset for help on using the changeset viewer.