linking one photo to another via description: better way than brute force? linking one photo to another via description: better way than brute force?
 

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

linking one photo to another via description: better way than brute force?

Started by henry, October 29, 2007, 05:29:57 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

henry

Folks:

I would like to add a hypertext link to the description field of some images.  I can see how to do this using the "bbcode help" screen that pops up when I request help for the description field.

It is not problem to do this when the link target is some external web page. But I want the link to reference another image in the current gallery .

I can see how to do this by brute force:  just look in the cpg installation in folder "albums", then look in the named albums until I find the target file and then put that all together with the base URL in bbcode-speak, to get something of the form

   url=http://www.hostname.com/mypics/albums/TargetAlbum/normal_theImageIwant.jpg/]URL See also this![/url]

(leading bracket omitted so this displays right!) to reference a specific intermediate size image or

  url=http://www.hostname.com/mypics/albums/TargetAlbum/theImageIwant.jpg/]URL See also this![/url]

(ditto omission) to see the large sized version of the same image.

My question: is there an easier way of doing this?   

In my gallery, there is no systematic correspondence between the images, so --yes-- it will be a manual operation to pick the link target for each Description I want to place a link into.  But it seems to me that cpg knows where the images are and I ought to be able to specify just the filename (e.g. "normal_theImageIwant.jpg" or "theImageIwant.jpg" and it can be up to cpg to generate the complete link to the current location of the particular image. 

I do not know, in fact, that the reference I generate by brute force will continue to work through time and significant reorganizations of the gallery, say, creation of new albums and moving particular pictures around.  I think so, but I don't think I should depend on it if there is another choice.  Is there? (That's not a new question, just a repeat of the one above <grin>).

TIA,

Henry
   


henry

Folks:

I've tried several ways to ask this question, but received no replies, so I'm wondering if I'm missing something totally obvious...

I want to put a clickable link in the title or description of "Image C"  --that is, some specific image--  to allow a viewer to look at the related "image J" --that is, another specific image in the same gallery

(Why?  In my gallery,  "Image C" is an interesting historical photo, and "Image J"  is a scan of the handwriting found on the back of "Image C".  For a variety of reasons, the images are not otherwise coordinated, say, by a naming convention that would keep them together in a standard image sort order.)

There are apparently two separate issues to doing this. 

#1.  A code change may be necessary to make any BBCode-speak link in the text fields clickable.  See:   

    http://forum.coppermine-gallery.net/index.php?topic=25256.0

If I understand correctly, there's a brief bit of code that needs to be stripped (in some, or in all versions?) to enable clickable links in description (and also in title?) fields.   

#2. I do not understand how to link-reference a particular image in a gallery, or if it is even possible to write an invariant link to a particular image, one that will survive routine reorganization of the gallery.  That means deletions, additions and re-classification to a different album, as must be expected to occur over time in a gallery.

Issue #1 is clear and seems manageable. But I'm stuck on issue #2.   I've already posted a proposal to use a brute force method by building a link of the form:

   url=http://www.hostname.com/mypics/albums/SomeSpecificAlbum/ImageJ.jpg

and using that, suitably expressed in bbcode-speak.  This method would NOT be totally invariant; it would fail when "ImageJ" is moved from album to album, as might reasonably occur.   But no one has commented or offered a better solution.

Please let me know, even to tell me that I'm being incredibly dense about this, which would be useful information <grin> -- but not as useful as an invariant, generally-applicable, developer-approved method of achieving the goal of linking one image to another in a gallery.

TIA,

Henry






Joachim Müller