Comments

  • acrylian Administrator, Developer
    You did assign the css ID "starthere" to some element? If not it is of course not working ;-)
    This is standard html/browser behaviour by the way.

    JS generated IDs might not work. Our links on user guide articles like these for example:
    http://www.zenphoto.org/news/using-zenpage#assigning-a-specific-user-to-a-page-or-article

    As they are created by a JS script for the table of contents on the top right they do work in Webkit browser (Safari/Chrome) but not Firefox if directly accessed. Once you are on the page they do work. Probably because they are created after loading the page DOM. That is browser dependent. But if you statically assigned ids in html that should not be a problem.
  • Yes... I do have
    ``` `
    near the bottom of the page.
    In this format:
    ```href="<?php echo html_encode(getNextImageURL()); ?>#starthere"`
    when I hover over the green next/previous arrow in any of the browsers, the link reads:
    http://mysite.com/index.php?album=virginia&image=heiNad.jpg#starthere

    Safari honors it, but Firefox and IE do not...

    I also tried
    ```href="<?php echo html_encode(getNextImageURL()); print('#starthere') ?>"`
    and the output is the same:
    http://mysite.com/index.php?album=virginia&image=heiNad.jpg#starthere</p&gt;
    <p>My question: (I came across php snippet...) Could I replace the ```print ()`
    immediately above with ```parseURL ()`?
    I tried already of course, but as is--it just cuts off the page when it gets to the green arrows.

    Another idea... ```rawurlencode()`
    I tried this instead of ```html_encode()` but got this error when not following the link:
    The requested URL //index.php?album=cruisers/roadstar&image=IMG_8048.jpg was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    I also appreciate you showing me the zenphoto article link that displays the same behavior as I'm describing. I looked through the page source, but couldn't find the script or any other clues as to how that method works. ...sorry...

    I hope there is a direct solution to this... if not, I may remove the header div from image.php and in this way force the image to be the center of the screen... The constant jumping up and down when navigating through images has to be eliminated.

    Thanks again for the feedback, it keeps me motivated.
  • acrylian Administrator, Developer
    You cannot use parseURL (you don't want to parse anything) or rawurlencode here.

    I just tried with the Zenpage theme on its image page using the id "content-left" it has with prev/next image. Works in all browsers as expected with and without (like you apparently use) modrewrite links.

    Anyway, this is standard behaviour of html/browser Zenphoto has nothing to do with. The example I showed with the direct link is just because the ids and anchors are generated dynamically. This is not the case with plain html. If that doesn't work something else is wrong.

    You don't need to use `print` actually as you can just append the `#starthere` within the plain html tag. The clue might be the empty `` tag you are using. You don'T need to set a "name" anchor, an id on any element works. (well, of course not in old IEs but who cares).
  • You're right "name" anchor is useless, and I only added it once "id" alone wasn't working...

    This is what the unmodified Zenpage theme div/link looks like:

    ````

    ...with the exception of me adding "#starthere" at the end of the href...
    From your response I gather that you are doing the same thing, right?
    Isn't this a dynamic link, and not a plain html link?
  • acrylian Administrator, Developer
    I did the same using the "content-left" id. The link is dynamic but not that kind of dynamic I meant with the user guide example. That is JS dynamic created in the browser after loading hte page, this link is created before loading the page.
  • I'm catching on...
    When I just used an existing "id" it is now also working for me in all browsers...
    So then I thought it must be the empty "anchor" that's the problem, and deleted it.
    ...and then guess what, as I'm scrolling through image.php I found another instance of the the darn thing right by the header:
    ``` `

    So I moved that one back down to the footer, and of course it works just the way it's supposed. I am sorry for wasting yours and my time. Safari simply rendered it right at the "h4" tag where I had placed it, and firefox at the top of the "header" div since the "a" tag followed right after the "div" tag. I feel like crap.

    As a consolation for anyone else reading this, another method I learned through all this is the following JQuery:

    ``$(window).load(function() {

    $(window.scrollTop(300)

    })``

    where the 300 is equivalent to 300px...
Sign In or Register to comment.