Forum

Thread tagged as: Problem, Installation, Gallery

Gallery (Perch 1)

I have added <?php perch_gallery_build(); ?> to the page and the thumbnails are shown, but when I click on one of them, the URL changes to ..../image.php?id=1 and all I see on the page is the following:

‰PNG  IHDRP4!æ¹IDATX…myY¯l×q^U­qOÝ}†Ë{IM”#‰“y±‹¢$ëJ¢hRޝç¼%ȏ2,G5¡Aòâ±-x/ÉsNwïaÍUyhŠ‚ÔÃÆF­Ú¨UU_ kmüñ;ÿ’K©ì´é¬¿[N%×O=y²ÅpZ×Ü* |òÉKï<ÿíÔ½sD$,µqi…EJ®‡qÄ5nƒëÎÛrrÆ]ï¦ÓºvΕ’Y€Œ±¥äÒØefðÖr«ç¬¶µå±ëY¤Ô¦1K®¥÷Î*»„•HkEc€ëÝ^)z8½÷Ì쌵Vp<6xéöš…ÏK˜·uê{­

...etc. (there is a lot of it)

Dan T

Dan T 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Is this one particular image, or all images?

Dan T

Dan T 0 points

Well it's quite interesting because I've just looked and the image.php file is what I used for the contact page form verification where you enter the number shown in the image to complete the form. The image.php file is top-level outside of the Perch folder.

So it's totally different to the Gallery App and I have no idea why it would go to that file when a Gallery thumbnail is clicked. Surely it should be using the files from within 'perch/apps/perch_gallery'?

Drew McLellan

Drew McLellan 2638 points
Perch Support

No, it should be a page in your site that uses the Gallery functions to lookup and display an image.

Dan T

Dan T 0 points

Yeah it is. The file structure is below:

css/
    main.css
img/
    logo.jpg
    etc...
js/
    jquery.min.js
    nav.js
about-us.php
index.php
contact.php
image.php  <------------ this is the file I'm shown when clicking on a thumbnail
gallery.php  <----------- perch_gallery php on this page

Below is the code for gallery.php:

<?php include('admin/runtime.php'); ?>
<!DOCTYPE HTML>
<html>
<head>
    <link rel="stylesheet" type="text/css" href="css/main.css"/>
    <script type="text/javascript" src="js/cssrefresh.js"></script>
</head>

<body id="bgNews">
        <header id="mainHeader">
            main nav here...
        </header>
        <main id="mainContent">
                <article id="mainText" class="span9">
                    <?php perch_gallery_build(); ?>
                </article>
        </main>
        <?php include("inc-footer.php"); ?>
</body>
<?php include("inc-analytics.php"); ?>
</html>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you changed the links in the template to point to whichever file you want to use to display images?

Dan T

Dan T 0 points

Which template file is that? .../perch_gallery/templates/gallery/album.html?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Could be! Copy /addons/apps/perch_gallery/templates/gallery to perch/templates/gallery and then you can edit any paths you need to change.

Dan T

Dan T 0 points

That's not really helping me.

I followed all 5 steps from here: https://support.grabaperch.com/index.php?pg=kb.page&id=144 so all I need to do now is just add <?php perch_gallery_build(); ?> to a page with a call to the runtime.php file at the top and that should be it, right? Obviously making sure that images have been uploaded.

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's a set of tools for building an image gallery. You can use the example files to get going (they're in the zip) or you can built the pages out yourself, editing the templates as necessary.

If you do only one of those things, the dots won't join up.

Have you tried the example files? They might be a good place to start.

Dan T

Dan T 0 points

I uploaded the example files but they're not working either. They should work straight off shouldn't they?

Drew McLellan

Drew McLellan 2638 points
Perch Support

In what way are they failing? I would expect them to work - but we're talking about very old software at this point.

Dan T

Dan T 0 points

I can see the text on the test pages but nothing else.

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Please post your Diagnostics Report, you can find it under Settings in Perch.

Dan T

Dan T 0 points

Can you tell anything from that?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Only that you're on the latest versions of Perch 1, which is useful.

Do you get any errors in the page source or in your server's PHP error log?

Does it work in a clean site in your dev environment?

Dan T

Dan T 0 points

This just isn't working, I'm going to have to use a jQuery plugin from somewhere but my client won't be able to use it in Perch then.