Hi again.
I have a simple question that I tried to solve without success.
If it's not the good place to ask that, just forgive me and forget it. :-\
My install of Cpmfetch (1.9.11) was ok :) but I can't include my working cpmfetch php file in an article with mini-cms plugin which allows the administrator to build html pages in Coppermine.
Some people have the same problem as you can see here :
http://cpg-contrib.org/board/index.php?topic=10.new
Do you have any idea about the best way to do it ?
Quote from: balafre on March 07, 2007, 05:19:35 PM
Hi again.
I have a simple question that I tried to solve without success.
If it's not the good place to ask that, just forgive me and forget it. :-\
My install of Cpmfetch (1.9.11) was ok :) but I can't include my working cpmfetch php file in an article with mini-cms plugin which allows the administrator to build html pages in Coppermine.
Some people have the same problem as you can see here :
http://cpg-contrib.org/board/index.php?topic=10.new
Do you have any idea about the best way to do it ?
Can you run PHP from a mini-cms page or whatever?
I've never played with it so I have no idea what its capabilities are
Quote from: vuud on March 07, 2007, 05:53:32 PM
Can you run PHP from a mini-cms page or whatever?
I've never played with it so I have no idea what its capabilities are
As far I know, In fact no.
So I have no other choice but include it in a php page.
But when I call the cpmfetch php page outside its directory it doesn't work at all. So I'm stuck. ???
Could you please tell me if this syntax used in a page outside cpmfetch (a level up) to call it is right ?
<?php
include('./cpmfetch/page-which-works-in-cpmfetch-directory.php');
?>
It doesn't work for me.
:-\
Quote from: balafre on March 07, 2007, 09:14:55 PM
As far I know, In fact no.
So I have no other choice but include it in a php page.
But when I call the cpmfetch php page outside its directory it doesn't work at all. So I'm stuck. ???
Could you please tell me if this syntax used in a page outside cpmfetch (a level up) to call it is right ?
<?php
include('./cpmfetch/page-which-works-in-cpmfetch-directory.php');
?>
It doesn't work for me.
:-\
What? No. You want to do the actual CPMFetch code right in that page...
Post the code you are putting in your php page outside the cpmfetch directory and the error you get and I will tell you what is wrong
You can't use PHP inside MiniCMS-blocks.
Quote from: GauGau on March 08, 2007, 08:58:04 AM
You can't use PHP inside MiniCMS-blocks.
Yeah I realised that, Gaugau. I hoped a trick about it but I figure I have to do do it in another way (maybe the title of this thread is no relevant anymore). Thank you for your answer.
In fact my goal is to display some cpmfetch data on my coppermine index.php page.
I succeded in displaying these datas on a test page at the same directory level of my home page using this 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 problem is to display it on my category page (coppermine home page).
So I wrote the code above (without <?php and ?>) in the // HTML template for the category list in my theme.php but it only displays the code, not the datas.
Do you have any idea if I made it wrong ?
Thank you for your time (sorry for my english and my php wizard ::) skills...)
Sorry, we cross post.