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,966
  • Latest: safir45
Stats
  • Total Posts: 195,990
  • Total Topics: 21,323
  • Online today: 1,050
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 360
  • Total: 361
  • lurkalot

Gallery Request...

Started by IchBin, April 09, 2005, 07:09:41 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

IchBin

Now I know you will eventually put a gallery in this. But I was wondering if it would be possible to make a block that would display a random photo from the coppermine gallery?

Bjørn

I suppose it is, if coppermine has a function for this, it should be easy to do it an a php-block. Just include the file with the function and run that function.

It may be faster to directly take it from the database though...but that will require details on how coppermine stores it.

Homer_J_S

IchBin, I have done this with my site and yes there is Mod for this in coppermine. Its called coppermine Fetch. If you do a search on Copermine Fetch on the coppermine boards you can get all the info you seek. Here is the website of the author that goes into detail and where you can download the code. http://www.fistfullofcode.com/projects/copperminefetch/

Once this is installed and working properly you just put this code in a HTML block in TP on your site:
[img]http://yoursite.com/cpmfetch/cfig_random.php?category=2" [/img] and it will give you random images everytime the screen is refreshed.

Hope this helps.

IchBin

Sweet Homer. That is exactly what I was looking for. Thanks!

sudden

wow.. this is cool.

Quote from: Homer_J_S on April 09, 2005, 12:57:58 PM
IchBin, I have done this with my site and yes there is Mod for this in coppermine. Its called coppermine Fetch. If you do a search on Copermine Fetch on the coppermine boards you can get all the info you seek. Here is the website of the author that goes into detail and where you can download the code. http://www.fistfullofcode.com/projects/copperminefetch/

Once this is installed and working properly you just put this code in a HTML block in TP on your site:
[img]http://yoursite.com/cpmfetch/cfig_random.php?category=2" [/img] and it will give you random images everytime the screen is refreshed.

Hope this helps.

this shows blank on my site :(

my cpmfetch setting is correct. help

IchBin

You probably should get help from the people who make cpmfetch.

sudden

#6
got it right now.. *whew*

this is my code (html block).. im using version 1.3.5


<img src="http://domainname.com/cpmfetch/cfimageget.php" />


this shows 1 random thumbnail  image.. it can be modified if you want it to show from a specific album

edit: oops.. forgot to add the code tag



xtremecruiser

This is how MK portal does a random block ffrom coppermine.
I am going to play with it and see if I can get it to work right

<?php
/*
+--------------------------------------------------------------------------
|  MkPortal Random Coppermine Image 1.0 01.01.2005
|  for Coppermine Standalone v 1.3.2
|  by visiblesoul <visiblesoul.net>
|  adapted from MkPortal random_pic.php by Meo & Peter <mkportal.it>
+--------------------------------------------------------------------------
|   > MKPortal
|   > Written By Amedeo de longis
|   > Date started: 9.2.2004
+--------------------------------------------------------------------------
*/

$content "";

$query $DB->query("SELECT pid, aid, title, filepath, filename FROM cpg132smf_pictures ORDER BY RAND() LIMIT 1");

$photo $DB->fetch_row($query);
$aid  $photo['aid'];
$title  $photo['title'];
$filepath $photo['filepath'];
$filename $photo['filename'];
$thumb "thumb_$filename";



$content "<tr align=\"center\"><td><a href=\"../../cpg132/thumbnails.php?album={$aid}\"><img src=\"../../cpg132/albums/{$filepath}{$thumb}\" border=\"0\" alt=\"{$title}\"></a></td></tr>
<tr><td id=\"tdblock\" align=\"center\" style=\"text-align:center; text-decoration: none;\"><a href=\"../../cpg132/thumbnails.php?album=
{$aid}\">$title</a><br /></td></tr>";


    unset(
$photo);
    unset(
$aid);
    unset(
$title);
    unset(
$filepath);
    unset(
$filename);
    unset(
$thumb);



?>

kimncris

I am interested in a gallery mod too.

Basically the only module we are currently using with our PostNuke site is the gallery so you have to sign-in again whenever you leave SMF and go to he gallery.

-cris

domp

Switch gallery's to Coppermine and bridge it too coppermine ?

Thats what we did. All SMF members are members at the copperminegalery.. Its almost as easy as 1 3 2 3  ???

You can check it out yourself here

At the left is a block is a block with a random image created with cpgfetch. (carefull some pics are a X-rated)

This website is proudly hosted on Crocweb Cloud Website Hosting.