Acıklama;V1.0.0:
İMDB Sitesinden: Oyuncu Bilgileri,Yapım Yılı,Filmin Türü,Ödüller,Süresi Gibi Bilgileri Çekmekte.
Kuruluma başlamadan önce sunucunuzun "allow_url_fopen" desteği olup olmadığını kontrol ediniz. Eğer Yoksa Host Firmanızla
Görüşüp Bu Fonksiyonu Açmalarını Söyleyebilirisiniz Aksi Takdirde Eklenti Çalışmaz Yedek almayı unutmayınız..
includes/class_bbcode.php Açın:
PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
$bbcode = preg_replace($search, $replace, $bbcode);
}
Altına ekleyiniz:
PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
//-----------------------------------------
// [imdb] Film Tag Başlangıç
//-----------------------------------------
$bbcode = preg_replace( "#(\[imdb=.*\])#Uies" , "\$this->handle_bbcode_imdb('\\1')" , $bbcode);
$bbcode = preg_replace( "#(\[imdb\].*\[/imdb\])#ies" , "\$this->handle_bbcode_imdb('\\1')" , $bbcode );
//-----------------------------------------
// [imdb] Film Tag Bitiş
//-----------------------------------
Bul:
PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
/**
* Handles the parsing of a signature picture. Most of this is handled
* based on the $parse_userinfo member.
*
* @param string Description for the sig pic
*
* @return string HTML representation of the sig pic
*/
Üstüne Ekleyiniz:
PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
/*-------------------------------------------------------------------------*/
//
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
style="color: #007700">var $imdb_count = 0;
function handle_bbcode_imdb($texto="")
{
global $imdb_count;
// Bu Kısımları İstediğiniz Gibi Değişebilirsiniz
$imdb_toptext = 'IMDB'; // Bu Kısıma İstediğinizi Yaza Bilirsiniz Üst Başlık Olacak
$imdb_perpost = 10; // Bu Değer 10 da Kalması Mantıklı Mesaj Yazma Sınırı
// Değişecek Kısımlar Bitti
if ($texto == "") return;
$imdb_count++;
if ($imdb_count > $imdb_perpost) return;
$idfilme = preg_replace('/[^0-9]/i',"\\1",$texto);
if (strlen($idfilme) != 7) { $this->error = 'imdb_nao7'; return; }
$imdb_url = "http://imdb.com/title/tt".$idfilme."/";
$imdb = @fopen($imdb_url, "r");
if ($imdb == FALSE) { $this->error = 'imdb_invalido'; return; }
while (!feof($imdb))
$imdb_raw .= fgets($imdb, 4096);
fclose($imdb);
preg_match ( "'<div id=\"tn15title\">(.*?)<span>\(<a's" , $imdb_raw , $titulo );
$titulo = str_replace("\n"," ", trim(strip_tags($titulo[1])));
preg_match ( "'<h5>Release Date:</h5> (.*?) <a class's" , $imdb_raw , $dro_release );
$dro_release = str_replace("more","",@strip_tags($dro_release[1]));
preg_match ( "'<h5>Directors:</h5>(.*?)<a class='" , $imdb_raw , $dro_directors );
$dro_directors = str_replace("href","target=\"_blank\"href",str_replace("/name/nm","
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
style="color: #007700">,@$dro_directors[1]));
preg_match ( "'<h5>Director:</h5>(.*?)<br/>'" , $imdb_raw , $dro_director );
$dro_director = str_replace("href","target=\"_blank\"href",str_replace("/name/nm","
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
style="color: #007700">,@$dro_director[1]));
preg_match ( "'<h5>Genre:</h5>\\n(.*?)more</a>\\n</div>'s" , $imdb_raw , $genero );
$genero = @strip_tags($genero[1]);
preg_match ("#<h5>Language:</h5><a(.*)>(.*)</a>#s" ,$imdb_raw, $language);
$language = @strip_tags($language[1]);
preg_match ( "'<h5>Tagline:</h5>(.*?)</div>'" , $imdb_raw , $slogan );
$slogan = str_replace("more","",@strip_tags($slogan[1]));
preg_match ( "'<h5>Plot Outline:</h5> (.*?)</div>'" , $imdb_raw , $resumo );
$resumo = str_replace("more","",@strip_tags($resumo[1]));
preg_match ( "'<h5>Runtime:</h5>\\n(.*?)\\n</div>'" , $imdb_raw , $duracao );
$duracao = @strip_tags($duracao[1]);
if (strlen($duracao) > 50) $duracao = substr($duracao,0,50)."...";
preg_match ( "'Top 250: (.*?)</a>'" , $imdb_raw , $top );
$top = @strip_tags($top[0]);
if (isset($top)) $top = '<a href=http://imdb.com/chart/top]'.$top.'</a>';
preg_match ( "'<h5>Awards:</h5> \\n(.*?)more</a>\\n</div>'s" , $imdb_raw , $premios );
$premios = @str_replace("\n"," ",strip_tags($premios[1]));
preg_match ( "'(Cast overview, |Complete credited cast|Credited cast)(.*?)<td class=\"nm\"><a href=\"(.*?)\">(.*?)</a>(.*?)<td class=\"nm\"><a href=\"(.*?)\">(.*?)</a>(.*?)<td class=\"nm\"><a href=\"(.*?)\">(.*?)</a>(.*?)<td class=\"nm\"><a href=\"(.*?)\">(.*?)</a>(.*?)<td class=\"nm\"><a href=\"(.*?)\">(.*?)</a>(.*?)'s" , $imdb_raw , $actores );
// print_r($actores);
$actores = "<a href=http://imdb.com".@$actores[3].">".@$actores[4]."</a>, ".
"<a href=http://imdb.com".@$actores[6].">".@$actores[7]."</a>, ".
"<a href=http://imdb.com".@$actores[9].">".@$actores[10]."</a>, ".
"<a hrefl=http://imdb.com".@$actores[12].">".@$actores[13]."</a>, ".
"<a href=http://imdb.com".@$actores[15].">".@$actores[16]."</a>";
$imdb_final .= "<table border='0'><tr><td colspan=2 style='font-size: 13px; line-height:125%;'><b><font size=4> <a href=".$imdb_url.">".$titulo."</a></font></b><br><br></td></tr>";
if ($dro_directors <> "") $imdb_final .= "<b>$imdb_lang_directors:</b> $dro_directors<br>";
if ($dro_director <> "") $imdb_final .= "<b>$imdb_lang_director:</b> $dro_director<br>";
if ($language <> "")$imdb_final .= "<b>Dil:</b> $language";
if ($genero <> "") $imdb_final .= "<b><font color=red>Türü</b>:</font> $genero<br>";
if ($slogan <> "") $imdb_final .= "<b><font color=red>Etiketler</b>:</font> $slogan<br>";
if ($dro_release <> "") $imdb_final .= "<b><font color=red>Gösterim Tarihi:</b></font> $dro_release / <a href='http://imdb.com/title/tt".$imdb_id."/releaseinfo'>Diğer Ülkeler</a><br>";
if ($resumo <> "") $imdb_final .= "<b><font color=red>Pilot Kelime</b>:</font> $resumo<br>";
if ($duracao <> "") $imdb_final .= "<b><font color=red>Süresi</b>:</font> $duracao<br>";
if ($premios <> "") $imdb_final .= "<b><font color=red>Ödüller</b>:</font> $premios<br>";
if ($actores <> "") $imdb_final .= "<b><font color=red>Oyuncular</b></font> <font size=1 style=italic>(first 5)</font>: $actores<br>";
$imdb_final .= "<br><b><font color=red>IMDB Linki</b></font>: <a href=\"".$imdb_url."\">$imdb_url</a></span></td></tr></table>";
return "<div class='quotetop' style='padding:0px;'><div width=100% height=95 style='background: url(images/css_img_imdb.gif) no-repeat right top; margin:0;padding:4px;'>$imdb_toptext</div></div><div class=quotemain>".$imdb_final."</div>";
}
Kullandığınız Tema >> Editor >> Editor_Toolbar_On
Bul :
PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
<if condition="$show['html_bbcode']">
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_html"><img src="$stylevar[imgdir_editor]/html.png" width="16" height="16" alt="$vbphrase[wrap_html_tags]" /></div></td>
</if>
Altına Ekleyiniz:
PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
<!--İMDB TAG BAŞLANGIÇ -->
<td><div class="imagebutton" id="{$editorid}_cmd_wrap0_imdb"><img src="$stylevar[imgdir_editor]/imdb.gif" width="21" height="20" alt=" İMDB Bilgisi Ekle" /></div></td>
<!--İMDB TAG BİTİŞ -->
Ekteki Dosyayı imdb.gif images/editor içine kopyalayın.
Ekteki css_img_imdb.gif ve css_img_quote.gif İmages Klasörüne Kopyalayın
Kullandığınız Tema >> Git >> İlave CSS-yazılımı
PHP Kod: Kodu kopyalamak için üzerine çift tıklayın!
/* *****İMDB Top Alanı ********************************************** */
.quotetop
{
background: #161616 url(images/css_img_quote.gif) no-repeat right;
border: 1px solid #CC9900;
border-bottom: 1px solid #CC9900;
color: #CC9900;
font-weight: bold;
font-size: 10px;
margin: 8px auto 0 auto;
padding: 3px;
}
.quotemain
{
background: #3B3B3B;
border: 1px solid #CC9900;
border-top: 1px solid #FFCC00;
color: #FFFFCC;
padding: 4px;
margin: 0 auto 8px auto;
}
.codetop,
.sqltop,
.htmltop
{
background: #161616 url(images/css_img_code.gif) no-repeat right;
border: 1px solid #CC9900;
color: #CC9900;
font-weight: bold;
margin: 0 auto 0 auto;
padding: 3px;
width: 98%;
}
.codemain,
.sqlmain,
.htmlmain
{
background: #3B3B3B;
border: 1px solid #CC9900;
border-top: 1px solid #FFCC00;
color: #FFFFCC;
font-family: Courier, Courier New, Verdana, Arial;
margin: 0 auto 0 auto;
padding: 3px;
width: 98%;
}
#QUOTE,
#CODE
{
background: #FAFCFE;
border: 1px solid #000;
color: #465584;
font-family: Verdana, Arial;
font-size: 11px;
padding: 2px;
white-space: normal;
}
#CODE
{
font-family: Courier, Courier New, Verdana, Arial;
}
.cleared
{
clear: both;
}