TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 629
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 529
  • Total: 529

Random photos from coppermine

Started by carver, September 22, 2005, 01:32:19 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DataAve

#140
This worked like a charm. Thanks, Bud!
Quote from: gerrymo

print "A random selection from our Gallery:<CENTER>";
include "../cpmfetch/cpmfetch.php";
$objCpm = new cpm("/cpg");
$objCpm->cpm_viewRandomMedia(1,5);
$objCpm->cpm_close();
print "</center>";


(Line 4 denotes 1 row of 5 photos)

edifier

   My host Cpanel has Fantastico and it appears will automatically install Coppermine. What would be left for me to do?. Just create a script block and put a script in it?.

                                                        Thanks

G6Cad

I think you need to bridge it into SMF first, but im not 100% sure there.

edifier

          Hello

    I'm still a newb and after reading this entire thread, didn't feel i was ready to tackle this yet. But was praying Fantastico would take care of all that for me :D

khoking

Quote from: edifier on February 27, 2007, 07:05:08 PM
          Hello

    I'm still a newb and after reading this entire thread, didn't feel i was ready to tackle this yet. But was praying Fantastico would take care of all that for me :D

You can install via Fanstatisco, but later you still need to bridge it to your SMF so that it uses one user database.

You can check my forum at www.PentaxWorld.com for example of how I integrated both into one  ;)

Svaha

I installed cpmFetch in a subdir of coppermine, made a php block with this code in it,

include_once"/local/web/coppermine/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("/local/web/coppermine/cpmfetch/cpmfetch_config.php");
  $options = array('windowtarget'=>'_blank',"imageattributes" => array("width" => "120")");
echo '<div align="center">';
  $objCpm->cpm_viewRandomMediaFrom("cat=8,2,3",1, 1,$options);
echo '</div>';


This give me a random centered thumb with a width of 120 px.

On another part of my site I want to display the last images that are uploaded. Now I run into trouble because cpm cannot be redeclared.
I think the best is to put the include and declare statement in for instance the index.template.php and to put the rest in the different blocks on my site.

Anyone done this?

khoking

I created TWO php blocks, one with random photos and one with latest photos.

Below are the codes that I use:

Latest Photos:
echo "<CENTER>";
chdir("../gallery/cpmfetch/");
include "cpmfetch.php";                   
$objCpm = new cpm();
$objCpm->cpm_viewLastAddedMedia(1,5,array("imageheight" => "75"));
$objCpm->cpm_close();
chdir("../../");
echo '<a href="http://pentaxworld.com/gallery">View Gallery</a>';
echo "</center>";


Random Photos:
echo "<CENTER>";
chdir("../gallery/cpmfetch/");
include "cpmfetch.php";                   
$objCpm = new cpm();
$objCpm->cpm_viewRandomMedia(1,5,array("imageheight" => "75"));
$objCpm->cpm_close();
chdir("../../");
echo '<a href="http://pentaxworld.com/gallery">View Gallery</a>';
echo "</center>";


However, Only Latest Photos are shown, and Random Photos have error with:

Error: config file not specified and default not found - did you run the install program?

How should I correct this?  :-\

G6Cad

that is something you need to ask on coppermine gallery forum.

yelegen

hello
Just have a question I have coppermine random pictures on my center block as php.

How can ı make all the pictures same size or frame it so they are all uniform I really did not see an direct answer to this. site  http://ampmnet.net

Thank you



G6Cad

Again something you need to ask on Coppermine forum as it's their code used.

This website is proudly hosted on Crocweb Cloud Website Hosting.