Now only one custom jcarousel theme per page could be specified.

The attached patch solve this issue, using skin path for the inclusion control (now only a "custom" flag is used).

Note: Since two or more themes are used, skin.css should use a wrapper element selector to attach to the right element (e.g. a block id).

CommentFileSizeAuthor
#7 591120-7.patch1021 bytessp3boy
jcarousel-multiple-custom.patch912 byteschirale

Comments

robloach’s picture

Version: 6.x-1.1 » 6.x-1.x-dev

You mean having the same name for different skins? If you visit admin/help/jcarousel, you'll see there's use of different skins on the same page....

chirale’s picture

This example show three different themes, but only one custom theme. This issue rises only when there are 2 or more custom skin declared in the same page, since the $jcarousel_added['skin'][$skin] = TRUE; is set only one time when $skin = 'custom'.

Creating a new array that relying also on paths for custom themes solve this issue.

trevorwh’s picture

I can confirm this issue.

I haven't tested the patch above, but two custom skins definitely conflict.

hefox’s picture

Status: Needs review » Needs work

it's not just adding the css; all custom skins are named custom, so no way to nicely identify things in the css

Need a name/identifier for the custom css or such.

Patch works for the duplicate though.

dgtlife’s picture

For those looking for a resolution to the issue of multiple custom skins on the same page, but not inclined to deploy a -dev release, I confirm that the issue manifests in 6.x-1.1, and is eliminated by the application of the patch to that version.

It's a great module, and I'd like to thank Rob and other contributors for their effort in producing it...and to chirale for producing the patch.

sp3boy’s picture

Another vote of appreciation - this patch applies to 6.x-1.1 and may save my... er, skin for a site page with multiple carousels that I should have finished two days ago.

I still have conflicting CSS but at least if both skin CSS files are loaded I can resolve that hopefully.

sp3boy’s picture

StatusFileSize
new1021 bytes

Patch needed rebuilding after recent commits. No functional difference to previous one.

quicksketch’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev
Status: Needs work » Fixed

The 1.x version probably won't be receiving any further updates, but I've checked that this is not a problem with using jcarousel_add() in the 2.x version. Note that the parameters for the jCarousel 2.x version have changed (there's no longer individual $skin and $skin_path parameters).

$options = array(
  'skin' => 'myskin',
  'skin path' => drupal_get_path('module', 'mymodule') . '/jcarousel-myskin.css';
);
jcarousel_add('mycarousel', $options);

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.