Page 2 of 2

Re: New template for DVDpedia

Posted: Sat Nov 16, 2013 12:21 pm
by Conor
That some really impressive stuff. Not only in the coding but the design. It's rare that one person has the talent for both skills. I like the idea of going with the round iOS 7 profile look. I look forward to installing the template.

Re: New template for DVDpedia

Posted: Sat Nov 16, 2013 4:57 pm
by FineWine
WOW & WOW

Can you pass me the code for the substitute of the missing image icon please when there is no photo to display.

Cheers

Re: New template for DVDpedia

Posted: Sat Nov 23, 2013 6:50 am
by MOTIVHIMMEL
Oh, sorry for the long time who I need to answer you. I didn't get any info about a new post :-(

There are some different ways who I have found on the web, but this one works for me to define it for one item (the profile images)

Code: Select all

 onError="this.onerror=null;this.src='layout/IMAGENAME.jpg';"
This line you need to put in the same part, wehre you link to the default image. So the full code can be look like this one here:

Code: Select all

<img src="profile/[credit:nameRaw].jpg" onError="this.onerror=null;this.src='layout/IMAGENAME.jpg';">
I found this solution here: http://stackoverflow.com/questions/9272 ... ken-images

Re: New template for DVDpedia

Posted: Sat Nov 23, 2013 4:27 pm
by FineWine
Thank you for that and this is the code I used:

Code: Select all

<td rowspan=3 valign=top> <img width=100 src="Images/cast/[credit:nameRaw].jpg" onError="this.onerror=null;this.src='Images/BrujiDogWhite.png';"></td>
BUT, the only problem is that the resulting image is constrained to the same size of "img width=100". I would like to change that "img width=100" for the onError image to "img width=25" whilst still keeping "img width=100" for the src="Images/cast/[credit:nameRaw].jpg" I have tried several different bits of coding but nothing works??

Image

NOTE to Conor & Nora: I have used a white version of the bruji dog as the onError image. I thought this would be appropriately symbolic. I hope you do not mind. But as you can see I think it would look nicer at only 25% size.

Re: New template for DVDpedia

Posted: Sat Nov 23, 2013 4:40 pm
by Conor
We don't mind at all, looks nice. You could try a Javascript to change the width, not sure if the error image has already been parsed when the Javascript runs and hence if it would work.

It's based on this post, but it would be to get all the img tags and check the src, if it's the error image then update the width.

Code: Select all

<script type="text/javascript">
function changeImageSize() {

   images = document.getElementsByTagName("imd");
   
   for (i=0;i<=images.length;i++) {
      next = images[i];
      
      if ( next.src == "Images/BrujiDogWhite.png" ) {      
         next.width = "25";
         next.height = "25";
      } // end if
   } // end for

</script>

<body onload="changeImageSize()" 
If the width comes from the CSS, you need the style call then.

Re: New template for DVDpedia

Posted: Tue Jul 22, 2014 1:26 pm
by Waldbaer
Hi, I'd really like to use this template, but in the extras section, I find only the version without the headshots although it says that there are two versions. I even already downloaded the over 9thousand headshots, but where is the template to use it? Thanks for help with finding it. :)

Re: New template for DVDpedia

Posted: Tue Jul 22, 2014 2:10 pm
by Conor
Thank you for pointing that out. We recently updated the extras page and missed adding both links.

I have updated the flat design extras page and it will now have the profile version link.