Closed (fixed)
Project:
Views Slideshow Configurable Controls
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 May 2012 at 16:59 UTC
Updated:
31 Jul 2013 at 16:39 UTC
How exactly does one "Using hooks, any module can provide new skins to the configurable controls."
I have my own images I would like to use but would like to hook this module into using my own skin.
Comments
Comment #1
David Stosik commentedHi.
You need to implement hook_vscc_skin_info() (see vscc.module for an example), then declare (in hook_theme() ) and implement a theme function theme_vscc_element_[skin machine name]() (you can have a look at theme_vscc_element_black_icons() in theme/vscc.theme.inc).
Basically, if you just want to declare new images, you need following code :
Feel free to ask more questions if needed.
Regards,
David
Comment #2
capellicI found the instructions in #1 a bit difficult to follow, so here's how I got it done:
1. Create a custom module
Your custom module needs two functions. In the first one, change the function name so that "yourmodulename" is replaced with your module name and change "youriconsname" to whatever you want it to be. Also change "Your icons" to the name of your icon set, this will be how you identify it on the Views configuration screen.
Replace "yourmodulename" with the name of your module as you did for the first function and also chnage the name of the array key so that "youriconsname_icons" matches the array key defined in the function above. No other changes are necessary.
2. Create a theme function and upload your images
The VSCC module will automatically look for the various icons (previous, next, pause, resume) and this function essentially tells the module where to look for them. You will need to change the name of the function to match your theme and also update the name of the function to include your icon set name. Update the path so that it looks to your theme's base bath. Note that I've created a sub-directory within my theme's images directory to keep things organized. Place your images in this directory with the following names:
3. Turn on the module and clear cache
4. Edit your View to use your new icon set
Comment #3
David Stosik commentedThanks.
Comment #5
lsolesen commentedCould any of you update the documentation found here: http://drupal.org/node/909020 --> on how to create a Drupal 7 skin?
And maybe also how to change the controls here: http://drupal.org/node/1023904
Comment #6
lsolesen commentedAh, wrong project. Sorry.
Comment #7
thewrush commentedThanks David and capellic.
Comment #8
thewrush commentedWhere do I place the code?
- template.php
or
- theme-settings.php
One other question: Why does it have to have a custom module name? Why can't it just use vscc_vscc_skin_info()?