coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: debragrant on August 29, 2006, 08:37:30 AM

Title: coppermine with Mambo
Post by: debragrant on August 29, 2006, 08:37:30 AM
okay so I'm wanting to add images from the last updated/created album on my front page (about 3 images).

In Mambo do I just need to create a module and place it where I want the images to show?
What code goes into the module?
Title: Re: coppermine with Mambo
Post by: Joachim Müller on August 29, 2006, 09:05:04 AM
We don't know how Mambo modules work and what you need to make mambo tick. Did you read the documentation that comes with cpmFetch and search the board?
Title: Re: coppermine with Mambo
Post by: debragrant on August 29, 2006, 02:43:47 PM
I've looked throught some threads and have a slight idea, but still not sure.

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_close();
?>


There must be people on here who use Mambo
Title: Re: coppermine with Mambo
Post by: vuud on August 29, 2006, 06:04:22 PM
Quote from: debragrant on August 29, 2006, 02:43:47 PM
I've looked throught some threads and have a slight idea, but still not sure.

<?php
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_close();
?>


There must be people on here who use Mambo


Google is my friend:

http://forum.mamboserver.com/archive/index.php/t-37946.html

This looked pretty complete.  Let me know how it works out
Title: Re: coppermine with Mambo
Post by: debragrant on September 01, 2006, 02:57:07 PM
I've tried that. The only why I can get any images to show is be using the url for that persons.

I have cmpfetch installed at gallery/cmpfetch
The script is gallery/cmpfetch/code.php

I get these errors:

Warning: main(./gallery/cpmfetch.php): failed to open stream: No such file or directory in /home/fhlinux222/m/maura-tierney.diva-host.com/user/htdocs/gallery/cpmfetch/code.php on line 2

Warning: main(./gallery/cpmfetch.php): failed to open stream: No such file or directory in /home/fhlinux222/m/maura-tierney.diva-host.com/user/htdocs/gallery/cpmfetch/code.php on line 2

Warning: main(./gallery/cpmfetch.php): failed to open stream: No such file or directory in /home/fhlinux222/m/maura-tierney.diva-host.com/user/htdocs/gallery/cpmfetch/code.php on line 2

Warning: main(): Failed opening './gallery/cpmfetch.php' for inclusion (include_path='.:/usr/share/pear') in /home/fhlinux222/m/maura-tierney.diva-host.com/user/htdocs/gallery/cpmfetch/code.php on line 2

Fatal error: Cannot instantiate non-existent class: cpm in /home/fhlinux222/m/maura-tierney.diva-host.com/user/htdocs/gallery/cpmfetch/code.php on line 3


my code is:

<?php
include "./cpmfetch/code.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewLastAddedMedia (1,1);
$objCpm->cpm_close();
?>


what am I doing wrong?

when I change to:

url/cmpfetch/code.php

the error I get is:

Warning: main(./cpmfetch/code.php): failed to open stream: No such file or directory in /home/fhlinux222/m/maura-tierney.diva-host.com/user/htdocs/cpmfetch/code.php on line 2

Warning: main(./cpmfetch/code.php): failed to open stream: No such file or directory in /home/fhlinux222/m/maura-tierney.diva-host.com/user/htdocs/cpmfetch/code.php on line 2

Warning: main(./cpmfetch/code.php): failed to open stream: No such file or directory in /home/fhlinux222/m/maura-tierney.diva-host.com/user/htdocs/cpmfetch/code.php on line 2

Warning: main(): Failed opening './cpmfetch/code.php' for inclusion (include_path='.:/usr/share/pear') in /home/fhlinux222/m/maura-tierney.diva-host.com/user/htdocs/cpmfetch/code.php on line 2

Fatal error: Cannot instantiate non-existent class: cpm in /home/fhlinux222/m/maura-tierney.diva-host.com/user/htdocs/cpmfetch/code.php on line 3
Title: Re: coppermine with Mambo
Post by: n3n on September 01, 2006, 11:56:06 PM
Im using cpmfetch on my joomla (or mambo) frontpage. Ive jus added a div where ive put the cpmfetch code. When i want to add a module, its just places itself beneath my cpmfetch div, so you dont lose half of the page.

Just use cpmfetch as usual.
Title: Re: coppermine with Mambo
Post by: debragrant on September 04, 2006, 08:47:39 AM
I'll try that way again last time I did that I just got the code. Maybe that was due to trying it at work and some stuff not working.

edit:  do you mean create a mod and add the code to it? if not how do I create a <div>

I created a mod called 'latest images' and added the following code into the custom output section

<?php
include "./gallery/cpmfetch.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_close();
?>


All I get is

cpm_viewRandomMedia (1,1); $objCpm->cpm_close(); ?>

showing on my front page