Download & Extend

Multiple custom themes on same page

Project:jCarousel
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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).

AttachmentSize
jcarousel-multiple-custom.patch912 bytes

Comments

#1

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....

#2

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.

#3

I can confirm this issue.

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

#4

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.

#5

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.

#6

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.

#7

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

AttachmentSize
591120-7.patch 1021 bytes

#8

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);

#9

Status:fixed» closed (fixed)

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

nobody click here