View Full Version : Non Working Images Fix
NetworkTown.Net
11-17-2006, 02:56 PM
HI
This mod will not add videos to your site if the image is not avalible since alot of images are missing i made this, add edit import.php.
Find:
echo 'Thumbnail Bytes Written: '.$thumbBytes;
Add below it:
if($thumbBytes == 0){ echo 'no image'; } else {
then find echo '<br />Affected MySQL Rows: '.mysql_affected_rows();
add above the line
}
and then just run the import.php file ;) hope this helps.
DylanButler
11-24-2006, 10:00 PM
Is this confirmed to work on phpAS3? I tried to work this out with someone the other day because it didn't quite work right.
blank
11-25-2006, 10:25 PM
Is this confirmed to work on phpAS3? I tried to work this out with someone the other day because it didn't quite work right.
looks like it should
allstar
01-01-2007, 09:20 AM
You can do something like this to check the width and height of the image first and if it is 0x0 then..
list(
$width,$height) = getimagesize($curl->get($url2.'images/'.rawurlencode($game->thumb[0]->tagData)));
if($width == 0) {
$game->thumb[0]->tagData = 'noimage.gif';
}
if($height == 0) {
$game->thumb[0]->tagData = 'noimage.gif';
}
I suck at oop, but the author of import could set it up were it would default to a noimage.gif instead of it not writing a image. Also, it would check it before it is wrote to the server.
DylanButler
01-01-2007, 07:03 PM
I am getting all broken thumbnails on my site.. it is writing code like this in the listings:
<img src="http://www.thizzarcade.com/games/images/collegehumor.ea6a3217ba0a2ec724664b6e4b84dbf4.jpg" width="64" height="64" border="0" alt=""This guy puts Shoeless Joe to shame." Icon">
blank
01-01-2007, 09:30 PM
make sure your images directory is chmod 777 then if you don't have any images....
allstar
01-01-2007, 10:01 PM
alt=""This guy puts Shoeless Joe to shame." Icon"
The Alt tag's from what you posted has to many " in them, could be escaping the html script. You should try to remove all " from the alt descrition's of the images.
DylanButler
01-01-2007, 11:31 PM
make sure your images directory is chmod 777 then if you don't have any images....
Did that, still didn't work. You'll also notice it is trying to access an image saved as collegehumor.3939jargon.jpg (not sure if this will work on a browser window).
The Alt tag's from what you posted has to many " in them, could be escaping the html script. You should try to remove all " from the alt descrition's of the images.
Yes screwing with the quotes will undoubtedly cause undesired effects. Can you provide a script to remove quotes before an item is added to the database?
vBulletin® v3.7.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.