Is it possible to have more than 1 image on a page? Is it possible to have more than 1 image on a page?
 

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]

Main Menu

Is it possible to have more than 1 image on a page?

Started by ringo, June 20, 2006, 07:25:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ringo

Hey guys, this is probably wishful thinking but the talent agency site I'm working on previously had a 1 thumbnail that would refer to a page that might have 2 or 3 images on it... am I dreaming that this could be done? My work-around I'm thinking is just create 1 photoshop collage of 3 images in 1 file.... ?
Thanks for your input.

Sami

not a good idea , what's the point ?
how do want to select which images should be together?
‍I don't answer to PM with support question
Please post your issue to related board

ringo

Hey bmossavari, well, just thought I'd ask... the previous site has a thumbnail of an actor or model's face and when it is clicked it goes to their respective page which contains their credits and sometimes 2 or 3 poses if it's a model... each face has specific pictures that go with it. It was a php site that I took over and switched servers but I could never get it to work on the new server. I'm doing a rebuild/redesign using CPG which is much better with more features.

Tranz

Maybe I'm misunderstanding... but it seems similar to clicking on a coppermine album thumbnail and going to the thumbnail page that has more pictures.

ringo

Well, I can show you what the old site looks like...
http://www.theagencyinc.com/thumbs.php?view=1
click on the second thumb "Emily Ball" and it goes to her page with info and 3 images...

Joachim Müller

That's exactly what Thu suggested. You might want to take a look at MIniCMS to add the profile data to the thumbnail pages.

Tranz

I see it is a little different. The bigger images are all together on one page, so it would be like having all of the intermediate files associated with an album show up on displayimage.php. If you really want all the bigger photos on one page, rather than their thumbnails, then the coppermine code would need to be modified. If you are okay with how coppermine does things (if you don't know, check out the demo), then you can do as GauGau suggested.

Joachim Müller

If you only have a small number of pics and a lot of textual content and you don't allow visitors to upload and do all the community stuff (like commenting, rating etc.), then maybe Coppermine is not the right app for you. From what I can see, you'd be better off with a content management software like Joomla.

ringo

Hey thanks you guys for talking about this with me, I really appreciate it! Now you tell me about Joomla : ) Just kidding... I found Coppermine through my host Laughing Squid and I've modified it like crazy: http://www.jukesmusic.com/agency/men.html
There will be continuous adding of new faces once it goes live, at least 50 more for the men and then the women section is the same... so... I realized in a panic late one night that I couldn't have 3 images on a page. I think my workaround since I'm really not a coder is to take 3 images and make 1 file from them in Photoshop...and then use custom thums which are close crops of the faces.  Oh well, got my work cut out for me. I'd look into Joomla but this whole thing is long overdue for the client. And I've grown fond of this forum, very helpful, thanks!

Paver

If you carefully set up a defined way to link the 3 images together, you could write a theme customization that would do what you want.

For example, the album would only have in it "name_main.jpg".  Then you would have "name_supp01.jpg", and "name_supp02.jpg" in the same folder, but not added to the Coppermine album.  Your theme customization would look for any _supp## files when it displays "name_main.jpg".

Basically, you need to set up the organization carefully and define exactly what will be done on each page, and what will be in Coppermine as a "proper" image.  It sounds like you know enough about Coppermine to realize how it manages photos & albums.

ringo

Hi Paver, are you saying make an album for each individual?

Paver

Not necessarily.  You just need to setup an organizational structure that can be parsed by your theme when displaying an individual image.  The albums can be set up any way you want, not related to this.

ringo

Glad you can see it : ) I'm thinking it's over my head, I have no idea how to approach it.

Paver

Your collage work-around will certainly work.  I would add the photos to Coppermine that you want for the thumbnails so Coppermine creates the correctly-sized thumbnails itself.  Then replace the intermediate (if you use it) and full-size photo with the new collage, leaving the thumbnail alone. On second thought, if you do what I have stricken, then the filesize and file dimensions will be incorrect in the pictures table.  Instead, add the collage photos you want to Coppermine, then replace the thumbnail file with the one you want, resizing it correctly yourself.  That would do it.

My main point with the code suggestion was that you can do anything you like once you set up a clear definition of the task, including the physical files and where they will be displayed.  Code written for a theme customization or using the plugin system is very powerful, if you have the time & skills to do it.

edit: Fixed suggestion above.

ringo

Which I don't... but I so know it could work. Thanks for the discussion, case closed I guess. Enjoy your day.

Paver

Well, here's one way to do it.

