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

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.

samson

Did anyone figure out how to have the random photo open coppermine inside tp when clicked? It brings me to
http://www.ligs.us/Coppermine/displayimage.php?pos=-5

instead of

http://www.ligs.us/smf3/index.php?action=coppermine

thanks

Gargoyle

Nope... But if you figure it out let us know because there are many coppermine users here that would like to know how.. ;D

samson

lol Ill do my best but dont hold your breath im not to bright  :2funny:

Gargoyle

There is supposed to be a setting in CPMFETCH that allows the change of the url. Not sure if it is for the target url or what as I have never seen it actually work or a working example of it.

I have worked with it a bit but haven't figured it out yet.

samson

Yea I have been reading alot gave up tonight my eyes hurt

Gargoyle

Well i found the imagelink command that allows you to make it so the image DOES NOT link at all. Then you can ad a link to the bottom of the pic that will open the gallery correctly.

So far it is the best I have found.

samson

do you mean
$cpg_include_link=0;

where do you add it ?

I could not get the picture not to be a link

im using

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

print "</center>";

Gargoyle

Oh wow you have a lot of reading to do yet...  :2funny:

I'll show you what I use... It's using some of the other arrays since I cannot put all the pics I have on the "front page" if ya know what I mean. But here is the code I use and a brief run down of what it does...


print "<center>";
include "../cpmfetch_directory/cpmfetch.php";
$objCpm = new cpm("/galleryfolder");
$objCpm->cpm_viewRandomMediaFrom(1,1,$source = "cat=2:album=32,40,42,44",array("imagesize" => "int","imageheight" => "300","imagewidth" => "400","windowtarget" => "_new","imagelink" => "none","alttag" =>"From Album: %a Added: %w"));
$objCpm->cpm_close();
echo '<a href="the proper link to your gallery inside SMF"> Click here to view the Gallery</a>';
print "</center>";


Alright now I am pulling images from one category and 4 albums for display. I have the width and height hardcoded to fit no matter what and it always pulls the intermediate image. In the array you will see the image link command and some code I added for the link to the gallery.

Works pretty good for me and I am happy with it at this point. Keep reading the documentation as it has a lot of good info in it.

You can see the above code at http://www.southsidestreetcars.org

samson

Thanks I will start again fresh tomorrow

samson

Thanks that will work just fine  :up:

This website is proudly hosted on Crocweb Cloud Website Hosting.