Multiple skins

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple skins

1299
I changed the skin to fit images differently. But I don't want that skin to be used in HTML,IFRAME etc.

There seems to be no way to change the skin on runtime. I tried recalling the Shadowbox.loadSkin command but that doesn't work.

Tried unloading and loading the palyer again but they also doesn't work. It also seems you can't run multiple shadowboxes on one site.

So what is the use of skins when you can only use one for every display element?
Reply | Threaded
Open this post in threaded view
|

Re: Multiple skins

Wizzud
The 'skin' is for Shadowbox - not for each type of media that Shadowbox is capable of displaying. That would be like skinning Winamp to automatically switch between a stetson for country music and a jukebox for rock 'n' roll!
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: Multiple skins

1299

Wizzud wrote:
>
> The 'skin' is for Shadowbox - not for each type of media that Shadowbox is
> capable of displaying. That would be like skinning Winamp to automatically
> switch between a stetson for country music and a jukebox for rock 'n'
> roll!
>
>
Quoted from:  http://www.nabble.com/Multiple-skins-tp18889196p18899089.html

I understand where you're coming from, but if I want to let's say: display a title for images some place else, doesn't necessarily mean I want that to apply to other elements as well.

To continue in terms of the winamp skin example: a skin can display the equalizer differently from the playlist.
Reply | Threaded
Open this post in threaded view
|

Re: Multiple skins

zulaica

Using your equalizer example, the Title bar can look differently from the caption bar. ;-)

Multiple skins aren't currently supported based on MIME/file type. One could imagine having two instances of Shadowbox set up, but that would just open up a whole new can of worms. Instead of a separate skin, depending on what it is you're trying to achieve, you may want to set up each link differently either making use of the TITLE attribute or other advanced options outlined in the usage page:

When using the markup method, each of these options may be present in one form or another. A link's gallery name, height, and width may all be configured within the link's rel attribute. Similarly, its title is contained in the title attribute and the content value defaults to the link's href. The content type is then derived from the extension on the linked file.

So, now that you know what's really going on behind the scenes, you can just pass objects that contain these pieces of information to Shadowbox.open as in the following example.

http://mjijackson.com/shadowbox/doc/usage.html

Reply | Threaded
Open this post in threaded view
|

Re: Multiple skins

zulaica
For example:

<a href="file.foo" rel="shadowbox;title=Insert Title">foo</a>
Reply | Threaded
Open this post in threaded view
|

Re: Multiple skins

mjijackson
Administrator
In reply to this post by 1299
The primary reason that you can't use multiple skins on the same page is the nature of CSS. If you load a skin, you load a CSS file. In order to change that skin, you would need to load a different CSS file, that, BTW, somehow overwrites every setting in the first CSS file so that you don't get any cascading going on. Then, reverting back again would be very difficult as well. Besides, how would you transition between them?
Reply | Threaded
Open this post in threaded view
|

Disable title only? Re: Multiple skins

xdexx
Is it possible to somehow disable loading of title div is some instances of shadowbox, maybe within the link's rel attribute?

I am using a small graphics instead of text for the title, but it is not applicable to all instances of the shadowbox...

TIA!
Reply | Threaded
Open this post in threaded view
|

Re: Disable title only? Re: Multiple skins

Wizzud
http://mjijackson.com/shadowbox/doc/usage.html#markup
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: Disable title only? Re: Multiple skins

xdexx
Thanks Wizzud, but removing the 'title' attribute from the link does not hide the 'title' div, so the graphics used for it still shows...
Reply | Threaded
Open this post in threaded view
|

Re: Disable title only? Re: Multiple skins

Wizzud
How have you put the graphic in the title?
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: Disable title only? Re: Multiple skins

xdexx
In the skin.css:

#shadowbox_title {
  height: 26px;
        background: url(../../../images/drag.png) no-repeat center;
}

This is useful for instances when shadowbox loads large, scrollable graphic ("shadowbox;options={handleOversize:'drag'}"), but totally out of place when shadowbox loads simple HTML content (i.e. contact form)...


Thanks for looking at it!

Reply | Threaded
Open this post in threaded view
|

Re: Disable title only? Re: Multiple skins

Wizzud
Try shifting the background image onto #shadowbox_title_innner instead of #shadowbox_title.
It's the inner bit that gets animated, but only if it has content.
This does mean, however, that you will have to supply something ('<div></div>', or '< span>& nbsp;< /span>',  or just '& nbsp;' maybe?) as the title for stuff that you currently may not have a text title for, but still want the background image to display!

Combine literacy with curiosity and a whole world of information opens up to you