In themes/yourtheme/theme.php, add the block bracketted by // MOD and // MOD - end before the last line (which is shown) in the function theme_html_picture:
    // MOD - look for extra images to display
    $mod_extension = ltrim(substr($picture_url,strrpos($picture_url,'.')),'.');
    $mod_filebase = str_replace('.' . $mod_extension, '', $picture_url);
    $mod_image2 = $mod_filebase . '_2' . '.' . $mod_extension;
    $mod_image3 = $mod_filebase . '_3' . '.' . $mod_extension;
    $params['{IMAGE_2}'] = (file_exists($mod_image2) ? "<img src=\"{$mod_image2}\" class=\"image\" border=\"0\" alt=\"\" /><br />\n" : '');
    $params['{IMAGE_3}'] = (file_exists($mod_image3) ? "<img src=\"{$mod_image3}\" class=\"image\" border=\"0\" alt=\"\" /><br />\n" : '');
    // MOD - end

    return template_eval($template_display_media, $params);

If your theme.php doesn't have this function, copy it from the sample theme.  Judging from your current modifications, I'm thinking you may have this function in there already.

Then add in {IMAGE_2} and {IMAGE_3} tags into $template_display_media as desired.

Then put the extra images in the same directory as the root image.  The extra images should have _2 and _3 before the extension.  For example, for the root image of Block_Randy.jpg, you'd have Block_Randy_2.jpg and Block_Randy_3.jpg for the extra images.  You can change the _2 and _3 in the mod block to whatever you like.  If the images are not found, the {IMAGE_2} and/or {IMAGE_3} tags are replaced with an empty string, so you don't have to worry about affecting people pages with only one photo.  You might find the table cell tags around the empty {IMAGE_2} and {IMAGE_3} tags doing something to the display (although I don't think it should).  If it does, you can move the table cell tags to the mod block in the function and out of $template_display_media.

ringo

Wow Paver, that looks awesome... I'm trying this today. Got involved in something else yesterday and haven't had a chance to check it out yet. I'll let you know how it goes. Thanks so much for your input, very much appreciated.

ringo

Hi Paver, I'm thinking this is going to work...
http://www.jukesmusic.com/agency/gallery/displayimage.php?album=1&pos=21
could you possibly direct me as to how I can arrange them side by side with a slight padding? The code for intermediate display is this right now:
// HTML template for intermediate image display
$template_display_media = <<<EOT
        <tr>
                <td align="center" class="display_media" valign="top">
                        <table cellspacing="2px" cellpadding="0px" class="imageborder" width="100%">
                                <tr>
                                        <td align="left" valign="top" width="50%">
                                        <br />
                                                {IMAGE} {IMAGE_2} {IMAGE_3}
                                        </td>
                                        <td align="left" width="50%">
                                        <br />
                                        <h2>{TITLE}</h2>
                                               <br />
                                              <br />
                                                {CAPTION}
                                        </td>
                                </tr>
                        </table>
EOT;
Any thoughts greatly appreciated,  thanks.


Paver

Hmm... I guess the simplest thing would be a nested table:
<table border="0" cellspacing="10" cellpadding="0">
    <tr>
        <td>{IMAGE}</td>
        <td>{IMAGE_2}</td>
        <td>{IMAGE_3}</td>
    </tr>
</table>


Adjust the table properties as desired.

ringo

Okay, this is getting pretty good... I'm totally hit and miss when I'm messing around with this stuff so thanks.
http://www.jukesmusic.com/agency/gallery/displayimage.php?album=1&pos=21
I'm trying to adjust the column of text containing the caption so it is wider. Trying any number of things but don't know... I'd actually like to scoot the entire thing to the left, picture and caption...
here's where I stuck your nested table:
// HTML template for intermediate image display
$template_display_media = <<<EOT
        <tr>
<td align="center" class="display_media" valign="top">
<table cellspacing="2px" cellpadding="0px" class="imageborder" width="100%">
<tr>
<td align="right" valign="top" width="50%">
<table border="0" cellspacing="10" cellpadding="0">
    <tr>
        <td>{IMAGE}</td>
        <td>{IMAGE_2}</td>
        <td>{IMAGE_3}</td>
    </tr>
</table>
<td align="top" width="50%">
<br />
<h2>{TITLE}</h2>
<br />
<br />
{CAPTION}
</td>
</tr>
</table>
EOT;

I'd be totally embarrassed if you could see how trashy I've made the rest of the theme code.
: )
It seems pretty forgiving however. Thanks Paver.