Where to put custom skins

mariagwyn - May 21, 2009 - 16:43
Project:jCarousel
Version:6.x-1.1
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I would like to create a custom skin for 6.x. I did this in 5.x, and placed the skin in 'sites/all/includes/jcarousel/skins/custom.' However, in 6.x, the module does not require the 'includes' folder. I assume that I can place the skin in 'modules/jcarousel/skins/custom.' This means that when I update the module, I need to reupload the skin.

So, the question: can I place the skin in a separate folder in my sites folder? this way, it will not be overwritten. If the answer is yes, can you specify:
1. where I can put it (that actual folder name)
2. what I need to add in the jcarousel_add().

I will write this up as documentation which can be added to the read me. It would help for the read me to be specific to drupal, not simply jcarousel in general (the documentation for that is great!)

#1

michaelbn - May 31, 2009 - 08:38

Hi,

Took me some time, the document is sparse and I had to dig the code to understand it.
Here is a sample of what worked for me:

<?php
// Create an array with HTML data ( I used imagecache but its not necessary )
$images = array();
  foreach (
$field_gallery_image as $key => $value) {
 
$images[] = "<a href='/blabla'>".theme('imagecache', 'gallery_thumbs', 'gallery_raw/'.$value['filename'], $value['data']['alt'], $value['data']['title'])."</a>";
}

// Options to pass to the carusel
$options = array(
"visible" => 9,
"scroll" => 1,
"wrap" => "both",
);

// Build the carusel
print theme('jcarousel', $images, $options, "gallery", "sites/default/themes/raphael/jskins/gallery.css", 'horizontalcarousel');
?>

** Note that the custom skin path must never start with a / **

 
 

Drupal is a registered trademark of Dries Buytaert.