MyBB Community Forums

Full Version: Problem with cpmfetch
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm stupid....

I download copperminefetch-2.0.0.zip and copy to /galeria/cpmfetch

I use http://domowipupile.hekko.pl/galeria/cpm...nstall.php and i don't know

... Sad

I click install and have this:

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/intex/domains/domowipupile.hekko.pl/public_html/galeria/cpmfetch/cpmfetch_dao.php on line 1260

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/intex/domains/domowipupile.hekko.pl/public_html/galeria/cpmfetch/cpmfetch_dao.php on line 1264
i forgot that the install.php file has a bad query. The corrected version is attached here. Place it in /galeria/cpmfetch and overwrite the existing one. This one just removes a call to an old field.
Ok and now??


I see 2 random picture from my gallery.

These images were found and displayed by using the following PHP code:

<?php
  include "./cpmfetch.php";
  $objCpm = new cpm("./cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,4);
  $objCpm->cpm_close();
?>
Please note: Unless you are running this code from the same directory as the cpmfetch_config.php file, you need to alter that path so it can be found. The same goes for the include statement.

For example, if you want to add these images into your home page and your cpmfetch directory is inside your gallery directory (which is named gallery) it would look more like this:

<?php
  include "./gallery/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,4);
  $objCpm->cpm_close();
?>
now you need to configure the MyBB plugin cpmFetch settings and set the path to be ../galeria/cpmfetch

and then the images should start showing up where you have the templates modified with the variables we talked about earlier
THANKS!Big Grin


All is good;D
good to hear
Hello

I want to have random image but no last images

Could you tell me, how to set

Where can I set the number of images and number lines

Thancks a lot
(2013-03-18, 10:45 AM)mmlg620 Wrote: [ -> ]Hello

I want to have random image but no last images

Could you tell me, how to set

Where can I set the number of images and number lines

Thancks a lot

Solved :

I replace

cpm_viewLastAddedMedia

by

cpm_viewRandomMedia

and i change the numbers of options

in "cpmfetch.php" plugin !

for more information about functions, see : http://forum.coppermine-gallery.net/inde...ic=19564.0
Pages: 1 2