Display a random image on an external website. - Page 4 Display a random image on an external website. - Page 4
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Display a random image on an external website.

Started by djib, January 15, 2006, 01:30:56 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

doctoreast

HI,
  This random image code get_photo also
supposedly has an option to call random
images from specific albums.

// For example get_photo?album=6&nb=4 will
// display 4 photos from album 6.
<?php include("http://yoursite/gallery/get_photo.php?album=2&nb=1"); ?>

  Please, has anyone had luck with this?  Mine
is still pulling random pics from random albums,
and I'm unsure of how to modify the script.

Please Help?
Mikey

doctoreast

Hi,
  It is now 3am, and I've been through pages and freaking pages,
looked at all other options because I am no freaking PHP programmer.
What cpmfetch needs is a wizard to build the scripts and link include
strings,  to where people like me can just copy and paste from there. 
Adsense/Adbrite type wizard is what I"m thinking of.  Other than that,
I really don't see the point; and I can understand why you guys have
this support category locked from new titles.

  Can someone please point me to a very well documented cpmfetch
script which will grab one random thumb from one specific album, with
no text or links around it? 


<?php 
///  PATH TO cmpfetch.php  ////
include "http://mysite.com/cmpfetch/cpmfetch.php";
/// PATH TO ???????? ////
$objCpm = new cpm('/photos');
/////  Syntax: cpm_viewRandomMediaFromAlbum( # rows, # cols, album id#, styleHas?h); ////
$objCpm->cpm_viewRandomMediaFromAlbum(1,1,2);
///  CLOSING TAG  ////
$objCpm->cpm_close();
?>


doctoreast

For the record, as this might help others:

   Install fetch folder in your gallery folder,
and get it configed so that the test file
works.  The latest dev verson has a
install file, but you have to change permissions
on the folders and files to get past the errors
that you will see, so that it can "install".

  When building or using any cpmfetch scripts,
always upload and leave them in the cpmfetch
folder.  If you put them elsewhere, fetch will
not be able to process that code, as it can't
see it.  In your website pages, use another
include string to call the fetch scripts into action.

East

jam583

I couldn't figure out how to start a new thread in the main area so here goes ..

The error I am getting is:

CPG Config file not found: /home/gmpt/public_html/home/gmpt/public_html/gallery/include/config.inc.php

Test is at :

http://www.gmperformancetuning.com/cpmfetch/cpmfetch/cftest.php

Please advise .. the config.inc.php file is there!

doctoreast

jam,
  you may need to play around with the path on your script.
Try the full http://site/gallery/cpmfetch/ absolute URL instead.
Be sure to leave the script in the cpmfetch folder, and call it
from elsewhere using an include.

  Post your script code, that we can see it.
I have mine working on 3 different websites.  Here's the
script's I'm using, if it might help you.

<?php 
///  PATH TO cmpfetch.php  ////
include "./cpmfetch.php";
/// PATH TO COPPERMINE IF IRREGULAR ////
$objCpm = new cpm();
/////  Syntax: cpm_viewRandomMediaFromAlbum( # rows, # cols, album id#, styleHas?h); ////
$objCpm->cpm_viewRandomMediaFromAlbum(1,1,18);
///  CLOSING TAG  ////
$objCpm->cpm_close();
?>





<?php 
///  PATH TO cmpfetch.php  ////
include "./cpmfetch.php";
/// PATH TO COPPERMINE IF IRREGULAR ////
$objCpm = new cpm();
/////  Syntax: cpm_viewRandomMediaFromAlbum( # rows, # cols, album id#, styleHas?h); ////
$objCpm->cpm_viewRandomMediaFromAlbum(1,1,17);
///  CLOSING TAG  ////
$objCpm->cpm_close();
?>






pe

paulo.nesso


WebGhost

As my question is relevant about this hack so cannot start new topic so i hope mods admin will not annoy on me.
I have three question about this hack, will anyone help ?
1: How to control thumbnails size ?
2: How to show thumbs vertically ?
3: How to put space between thumbs ?

Joachim Müller

This mod goes unsupported. We don't recommend using it. You're on your own if you decide to use it anyway. Locking.