Hi,
as I realised that my previous request was about a different topic (sorry) and if I understand correctly the board policy, I must create this new topic.
Then, my cpmfetch install is fine, I run without problem the datas it provides outside cpmfetch.
Here is the code :
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("./cpmfetch/cpmfetch_config.php");
$source = "keyword=all-right-mama";
$objCpm->cpm_viewRandomMediaFrom($source,1,1,array("imagestyle" => "test1","subtitle"=>"%a","alttag"=> "%a","imagesize" => "large","subtitlelink" => "","imagelink" => "album"));
$myarray = array("subtitle"=>"%a","alttag"=> "%a","subtitlelink" => "","imagelink" => "album");
$objCpm->cpm_viewLastAddedMedia (1,1,$myarray);
$objCpm->cpm_close();
?>
My goal is to display these datas in my theme.php file in the main category section (coppermine home page).I have read the docs and search the board.
So I split
<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("./cpmfetch/cpmfetch_config.php");
and
?>
to the begining and at the end of my theme.php and remain the rest of the code :
$source = "keyword=all-right-mama";
$objCpm->cpm_viewRandomMediaFrom($source,1,1,array("imagestyle" => "test1","subtitle"=>"%a","alttag"=> "%a","imagesize" => "large","subtitlelink" => "","imagelink" => "album"));
$myarray = array("subtitle"=>"%a","alttag"=> "%a","subtitlelink" => "","imagelink" => "album");
$objCpm->cpm_viewLastAddedMedia (1,1,$myarray);
at the place I want it to be displayed in the // HTML template for the category list.
but it doesn't work, it only displays the code, not the datas.
Did I missed something ?
Do you have any idea if I made it wrong ?
Thank you for your time (sorry for my english and my php wizard skills...)
I guess that I'm a (tenacious) pain.