Linking from random_image to the relevant album or catalogue

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
mwy

Linking from random_image to the relevant album or catalogue

Post by mwy »

Hi there

Can anyone help with the following? I am a complete beginner still (will this *ever* change??) and the way I've approached the problem may not be the best way forward. Possibly this needs a re-think of the problem and / or a thinking-outside-the-box solution? I'm definitely in a box with this one...

The site
  • I am making a site for a department of architecture and engineering at the university of Bath. See the test site: http://www.bath.ac.uk/ace/new/ (and ignore everything else, not much is working yet)
  • The site is supposed to be image-rich, showing on every page a selection of images of work by both students and staff. Thus, every page has three images -- two top-left, one to the right. (The home page has an extra, larger image in the content). These images use the *wonderful* random_image function. Currently my test images all came from one course, so they have an unnatural similarity with eachother.
  • As it is important that the images are not repeated, the images are stored in four separate folders: images113_left, images113_right, images170 and images450. The numbers are the image sizes; all are square details of the original works.



What I would like to do:
  • I want to be able to click on the image and go from it to a related album or catalogue (either ?), showing work by e.g. more students in the same course, or more images from the same project.


What I don't want to do:
  • I don't [think I] want to have the random images come from a specific album/catalogue, because (a) the original artwork won't be square and won't be the correct size and it will be important to be able to show the original as it was created; (b) it will be important to have albums/catalogues that relate to e.g. a specific course and year and accessed from the relevant course pages, but to show images from all sources as the 'decoration' on every page


Possibilities
  • I can control the name of each image, so it would be possible to put a suffix at the beginning of each file name that was also the name of its related album/catalogue. But I don't have any php coding ability to add this possibility  :(
  • As I said above, the original image sizes and proportions can't be controlled; hence the need to separate out images used to 'decorate' pages and the images they relate to. But my use of separate folders may be the wrong way to go about this, and I'm happy to change that, too.


Can anyone help? Does anyone else out there need a similar function? Has this already been answered and it is staring me in the face (if so, many apologies) Am I mad?? (actually, don't answer the last question...)

Thanks in advance for any help, sorry this message is so long
Last edited by mwy on Tue Mar 27, 2007 2:05 pm, edited 1 time in total.
mwy

Re: Linking from random_image to the relevant album or catalogue

Post by mwy »

So, I guess I'm mad, and it can't be done...

sigh...
alby

Re: Linking from random_image to the relevant album or catalogue

Post by alby »

mwy wrote: So, I guess I'm mad, and it can't be done...
I don't think that is impossible with url based on filename.
It's true that you hack the random tag.

Alby
alby

Re: Linking from random_image to the relevant album or catalogue

Post by alby »

mwy wrote: So, I guess I'm mad, and it can't be done...
I don't know if this is your solution but in function.multiple_random_image.php 1.4 version I add url parameter (and url_class, url_target params) based on image filename. Ex:

Image directory (relative_url_directory) with files:
_dir1_dir2_file.php.X.jpg with X=1,2,3,4, ....

{multiple_random_image  number=1  folder=relative_url_directory  url=true  url_class=class  url_target=target}
(url_class, url_target are optional)

result is (substitute _ with /):


Alby
mwy

Re: Linking from random_image to the relevant album or catalogue

Post by mwy »

Hi there

Sorry, I've been off-line recently so have only just seen your replies

Thanks so much for suggesting a solution. I shall definitely try what you suggest and report back (though don't hold your breath folks, I'm a *slow* worker  :) )
Locked

Return to “CMSMS Core”