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]   Go Down

Author Topic: [Solved]: album link  (Read 6832 times)

0 Members and 1 Guest are viewing this topic.

elliotts

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
[Solved]: album link
« on: June 04, 2009, 04:39:23 pm »

Hi all,

I know it is annoying if someone doesn't read the documentation or doesn't do  a search in the forum before posting. I have done all that and all the posts that refer to my problem don't get an answer so I suspect it is somewhat obvious but I can't find it or I am simply to stupid to figure it out. So I would reallt appreciate  if anyone could help me with this.

I can't get to grips with how I can link the thumbnails to the respective album instead of the picture itself. At the moment I fetch my thumbnails on my frontpage with:

<?php
  include "./gallery/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(2,4);
  $objCpm->cpm_close();
?>


When I click on the thumbnail it will take me to the individual photo which the thumbnail represents. I would like to to link to the album in which the photo belongs.

I have seen (i read through all 15 pages of this forum!) some questions related to this challenge but I can't find the answer OR an example. The documentation mentions the links (imagelink, windowtarget etc) but I can't figure it out.

Your help is very much appreciated!
Thanks
« Last Edit: June 07, 2009, 10:01:21 am by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: album link
« Reply #1 on: June 04, 2009, 07:45:14 pm »

You may want to read some more. Start by reading the sticky threads on this sub-board, especially
Things to include in a cry for help:

    * The Exact error message.  "I get an error about something..." - Copy and paste
    * What version of coppermine you are using
    * What version of CoppermineFetch you are using
    * A link to your website and gallery
    * A link to an example of the problem (if possible)
    * How computer savvy you are (newbie, intermediate, damn good)
    * What kind of web server you are running on (if known)
    * Include the code you are using.

Include anything that makes your situation unique.  Believe it or not, we do test the software - so when it breaks, sometimes it is because you are doing something we did not forsee (not bad, just not thought of).  These are most important to include:

Examples:
  • Bridiging
  • Different domains, gallery on one, cpmfetch on another
  • Modifications to cpg


Logged

elliotts

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: album link
« Reply #2 on: June 04, 2009, 08:04:23 pm »

Danke fuer die Belehrung!

Ok here you go:
Things to include in a cry for help:

    * The Exact error message.  "I get an error about something..." - Copy and paste
I am not getting an error mesage just a question on how I can link the thumbnail to the album of the respective photo instead of the photo itself.
    * What version of coppermine you are using
I am using Coopermine 1.4.24
    * What version of CoppermineFetch you are using
I am using coppermineFetch 2.0.0
    * A link to your website and gallery
www.soupmeister.co.uk
    * A link to an example of the problem (if possible)
No problem just want to link the thumbnail to the album
    * How computer savvy you are (newbie, intermediate, damn good)
I consider myself an intermediate
    * What kind of web server you are running on (if known)
Don't know really
    * Include the code you are using.
<?php
  include "./gallery/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(2,4);
  $objCpm->cpm_close();
?>

 
No modifications or anything.

Would really appreciate if someone could help
Many thanks

Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: album link
« Reply #3 on: June 04, 2009, 08:12:53 pm »

Take a look here for an explanation of how to do this.

http://cpmfetch.fistfullofcode.com/docs/stable_advanced/index.html

Click on the "Entries that set linking" in the "Using the $option array effectively" section of the docs.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

elliotts

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: album link
« Reply #4 on: June 04, 2009, 08:21:11 pm »

Phill

Thanks for the quick response. I read the section before I posted but I don't get it. OK, I humbly downgrade myself to a newbie on this one. It says

Quote
Entries that set linking

These set how an image is linked or not-linked, and where it links to.

imagelink

Set with: String containing none, album, thumb, category, normal (or int), or large (or full).

What type of image to link to when the image is clicked. None indicates no link will be provided.

It is probably just me but this doesn't tell me anything at the moment. All I would need is an example on how to do this.

How do I wrote the options string that links to the album?

Thanks again
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: album link
« Reply #5 on: June 04, 2009, 08:36:22 pm »

As you are using Joomla you could be lazy.

http://extensions.joomla.org/extensions/photos-&-images/photo-gallery-add%252dons/4260/details

But it is simply a matter of reading the docs for cpm fetch.

I have not tried this but maybe adding.

Code: [Select]
$options = array("linktype" => "album");

But as I say, I have not tried it nor have I configured cpmfetch in quite a long time
Logged
It is a mistake to think you can solve any major problems just with potatoes.

elliotts

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: album link
« Reply #6 on: June 04, 2009, 08:45:36 pm »

Hi Phill

Thanks for this! It works! I am using Joomla as the CMS for the site but I am not using the Extension you are referring to. I am using a module that let's me run php code and as such doesn't rely on Joomla or the other extension. Anyway you have been of great help and I appreciate this very much!

Didn't know using Joomla was a synonym for lazy people?

All the best
Logged

elliotts

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: album link
« Reply #7 on: June 04, 2009, 08:54:00 pm »

By the way it wasn't totally correct

intstead of
$options = array("linktype" => "album");

it is

$options = array("imagelink" => "album");

as per documentation!

Thanks again
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: album link
« Reply #8 on: June 04, 2009, 09:18:30 pm »

Ooops, sorry for the imagelink typo.

If Joomla is a synonym for lazy people then I am a member of that club.  ;)

Glad you got it sorted.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: album link
« Reply #9 on: June 07, 2009, 10:03:02 am »

Danke fuer die Belehrung!
Danke dafür, dass ich helfen darf und auch noch eine Watsche bekomme. Thanks for allowing me to help and getting a disrespectfull reply in a language that is not allowed on this sub-board.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.