zenphoto forums » Usage Support

Zenpage custom page: image links not working?

(9 posts)
  1. os07

    Contributor
    Joined: Oct '07
    Posts: 114

    In my custom pages within the Zenpage theme, I have successfully added content and edited out the things I don't need.

    However, when I try to link to any kind of image file, the image doesn't appear, although the alt text does. I have tried this with both JPG and PNG files - neither appear. The custom pages show this path:

    http://www.mysite.com/zenphoto/page/mynewpage

    And the broken image shows this path:

    http://www.mysite.com/zenphoto/page/images/someimage.jpg

    The image files are definitely there, in that folder. I have tried to change the location of the images to the same folder as the custom pages - same result.

    Why do they not display? Is the problem in how the path to the images is specified?

    Posted 1 year ago #
  2. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,368

    So these are custom theme pages or Zenpage plugin pages?

    What kind of images are those? Theme based? Zenphoto managed ones?

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #
  3. os07

    Contributor
    Joined: Oct '07
    Posts: 114

    I just took the archive.php page and made some changes, saved it as mypage.php, same folder: /zenpage

    The images are not part of ZP, nor are they part of the theme. They're just one or two images per custom page that do not occur anywhere else, and are not in any ZP gallery or album.

    Posted 1 year ago #
  4. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,368

    So and where are these images from, where are they located???

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #
  5. os07

    Contributor
    Joined: Oct '07
    Posts: 114

    I can place them wherever I need to. They are generally small graphic files, PNG, and one or two small JPGs. The illustrate some of the points made in the text on the custom pages.

    Posted 1 year ago #
  6. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,368

    Again, if the images don't show up, the urls to them are wrong. So where are they if not part of the theme and not managed by Zenphoto?

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #
  7. os07

    Contributor
    Joined: Oct '07
    Posts: 114

    I have traced this to a path problem, and have used the PHP code provided by ZP to specify the image path properly; problem solved!

    To specify the image folder within any theme without having to use the entire long URL as path, the correct method is:

    <img src="<?php echo $_zp_themeroot; ?>/images/myimage.jpg" />

    Posted 1 year ago #
  8. Zenphoto development team
    acrylian

    Developer
    Joined: Jul '07
    Posts: 13,368

    So they are theme based....You could have had this answer earlier if you had answered my questions above....

    Don't forget to read the Forum rules and usage resources
    Posted 1 year ago #
  9. os07

    Contributor
    Joined: Oct '07
    Posts: 114

    Sorry for the confusion, my mistake. I guess I was assuming that theme-based images meant that they would be included in all theme pages.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.