Code:
$postbit_movieinfo_cast = '';
$i = 1;
foreach ($movieinfo['cast'] AS $castinfo)
{
$filename = './cache/person/' . $castinfo['id'] . '.jpg';
if ($castinfo['photo'] AND $castinfo['id'] AND !file_exists($filename))
{
require_once(DIR . '/includes/class_image.php');
$content = file_get_contents($castinfo['photo']);
$handler = @fopen($filename, 'w');
@fwrite($handler, $content);
@fclose($handler);
$thmbnail_class = vB_Image::fetch_library($vbulletin);
$thumbnail = $thmbnail_class->fetch_thumbnail($castinfo['id'] . '.jpg', $filename, 100, 140);
unlink($filename);
$filename = './cache/cast/' . $castinfo['id'] . '.jpg';
$handler = @fopen($filename, 'w');
@fwrite($handler, $thumbnail['filedata']);
@fclose($handler);
}
Above is the code in appropriate hook for the plugin... And frankly speaking i still couldn't solve it...
But i did something much easier. (maybe we can not call it a solution)
Instead of
noimage.jpg file, i forced
<else /> condition to show the image in "
person/custom" folder... If there is no image in that folder too, its not showing anything. So when i see that kind of empty columns (no picture in the table), i upload the image manually. And its showing...
I know its not a proper way to display the image but since am not a coder, thats the most practical/easiest way for me
and once again i would like to thank you for your kind answers and help
kh99