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: 549
  • Total: 549

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.

crip

I have this Random Image working on my website, but we can't use a code like this in TP_can we?

<?php 
include "./cpmfetch/cpmfetch.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMedia(1,1);
$objCpm->cpm_close();
?>


Later, Crip~

redeye

That code runs OK in a block on our site!
Had it up for a while.

crip

php block, or html.. which kind, Article?

redeye

Standard php block or php article, works with either.

crip

I finally managed to get a Random Image display in a phpbox on my site by simeply moving the cpmfetch **/ Directory/**  into my forum **/ Directory/**  .. and changed the path a bit.. so those of you who have struggled as I have to get a Random image displayed in a php/block I hope this bit helps you.

This is the code I used:

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


Later, Crip~ ;D

gerrymo

You also need to remove the php tags Crip. Your post at the top of the page has tags in it (1st and last lines to be removed).

crip

I did, I used the new code below that code.

gerrymo

They actually both worked for me (minus tags).

snork13

gald you got it to work crip...it's all about the fiel placement with with cpmfetch...i have it running, outside coppermine, inside coppermine..on different servers pointing to ech other. i think a great script, and now with rss added...updates to the gallery should be cool :)

carver

#49
Crip,
I know how you felt when you were struggling with this earlier. I have been at this most of the day trying everything I have read and not getting anywhere fast.
I have Coppermine 143 running with SMF RC2 and latest TP version.
I re-installed a fresh gallery, fresh cpmfetch 1.6.2, and while I am not getting errors from the cftest page I am not getting any images either.

I had the coppermine bridge active and now inactive, and that does not seem to matter. I do have this working on the same server on another one of my sites and it went without a hitch, I duplicated that setup to no avail. That forum is running TP075 and SMF RC1 without the bridge to coppermine..

any thoughts would be greatly appreciated, so would any offer of help at this point..


www.gardenrefuge.com/gallery
www.gardenrefuge.com

if someone is willing to take a whack at this let me know in a PM and I will get you admin rights to the site..

Curt

This website is proudly hosted on Crocweb Cloud Website Hosting.