Want to create a Arrow Navigation Module

lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Sat, 2005-09-03 23:48

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,

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-09-04 02:38

lvthunder, depends...
is it pure css? do you mean arrows half transparent over the images? where do you need to insert code etc?

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Sun, 2005-09-04 05:53

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.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2005-09-04 07:45

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

 
lvthunder

Joined: 2003-09-12
Posts: 808
Posted: Sun, 2005-09-04 13:27
 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-09-04 14:35

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

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Sun, 2005-09-04 17:50

lvthunder, Thank you. It's going to be great to have keyboard shortcuts for navigation.