Can you give me one example movie where this happens and a screenshot of your IMDb Connector settings page?
I delete the cache of IMDB Connector in the page settings and now the error happens in all pages… Apologize for my english … i speak spanish. It worked fine yesterday… but now since I want to add a new movie this error happens
Maybe is the cache? Or something like that..
Thank you
Okay, thanks. I found out that omdbapi.com is the problem, the JSON they give out is missing a ” sign, causing the whole format to break. I’ll let them know and release a quick fix in the meantime.
You make me know please!! And thanks for you support!
As I said, it’s a bug on omdbapi.com, they forgot a quote which makes it impossible for PHP to turn the JSON format into an array or object.
I’ve done a quick fix. Please download it and test it and report back.
Here’s the link: http://www.koljanolte.com/temp/8c2e0792.zip
Works !! But… when omdbapi.com fix the problem? I have to go back to the previous version?
No, my fix is flexible. If they fix it, it’ll still work. If not, let me know.
You’re welcome. I’ll upload the official update in a few minutes. If there’re any bugs, please be so kind to let me know.
Quick notice: After I’ve sent them an e-mail, omdbapi.com has fixed the bug.
Great… thanks. I used the mktime for convert the time of IMDB connector to 00:00:00
But I have an error when i pudated the plugin on the last version
$minutes = $movie[“runtime”][“minutes”] . ” minutes “;
/** We only want to keep the number */
$minutes = preg_replace(“‘[^0-9]'”, “”, $minutes);
/** Convert to time */
$new_time = date(“H:i:s”, mktime( 0, $minutes));
/** Output */
echo “” . $new_time;
Also… the rating in some posts does not appear “N/A”
Thank you!
If you just want to display the time in the format H:i:s, it’d make a lot more sense to use the timestamp included in the runtime array. Here’s an example:
$movie = imdb_connector_get_movie("The Shining");
$timestamp = $movie["runtime"]["timestamp"];
$formatted_time = date("H:i:s", $timestamp);
echo "Runtime: $formatted_time";
Regarding the rating: Can you give me one or two example movies where this happens and perhaps the code you’re using?