Development - possible issue in embed.inc.php

isaac User

Written at 18 Jan 2012 on 18:07

I've been using the embed.inc.php for a while now and it has worked great. I think however there might be an issue with the movie One for the Money.

Normally when I use the embed include I get something back from it like the following:

document.write('');

Nice and clean, and works fine.

However for One for the Money, I get the following back:

document.write('');

As you can see, it has a ton of white space before and after the name of the movie. And because of that, it does not seem to want to render properly. This is the only title I have seen that has ever not rendered. So not sure if its an issue with the Title itself when you create the embed results or not.

I'm trying to think of a way that I can get the result string from your embed to parse it and strip out all the extra white space. But haven't really thought of an easy way to do it. Can you look on your end to determine why this movie has all the extra white space?

Thanks
isaac User

Written at 18 Jan 2012 on 18:07

oops. guess I can't put the code in there like that. is there an easy way to show the code?[/b]
Drarakel User

Written at 19 Jan 2012 on 21:51

I've re-saved the primary title (there seemed to be some extra spaces in there, yes). But this isn't reflected yet in the embed code. Maybe we have to wait a little bit.
Komond Moderator

Written at 26 Jan 2012 on 16:18

Uhm... I'm not sure if this is what you mean, but I think that white space is actually in the picture, the design. The poster has a real white frame in the jpg, and looking at the design I bet it is in the actual printed poster, as you can see the head and legs of Katherine Heigl are up and down further than the green background, and it also happens that with the letters, that go a bit out of the green background too, and it also happens in many other versions of the poster in other countries (if you look at the picture in its profile, where a grey frame for the jpg is created, you can also see the white belongs to the design).

It's more easy to see at medium size:
|___________________________________________|
||

So, you can't miss the white space without redesigning somehow the poster modifying the jpg file and cuttint it.
Drarakel User

Written at 26 Jan 2012 on 19:25

No, I think, isaac didn't mean that.

There were a lot of white spaces (or rather newline characters) within the sentence "One for the Money". They are gone now.
But the embed code reflects the old title.

If you want to use automatic embedding:
http://www.movieposterdb.com/embed.inc.php?movie_id=1598828

This gets returned:
---
document.write('[a target="_new" href="http://www.movieposterdb.com/movie/1598828/%0AOne-for-the-Money%0A%0A%0A%0A.html">[img title="
One for the Money



" alt="
One for the Money



" style="width: 100px; height: 143px; border: 0px;" src=http://www.movieposterdb.com/posters/11_09/2012/1598828/t_1598828_f83f538c.jpg />');
---
(I've just changed two brackets, so it doesn't get recognized as HTML in the forum. ..Do we have a "code" tag for the forums?)

The movie link (with the 0A characters) is still the old one. And the image description (img title) and the alternative description (alt) show the newlines. That's why isaac sees 'a ton of white space' when using it on a website, I guess. (Of course he could manually edit the HTML result of the embed command.)

It's not a direct error of embed.inc.php. The title itself was improperly saved at some time.
It just seems that the embedding part doesn't update its titles after changing them on the normal MoviePosterDB site (http://www.movieposterdb.com/movie/1598828/One-for-the-Money.html). Or maybe it's done once a month or something. Martin would be needed for that.
Komond Moderator

Written at 26 Jan 2012 on 21:12

Oh ok ok. I realize, that makes sense ok. As I didn't understood it I just come to that as it was the first thing I found that matched a bit.

And yeah, this is a thing for Martin.
Martin Owner

Written at 28 Jan 2012 on 18:00

This should be fixed now, just updated all the titles :-)

Thanks for the heads-up!