Mouse wheel andjavascript for horizontal scrolling

johnc331 / 2012-06-01 16:50:03   

I used to have my old version of Indexhibit set up to allow horizontal scrolling via the mousewheel and the horizontal format, using javascript and by adding a line of text to the index.php for the theme, see thread here and entries from mksh, copied below. Tried something similar with v2 and not working, any suggestions re getting this to work? I find it's a lot better than having to grab the scroll bar.

Quote:...............

It really should be as simple as adding one following line to to ndxz-studio/site/columner_theme/index.php or ndxz-studio/site/sample/index.php or ndxz-studio/site/eatock/index.php (depending on which them you choose at exhibit: settings --> theme)

1.
Download the .js from one of these locations
paulicio.us/wp-content/uploads/2008/10/…
marco-lammers.nl/ndxz-studio/site/js/…

And place it in your /ndxz-studio/site/js folder

2.
Add the following line to your theme's index.php (anywhere you want between < head > and < /head >:

End quote.................I tried changing /site/ to /ndxzsite/ but doesn't make it work. Knew it couldn't be that easy, but worth a try...

...............

johnc331 / 2012-06-01 16:52:53   

hmm, quote is incomplete and the original thread url is missing, above should say -

url for original thread: indexhibit.org/forum/thread/11953/

line that needs to be added (but which doesn't work with v2):

Vaska A / 2012-06-01 17:00:15   

This uses jquery right? Add this line to your format code and it will output...

  1. $OBJ->page->add_jquery(" . BASEURL . "/ndxzsite/js/hscroll.js", 30);

Make sure the hscroll.js file is in /ndxzsite/js/.

Let us know how it goes...

johnc331 / 2012-06-01 20:08:41   

Hi Vaska, thanks again for responding, please can you tell me exactly where to put that line? I tried adding it to the format.horizontal.php file just below the line below, but it caused my index page to disappear, had to remove to get the site back.

function default_settings()
    {
        $OBJ =& get_instance();
(added your line here)

johnc331 / 2012-06-05 10:27:11   

Anybody?

Vaska A / 2012-06-05 13:09:36   

In the createExhibit function...

johnc331 / 2012-06-05 17:54:26   

thanks again, but still no go, I already had put it in the createExhibit function but obviously in the wrong place, so tried again a line further up (copied below) but the exhibit then won't load on the webpage. Please can you tell me exactly where the code needs to be inserted?

function createExhibit()
    {    $OBJ->page->add_jquery(" . BASEURL . "/ndxzsite/js/hscroll.js", 30);
        $OBJ =& get_instance();
        global $default;
        
        $this->placement = (isset($OBJ->abstracts->abstract['title-placement'])) ?
            $OBJ->abstracts->abstract['title-placement'] : 0;

cnouyou / 2012-08-07 13:05:31   

Did anyone resolve this? I am also keen to have this funtion on my site.

pnetzer / 2012-08-15 17:02:07   

try to do it this way:

function createExhibit()
{ $OBJ =& get_instance();
global $default;
$OBJ->page->add_jquery('hscroll.js', 30);


works fine for me.

andu / 2012-08-15 18:35:57   

Thankee pnetzer, works for me to. (horizontal format replace 144-145 line to your code, and put js file)

cnouyou / 2012-08-22 11:17:10   

I've downloaded the .js (copied it).
Where do I paste it exactly?
and then how do I know which line is 144-145?
thanks

andu / 2012-08-22 12:27:48   

cnouyou
dropbox.com/s/qvftwafh6zdwlpx/…
put to plugin folder
dropbox.com/s/vmzhzk3qp6sayeb/…
put to js folder
but "Titles Placement" buttons not work for correct format :(
I switch Titles Placement on "Horizontal format", after switch to my correct "horizontalscroll format"

PS
If somebody knows how to correct "Horizontal format", and save "Titles Placement" buttons, please post the solution.

This thread has been closed, thank you.