News:

Wondering if this will always be free?  See why free is better.

Main Menu

imdb bbc kod

Started by HuuTheme, October 15, 2014, 12:11:41 PM

Previous topic - Next topic

HuuTheme

eski bir paylaşım ama çalışmıyordu bende editleyip çalışır hale getirdim arkadaşlar
kullanımı gayet basit arkadaşlar paket haline getirmekle uğraşmadım

örnek kullanım  imdb linkimiz
http://www.imdb.com/title/tt0848228/
kullanım şeklimiz sadece sondaki kısımı almanız yeterli
[imdb]tt0848228[/imdb]



subs.php bul
array(
'tag' => 'br',
'type' => 'closed',
'content' => '<br />',
),

sonrasına ekle
array(
'tag' => 'imdb',
'type' => 'unparsed_content',
'content' => ($context['browser']['is_gecko'] ? '<pre style="margin-top: 0; display: inline;">$1</pre>' : '$1'),
'validate' => isset($disabled['code']) ? null : create_function('&$tag, &$data, $disabled', '
global $context,$txt,$settings;
if (!isset($disabled[\'code\']))
{$filmidsi = preg_replace("/[^0-9]/i","",$data);
if (strlen($filmidsi) != 7) return;
$imdb_url = "http://imdb.com/title/tt".$filmidsi."/";
$imdb = @fopen($imdb_url, "r");
if (!$imdb) return;
while (!feof($imdb)) {$imdb_raw .= fgets($imdb, 4096);}
fclose($imdb);
preg_match ( "~<span class=\"itemprop\" itemprop=\"name\">(.*?)</span>~s" , $imdb_raw , $baslik );
$baslik = $baslik[1];
$baslik = str_replace("\n"," ", trim(strip_tags($baslik)));
$baslik = "<a href=\"{$imdb_url}\" target=\"blank\" title=\"{$baslik}\">{$baslik}</a>";
preg_match ( "~Genres:</h4>(.*?)(<a class=|</div>)~s" , $imdb_raw , $tür );
$tür =preg_replace( "/\s+/" , " " ,$tür[1]);
preg_match ( "~Plot Keywords:</h4>(.*?)(<a class=|</div>)~s" , $imdb_raw , $tagline );
                        $tagline = preg_replace( "/\s+/" , " " , $tagline[1] ); 
preg_match ( "~<p itemprop=\"description\">(.*?)(</p>)~s" , $imdb_raw , $p_outline );
$p_outline = preg_replace( "/\s+/" , " " , $p_outline[1]);
preg_match ( "~ Ratings:(.*?)(<a class=|</div>)~s" , $imdb_raw , $u_rating );
$u_rating = preg_replace( "/\s+/" , " " ,$u_rating[1]);
preg_match ( "~Runtime:(.*?)(<a class=|</div>)~s" , $imdb_raw , $runtime );
$runtime = str_replace("\n"," ", trim(strip_tags($runtime[1])));
preg_match ( "~Language:(.*?)(<a class=|</div>)~s" , $imdb_raw , $dil );
$dil =preg_replace( "/\s+/" , " " ,$dil[1]);
preg_match("~Stars:</h4>(.*?)(<a class=|</div>)~s", $imdb_raw, $oyuncu);
$oyuncu = preg_replace( "/\s+/" , " " ,$oyuncu[1]);
$data = "<div style=\"font-family: arial; font-weight: 600; font-size: 10px;\">"
."<b>{$baslik}</b></br>"
."<b>{$txt[\'imbd_genre\']}</b>{$tür}</br>"
."<b>{$txt[\'imbd_tagline\']}</b>{$tagline}</br>"
."<b>{$txt[\'imbd_desc\']}</b>{$p_outline}</br>"
."<b>{$txt[\'imbd_user_rating\']}</b>{$u_rating}</br>"
."<b>{$txt[\'imbd_runtime\']}</b>{$runtime}</br>"
."<b>{$txt[\'imbd_language\']}</b>{$dil}</br>"
."<b>{$txt[\'imbd_cast\']}</b>{$oyuncu}</br>"
."</div>";
}'),
'block_level' => true,
),


Modifications.turkish.php bul
?>
öncesine ekle
$txt['imbd_genre'] = "Tür:";
$txt['imbd_tagline'] = "Slogan:";
$txt['imbd_desc'] = "Açıklama:";
$txt['imbd_user_rating'] = "Oylama:";
$txt['imbd_runtime'] = "Uzunluk:";
$txt['imbd_language'] = "Dil:";
$txt['imbd_cast'] = "Oyuncular:";



Teşekkürler Snrj Alıntı : imdb bbc kod 

Advertisement: