how to apply relative image size to own selected exhibits?

bernstein / 2013-02-08 12:48:48   

Hi guys,

I found this thread and I think it's a great possibility.
indexhibit.org/forum/thread/17843/
I will use this code snippet with the maximum width to an image so it won't pixelate.

Now I just ask myself how to apply relative image size to own selected exhibits?
Because I don't want that all my images in the different exhibits will be sized like 1200px.

Exhibit 1 - Relative Image Size
Exhibit 2 - normal
Exhibit 3 - Relative Image Size

I hope you can help me - thanks in advance,

Kai

arsondpi / 2013-02-08 13:02:01   

Duplicate the Over and Over format, rename it and apply the code I posted on the other thread, only to one of them.
Towards the end of the plugin you'll find the css part of the format (function defaultCSS)

You can paste the css rules there. You can then select one of the two kinds of the Over and over format from each exhibit.

Vaska A / 2013-02-08 13:04:37   

Yeah, make an Over and over 'relative' format - nice idea. We'll eventually need to start doing this for appropriate formats.

bernstein / 2013-02-08 13:26:17   

Thanks for your response!

Sounds great and in my head it makes a lot sense.
Strangely it doesn't work atm. HTTP-Fehler 500 (Internal Server Error).

  1. I did it like that:
  2. function defaultCSS()
  3.     {
  4.         return "#img-container .spacer { height: " . $this->spacer_height . "px; }
  5. #img-container .captioning { margin-top: " . $this->caption_top . "px; }";
  6.     }
  7. #img-container .over .asset img.lazyload {
  8.     height: auto;
  9.     max-width: 1000px;
  10.     width: 100%;
  11. }

What went wrong?

arsondpi / 2013-02-08 13:41:12   

I don't know - maybe you missed out on a quote mark... It's hard to tell.
Is is what the function defaultCSS looks like?

  1.     function defaultCSS()
  2.     {
  3.         return "#img-container .spacer { height: " . $this->spacer_height . "px; }
  4. #img-container .captioning { margin-top: " . $this->caption_top . "px; }
  5. #img-container .over .asset img.lazyload {
  6.     height: auto;
  7.     max-width: 700px;
  8.     width: 66%;
  9. }";
  10.     }
  11. }
bernstein / 2013-02-08 13:48:42   

This is sick because it seems like I accidentally deleted a quote mark or something...
I've deleted the old and did it again - pasted your code in the over_and_over_RIS.php and whatever - it works!

Thanks a lot!!! Great support!

This thread has been closed, thank you.