forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 plugins => Topic started by: Manutjee on May 14, 2015, 09:23:00 pm
-
I have installed CPMfetch recently on one of my sites, but I can't seem to get the code to work.
I believe I installed it correctly, but when I put the code in the location I want it to be, I get this error:
Warning: include(./folio/cpmfetch/cpmfetch.php): failed to open stream: No such file or directory in /home/writteninreverse/public_html/wp/wp-content/themes/wppremade04/header.php on line 46
Warning: include(): Failed opening './folio/cpmfetch/cpmfetch.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/writteninreverse/public_html/wp/wp-content/themes/wppremade04/header.php on line 46
Fatal error: Class 'cpm' not found in /home/writteninreverse/public_html/wp/wp-content/themes/wppremade04/header.php on line 47[/quote]
and I can't seem to solve it. I am still working on the theme (CSS styling), but I thought I'd install it to see if the code works. What am I missing or doing wrong?
CPMfetch code is:
[code]<?php
include "./folio/cpmfetch/cpmfetch.php";
$objCpm = new cpm("./folio/cpmfetch/cpmfetch_config.php");
$objCpm->cpm_viewLastAddedMedia(2,5);
$objCpm->cpm_close();
?>
Link to site: http://writteninreverse.starszz.com/wp/?preview_theme=wppremade04
-
The example given that you followed assumed you were adding the code to your webroot with gallery located one level down in folio directory...
If you are adding this code to pages in the wp directory, you need to change the code ./folio to ../folio (both occurrences).
As you have it coded it is looking for folio as a folder under wp.
Greg
-
The example given that you followed assumed you were adding the code to your webroot with gallery located one level down in folio directory...
If you are adding this code to pages in the wp directory, you need to change the code ./folio to ../folio (both occurrences).
As you have it coded it is looking for folio as a folder under wp.
Greg
Thanks it worked! I was searching my butt off, haha!