We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36805
    • 354 Posts
    Hi,

    I would like to add 2 hyperlinks in the description part of the big picture view inside of the slimbox. Our customer wants to include hyperlinks in there that can be used to navigate to the next or previous picture. This is because he feels that the one’s that appear when moving over the image are a little hard to see and because they dissapear when moving off.

    I know i need to add some placeholders to a template, but i dont know which placeholders and which template. Reading didn’t help so i am hoping someone in here is able to help me. Thanks in advance!
      • 7923
      • 4,213 Posts
      There is two ways to do it. You could put the links to the title attribute of the links, but then the page wouldn’t validate anymore as title attribute can’t have html code in it. Other way to do it would be to edit the slimbox javascript (around line 190) to make the links in to the description div for next/prev image.


        "He can have a lollipop any time he wants to. That's what it means to be a programmer."
        • 36805
        • 354 Posts
        Quote from: doze at Mar 04, 2007, 03:32 PM

        There is two ways to do it. You could put the links to the title attribute of the links, but then the page wouldn’t validate anymore as title attribute can’t have html code in it. Other way to do it would be to edit the slimbox javascript (around line 190) to make the links in to the description div for next/prev image.

        I tried what you said but i did not succeed. It is hard for me to describe exactly every variation i tried but i will try anyway:

        First i constructed links using tags like these <a href="[+maxigallery.previous_page_url+]">previous</a> and <a href="[+maxigallery.next_page_url+]">next</a>
        However after i save the changes (from the gallery manager) it gets turned into the folowing HTML:
        <a href="">previous</a> and <a href="">next</a>
        So those links go the the root page instead of the next and previous pictures sad

        Then I tried to edit the javascript. First i thought the urls would be stored in some kind of a var. I wanted to find those and concetenate them to the string where among other things the description gets put in. (This is indeed around line 190, more exact: line 191).

        It turns out however that the next/previous link handling is not a simple href based linking. Instead the href location simply links to http://www.mydomain.com/# for both of the links. The way slimbox shows the right images is by fiddling with the onclick event and some mootools magic. What I would need now is a way to emulate this behaviour somehow in a regular textbased hyperlink.

        I am affraid that with my little experience in javascript and mootools I cannot get the job done. I would need some more specific hints about how to extend the j-script. If anyone has some ideas i’d be very grateful if you could try and help me.