I'm not PHP savvy, i can look at the code and kind of tell what it does, but i cant write it myself.
I got the PHP include from the Installation screen:
<?php
include "./cpmfetch.php";
$objCpm = new cpm("./cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(1,4);
$objCpm->cpm_close();
?>
Copied and pasted it into my content space on my site, heres the errors im getting:
http://gfxdashboard.lasglade.com/gallery.php
I'm not sure if its not finding the files or the images themselves, or if im just doing the include path correctly.
My serber goes as such:
gfxdashboard
-cpg1416 (coppermine)
--albums
--bridge
--cpmfetch
Other CPG Folders
(Main site files, still in the gfxdashboard index)
-forum.php
-gallery.php (where im trying to get the php include to work)
-index.php
-links.php
Am i just not getting the path right? it seems like thats what it is, but im not sure.
i understand how an include works, but something about this isnt clicking with me.
I couldnt find an Edit button... sorry for the double post..
Heres the link to my Coppermine gallery if you need that:
http://gfxdashboard.lasglade.com/cpg1416/
Try this:
<?php
include "cpg1416/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(1,4);
$objCpm->cpm_close();
?>
Your path was wrong. Also this was the wrong section. http://forum.coppermine-gallery.net/index.php/board,87.0.html is the board you needed to post it in.
Whoops my mistake forgot to change the path here too:
<?php
include "cpg1416/cpmfetch/cpmfetch.php";
$objCpm = new cpm("cpg1416/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(1,4);
$objCpm->cpm_close();
?>
Quote from: formulx on March 27, 2008, 10:29:23 PM
Whoops my mistake forgot to change the path here too:
<?php
include "cpg1416/cpmfetch/cpmfetch.php";
$objCpm = new cpm("cpg1416/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(1,4);
$objCpm->cpm_close();
?>
thanks for the help mate, worked like a charm.