cachedir = ROOT_PATH . 'imdb/cache'; $config->photodir = ROOT_PATH . 'imdb/pic_imdb'; $config->photoroot = 'pic_imdb'; $this->config = $config; } public function renderDetailsPageDescription($torrentId, $imdbId) { $movie = new Title($imdbId, $this->config); $country = $movie->country (); $director = $movie->director(); $creator = $movie->creator(); // For TV series $write = $movie->writing(); $produce = $movie->producer(); $cast = $movie->cast(); // $plot = $movie->plot (); $plot_outline = $movie->plotoutline(); $compose = $movie->composer(); $gen = $movie->genres(); //$comment = $movie->comment(); $similiar_movies = $movie->similiar_movies(); if (($photo_url = $movie->photo_localurl() ) != FALSE) $smallth = "\"poster\""; else $smallth = "\"no"; $autodata = 'https://www.imdb.com/title/tt'.$thenumbers."
------------------------------------------------------------------------------------------------------------------------------------
\n"; $autodata .= "".$lang_details['text_information']."
\n"; $autodata .= "------------------------------------------------------------------------------------------------------------------------------------

\n"; $autodata .= "". $lang_details['text_title']."" . "".$movie->title ()."
\n"; $autodata .= "".$lang_details['text_also_known_as'].""; $temp = ""; foreach ($movie->alsoknow() as $ak) { // $temp .= $ak["title"].$ak["year"]. ($ak["country"] != "" ? " (".$ak["country"].")" : "") . ($ak["comment"] != "" ? " (" . $ak["comment"] . ")" : "") . ", "; $temp .= $ak["title"] . ", "; } $autodata .= rtrim(trim($temp), ","); $runtimes = str_replace(" min",$lang_details['text_mins'], $movie->runtime_all()); $autodata .= "
\n".$lang_details['text_year']."" . "".$movie->year ()."
\n"; $autodata .= "".$lang_details['text_runtime']."".$runtimes."
\n"; $autodata .= "".$lang_details['text_votes']."" . "".$movie->votes ()."
\n"; $autodata .= "".$lang_details['text_rating']."" . "".$movie->rating ()."
\n"; $autodata .= "".$lang_details['text_language']."" . "".$movie->language ()."
\n"; $autodata .= "".$lang_details['text_country'].""; $temp = ""; for ($i = 0; $i < count ($country); $i++) { $temp .="$country[$i], "; } $autodata .= rtrim(trim($temp), ","); $autodata .= "
\n".$lang_details['text_all_genres'].""; $temp = ""; for ($i = 0; $i < count($gen); $i++) { $temp .= "$gen[$i], "; } $autodata .= rtrim(trim($temp), ","); $autodata .= "
\n".$lang_details['text_tagline']."" . "".$movie->tagline ()."
\n"; if ($director){ $autodata .= "".$lang_details['text_director'].""; $temp = ""; for ($i = 0; $i < count ($director); $i++) { $temp .= "" . $director[$i]["name"] . ", "; } $autodata .= rtrim(trim($temp), ","); } elseif ($creator) $autodata .= "".$lang_details['text_creator']."".$creator; $autodata .= "
\n".$lang_details['text_written_by'].""; $temp = ""; for ($i = 0; $i < count ($write); $i++) { $temp .= "" . "".$write[$i]["name"]."" . ", "; } $autodata .= rtrim(trim($temp), ","); $autodata .= "
\n".$lang_details['text_produced_by'].""; $temp = ""; for ($i = 0; $i < count ($produce); $i++) { $temp .= "" . "".$produce[$i]["name"]."" . ", "; } $autodata .= rtrim(trim($temp), ","); $autodata .= "
\n".$lang_details['text_music'].""; $temp = ""; for ($i = 0; $i < count($compose); $i++) { $temp .= "" . "".$compose[$i]["name"]."" . ", "; } $autodata .= rtrim(trim($temp), ","); $autodata .= "

\n\n------------------------------------------------------------------------------------------------------------------------------------
\n"; $autodata .= "".$lang_details['text_plot_outline']."
\n"; $autodata .= "------------------------------------------------------------------------------------------------------------------------------------
"; // if(count($plot) == 0) // { // $autodata .= "
\n".$plot_outline; // } // else // { // for ($i = 0; $i < count ($plot); $i++) // { // $autodata .= "
\n. "; // $autodata .= $plot[$i]; // } // } if (!empty($plot_outline)) { $autodata .= "
\n".$plot_outline; } $autodata .= "

\n\n------------------------------------------------------------------------------------------------------------------------------------
\n"; $autodata .= "".$lang_details['text_cast']."
\n"; $autodata .= "------------------------------------------------------------------------------------------------------------------------------------

\n"; for ($i = 0; $i < count ($cast); $i++) { // if ($i > 9) // { // break; // } $autodata .= ". " . "" . $cast[$i]["name"] . " " .$lang_details['text_as']."" . "".$cast[$i]["role"]."" . "
\n"; } } }