Colorbox and theme per album conflict

bic Member, Translator
Here I am with one of my minor problems after upgrading to 1.4.1.6 because of the security issue.
With colorbox plug-in enabled (I use it only for image info popup) images in albums with a theme different from the main theme of the gallery are displayed with many layout errors.
If the CB plug-in is disabled everything works fine but you can't see image info.
I tryed to assign an official (non custom) theme to those albums to be sure it was not a custom theme problem.

Comments

  • acrylian Administrator, Developer
    Sure the colorbox is enabled correctly for those pages? Did you add the colorbox js defines? Example link maybe?
  • bic Member, Translator
    It's a production site, I can't live things messed up.
    Tomorrow I'll post some screenshoots.
    The site is the one in my profile, I suppose you can see it, no need to spam it here.
    Colorbox is enabled only in image's pages for every theme. The js defines where are supposed to be? With the old version (1.4 build 6467) it was fine, same custom theme as main theme.
  • acrylian Administrator, Developer
    The colorbox plugin only loads the script but not the actual definition how to do what with Colorbox. Since it has so many options we don't add predefined code. Your site seems to be missing htis. But this is actually no recent change and has been since 1.4.1 at least. Take a look at the image.php of the Zenpage theme for example.
  • bic Member, Translator
    Yes, I have the code in my image.php, now doesn't work because the plugin is disabled by me due to the problem on the black theme when I enable the plugin. If I enable the plugin the popup on image info works as usual on main theme and also on the black one, but with a wrong layout. It's like if CB enabled prevents to load the css of secondary themes. Same thing if the secondary theme is an official theme.
  • acrylian Administrator, Developer
    You need to have the code in the image.php of every theme you are using and also enable for each of them.

    Otherwise I have no idea what hte conflict could be. You could abandon several themes and use the multiple_layouts plugin instead. Then all would be within one theme (still the need to enable and add code though).
  • There should be no issue of conflict between "theme per album" and colorbox. However there may be mis-configurations. Depending on what release you came from, the way colorbox gets loaded has changed. Now you must configure it for each script/theme combination. Before it was just loaded, perhaps by the theme itself. So perhaps some of your album themes are not configured to load colorbox or maybe it is getting loaded multiple times.

    Also as acrylian has mentioned, the javascript to actually attach colorbox to the target has to be in each script that uses colorbox and for each target to be attached. Perhaps that is not the case on all thems.
  • bic Member, Translator
    Thanks acrylian and sbillard for your support. Unfortunately the issue is not related with custom themes.
    The screenshoot here is taken with main theme zenpage and album theme garland
    http://www.antonioranesi.it/test/cbconflict.jpg
    as you can see the css is not loaded when the cb plugin is enabled.
  • acrylian Administrator, Developer
    I tried to reproduce this with the curretn svn / 1.4.2 beta. I could not reproduce locally the theme css not being loaded but the colorbox one strangely.

    Setup is that I have one main theme (acutally the local site to test our own sites theme) and one album without images and 2 subalbums that I set to default theme. Themes look as they should but the colorbox does not work on the default theme although set on the plugin settings.

    Update: Quick guess is that something with `getCurrentTheme()` is wrong on album themes. The colorbox in my test is only loaded on the album theme if set on the main theme. As I was testing a new version of the main theme I had forgotten to enable Colorbox at all for the "gallery" theme. So once I did for that theme's image.php there it was also loaded on the album theme, default theme, no matter how it was set for this theme. The theme's settings only applied to the default theme if it was the "gallery" theme.
  • That would be the nature of the beast. If you have an album them it is a different instance of the theme with possibly different options and settings.

    [edit] However, this should not impact the colorbox settings as they are not "theme" options but plugin options. There is, however, a problem sometimes with getCurrentTheme() where it will return the global theme. That will be fixed in tonight's build.
Sign In or Register to comment.