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: linking one photo to another via description: better way than brute force?  (Read 2389 times)

0 Members and 1 Guest are viewing this topic.

henry

  • Coppermine newbie
  • Offline Offline
  • Posts: 17

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
   

Logged

henry

  • Coppermine newbie
  • Offline Offline
  • Posts: 17

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





 
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 15 queries.