Advanced search  

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]

Pages: 1 2 3 [4]   Go Down

Author Topic: Display a random image on an external website.  (Read 87217 times)

0 Members and 1 Guest are viewing this topic.

doctoreast

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 32
Re: Display a random image on an external website.
« Reply #60 on: January 21, 2007, 07:24:16 am »

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
Logged

doctoreast

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 32
Coppermine/Cpmfetch Newbie
« Reply #61 on: January 21, 2007, 10:06:33 am »

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? 

Code: [Select]
<?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();
?>

Logged

doctoreast

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 32
Re: Display a random image on an external website.
« Reply #62 on: January 22, 2007, 01:05:55 am »

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
Logged

jam583

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Display a random image on an external website.
« Reply #63 on: February 09, 2007, 11:13:46 pm »

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!
Logged

doctoreast

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 32
Re: Display a random image on an external website.
« Reply #64 on: February 10, 2007, 04:16:15 am »

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.

Code: [Select]
<?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();
?>




Code: [Select]
<?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
Logged

paulo.nesso

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Display a random image on an external website.
« Reply #65 on: February 21, 2007, 12:47:26 am »

how to show by category?????
Logged

WebGhost

  • Coppermine newbie
  • Offline Offline
  • Posts: 17
Re: Display a random image on an external website.
« Reply #66 on: July 11, 2007, 03:08:32 am »

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 ?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Display a random image on an external website.
« Reply #67 on: July 12, 2007, 09:50:15 am »

This mod goes unsupported. We don't recommend using it. You're on your own if you decide to use it anyway. Locking.
Logged
Pages: 1 2 3 [4]   Go Up
 

Page created in 0.019 seconds with 19 queries.