forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: gruhle on February 20, 2009, 01:39:14 pm
-
Hello,
I'm using CpmFetch with a CMS called contenido. My PHP-script looks like this:
<?php
require_once "./cpmfetch/cpmfetch.php";
//include "../cpmfetch/cpmfetch.php";
//$objCpm = new cpm("/coppermine/coppermine");
$objCpm = new cpm("./cpmfetch/cpmfetch_config.php");
$source = "";
$options = array(
"alttag" => "%t (Foto: %o)",
"imagelink" => "album",
"windowtarget" => "_blank",
"imagesize" => "int",
"imagewidth" => "190"
);
$objCpm->cpm_viewRandomMedia(3,1,$options);
$objCpm->cpm_close();
echo "<br>";
?>
In the majority of cases this works fine. But sometimes for some pictures only the alt-tag is shown but not the picture itself.
(URL: http://www.Ried-Foto.de (http://www.Ried-Foto.de)
Now I don't know where the problem is. Is it a problem of CpmFetch? Is it a PHP-Problem? Or have I to clear it within the CMS? Any hint?
Thx!
Reiner
-
Just guessing blindly: you have quotes in the description (caption etc.) of your files, which will (if not escaped properly) break the HTML tags.
-
Hello Joachim,
Just guessing blindly: you have quotes in the description (caption etc.) of your files, which will (if not escaped properly) break the HTML tags.
Thanks for that hint. But the quotes seem not to be the problem as they are escaped properly.
-
We'd need to see an example that doesn't work. When I accessed your site, the data from cpmFetch actually did show. It's hard to track stuff you can't see.
-
Hello Joachim,
sometimes it works properly :) ....
But I made three attempts and all three got the error. :(
See Snapshots attached.
There are three pictures called but only one (snapshot2) oder two (snapshot1, snapshot3) are shown. The texts shown are the alt-tag of the not shown pics.
Greetings
Reiner