First time here? You are looking at the most recent posts. You may also want to check out older archives or the tag cloud. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS. Thank you for visiting! (hide this)

Subtext 1.9.5 is being tested by our QA department and hopefully will be released soon.

One of the new features of the new version is the upgrade of the code scripting library for image display from Lightbox v1 to Lightbox v2, but unfortunately this introduces a breaking change. Lightbox v1 requires only the lightbox.js file, while version 2 requires 2 more libraries in order to work: scriptaculous and prototype.
So if you built a custom skin that uses Lightbox v1 you have to manually update its definition inside the skin.config or skin.user.config in order to make it work with the new version.

Almost 2 months ago I wrote a post on how to add Lightbox v2 to a custom skin, but now that this library is part of the core scripts it's even easier.

A skin definition using Lightbox v1 looks like this:

<SkinTemplate ... >
  <Scripts>
    ...    
    <Script Src="~/scripts/lightbox.js" />
    ...
  </Scripts>
  <Styles>
    ...
    <Style href="~/scripts/lightbox.css" />
    ...
  </Styles>
</SkinTemplate>

To migrate to Ligthbox v2 you have to include the following 2 script definitions inside the <Script> tag:

<Script Src="~/scripts/prototype.js" />
<Script Src="~/scripts/scriptaculous.js?load=effects" />

The final skin definition should be like that one:

<SkinTemplate ... >
  <Scripts>
    ...
    <Script Src="~/scripts/prototype.js" />
    <Script Src="~/scripts/scriptaculous.js?load=effects" />
    <Script Src="~/scripts/lightbox.js" />
    ...
  </Scripts>
  <Styles>
    ...
    <Style href="~/scripts/lightbox.css" media="screen" />
    ...
  </Styles>
</SkinTemplate>

Hope this helps smoothing the migration process to the new version of Subtext 1.9.5. If you need assistance, just contact me or write a comment to this post.

Technorati tags: ,
posted on Friday, May 11, 2007 7:47 PM

Comments on this entry:

# Developers blogs upgraded!!

Left by Developers.ie News at 5/12/2007 12:16 AM

Developers blogs upgraded!!

# re: Breaking change in Subtext 1.9.5: update your custom skins

Left by Bear at 5/21/2007 9:27 PM

how do you use it?
If I upload my image using WLW to subtext blog is it automatically use the lightbox?

# re: Breaking change in Subtext 1.9.5: update your custom skins

Left by Simone Chiaretta at 5/22/2007 12:32 AM

In this post How-to add Lightbox v2 to a Subtext skin, look at step 5.
You need to add a rel="lightbox" to all the images you add in your post.

# re: Breaking change in Subtext 1.9.5: update your custom skins

Left by bear at 5/22/2007 1:06 PM

Hi Mr. Simone thanks for your reply.
So with WLW I have to manually edit using view HTML codes right? Isn't there any other way? I mean it can be tidious if you have to add rel parameters all the time.
Is that how you do it normally to post your blog? I can see that there are more customising script in your post, like the shadow for your codes. Do you manually edit the html tag? Or are there any other tools to post your blog that is more user friendly than wlw?

# re: Breaking change in Subtext 1.9.5: update your custom skins

Left by Simone at 5/22/2007 1:25 PM

@bear: yep, I do it, I change code manually.
For the images you don't really need to change the code in source view, because you can add a rel using the "add link" window in WLW.
For the dropshadow, I just use the syntax highlighting plugin, and then wrap the output with a div tag: not a very long process.

# re: Breaking change in Subtext 1.9.5: update your custom skins

Left by bear at 5/22/2007 3:34 PM

I see.
Thanks again. ;)

Comments have been closed on this topic.