I found a javascript script that uses the arrow to go forward and back in a gallery. I would like to make this a module instead of just adding it in my theme that way anyone using any theme can use it. Which funtions do I need to use to insert the code into the head section. I don't need any admin views since there will be no options. It will either be on or off.
Thanks,
Posts: 32509
lvthunder, depends...
is it pure css? do you mean arrows half transparent over the images? where do you need to insert code etc?
Posts: 808
No it's not CSS at all. It's Javascript. It goes in the head section of the page. When activated you can use the arrow keys on your keyboard to go to the previous or next image.
Posts: 16504
I don't suppose you could post a link to this javascript? Just incase it never makes its way into G2, I'd like to have that incorporated into my theme ;)
Posts: 808
Here you go nivekiam,
http://www.jalbum.net/forum/thread.jspa?threadID=1476&messageID=8770#8770
Posts: 32509
ah, an accessibility thing.
so just add a link to the js in the <head> section and that's all that's needed?
yes you can do that with a module. but kinda, there's no clean way at the moment to just add stuff to the <head> part.
so you have to create a module that somewhere in its code calls
$template->head('modules/modulename/templates/SomeName.tpl');
but i don't know any other way than creating a block in your module. so the user would have to add the block to album and photo pages...
Posts: 16504
lvthunder, Thank you. It's going to be great to have keyboard shortcuts for navigation.