[Solved]: album link [Solved]: album link
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[Solved]: album link

Started by elliotts, June 04, 2009, 04:39:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

elliotts

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

Joachim Müller

You may want to read some more. Start by reading the sticky threads on this sub-board, especially
Quote from: vuud on February 28, 2007, 07:19:12 PM
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



elliotts

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


phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

elliotts

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

QuoteEntries 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

phill104

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.

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


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

elliotts

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

elliotts

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

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

Joachim Müller

Quote from: elliotts on June 04, 2009, 08:04:23 PMDanke 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.