New template for DVDpedia

Talk to other Pedia users about the programs, share tricks and tips or ask questions about existing features.
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: New template for DVDpedia

Post 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.
User avatar
FineWine
Site Admin
Posts: 905
Joined: Wed May 28, 2008 2:41 am
Location: Tauranga, New Zealand

Re: New template for DVDpedia

Post 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
User avatar
MOTIVHIMMEL
Addicted to Bruji
Addicted to Bruji
Posts: 26
Joined: Fri Nov 08, 2013 1:55 pm
Location: Berlin
Contact:

Re: New template for DVDpedia

Post 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
User avatar
FineWine
Site Admin
Posts: 905
Joined: Wed May 28, 2008 2:41 am
Location: Tauranga, New Zealand

Re: New template for DVDpedia

Post 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.
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: New template for DVDpedia

Post 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.
Waldbaer
Addicted to Bruji
Addicted to Bruji
Posts: 109
Joined: Wed Sep 05, 2012 6:23 pm

Re: New template for DVDpedia

Post 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. :)
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Re: New template for DVDpedia

Post 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.
Post Reply