SwitcherCSS Plugin v0.1

Hello, all

I've creating another plugin.
It's a selector CSS ;-)

I've need users than testing-it ! thanks :p

http://zenphoto.dev.stephane-huc.net/pages/SwitcherCSS-Plugin-EN

Comments

  • hucste Member
    If it's not possible to viewing my pages, go to : http://zenphoto.dev.stephane-huc.net and change the selector to zenpage theme ;-)

    and refresh the page! -it's a lag-
  • acrylian Administrator, Developer
    I will add an entry for this.

    Update: I think I will wait a little until I add an entry for this. Looking at the demo on your site's albums it seems not to work correctly yet. None of the 4 standards themes to select displays as they actually should look like. Besides that of course a welcome plugin that probably just needs some refining.
  • hucste Member
    thanks, acrylian

    I don't understand why the refresh is not good!

    HTML: The link CSS is writing correctly and the form, too, with attribute selected on the element option.

    PHP: the current theme is only the actived or the choiced (choice == active).
  • acrylian Administrator, Developer
    Well, you should keep in mind that a theme is more than just CSS. The efferscence+ theme and the default theme are completely different in structure. So you will have to really switch themes, not just the css. The latter will only work within a theme with different personalities (like eff+ and the default theme have).
  • hucste Member
    Ok!

    and, how can i do this ?!

    I declare an object gallery, and use her method setCurrentTheme();
    If, it's that ; it's that use in my code !
    else ?

    "What's else ?!"
    thanks for your help ;-)
  • acrylian Administrator, Developer
    A quick looks tells me that you use the "name" from the theme description to switch. That is actually the title. As with other items the actual folder name is the one to use. Haven't looked at the plugin itself but generally there is already a gallery object on themes ($_zp_gallery global that is).
  • hucste Member
    no ... i don't use the theme description name.

    i use the method getCurrentTheme() for get the actual theme ... and compare the return of the cookie with array_flip on method getTheme() !
  • acrylian Administrator, Developer
    Hm, ok, seems you are right, don't know where I had seen that in your source. I have just tried to use setTheme on a theme page directly and it worked as expected.

    I see this in your site's source:
    `






    `
    Seems you don't switcht but add css which results in a mishmash probably.

    (Once you got it working this might even be something for our demo site.)
  • hucste Member
    Yes, i've a problem to switch between themes.

    In first, You are on the album.php theme (exemple 'zenpage album.php').
    When you use the form to switch.
    It's submit a cookie to the script switcher.php (on the root gallery).
    This script refresh the location.

    Now, you are always on the album.php theme with new and desire theme css. (the code source html at bottom, wrote 'zenpage album.php')
    When you refresh (by F5), the album.php theme is good (like 'effervescence album.php').

    what's my mistake ?! I don't understand-it!
  • hucste Member
    So good ... I've a result!

    Close this post and delete, if you want.

    @acrylian: thank you.
Sign In or Register to comment.