The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Image Status Checker / Dead Image Finder Details »» | |||||||||||||||||||||||||
Note this hack works with vb3.6
What does this do? It scans all your posts, extracts all the img tags, and scans each of the images to see if they're still valid. Why? I had a look at all the images on my site and was alarmed at how many were now gone - deleted from photobucket accounts etc. Since the only way you can check the images on your board is to manually read every post, I decided to come up with a better way... and this is it. How does it work? The first part: In the AdminCP, under Maintenance and Update Counters... right at the bottom is this hack. It works by looking up every img tag, then requesting the image, and reading the http status code. So code 200 means 'image ok', 404/410 means 'image gone' etc. That then gets stored in a database table. A server has 15 seconds to reply to the request or the status is labelled as "Unknown" The second part: The browsing element, imagestatuscheck.php (original filename huh!). This allows you to browse all the images found in the last scan using some powerful filtering (statuses to display, search, order by). Hack features
Bad Things It's far from a perfect hack, there are many things to do. Please be aware that I won't be doing them, but if anyone else wants a crack, feel free!
Footnotes Originally I planned to throw something together quickly just for me to use but it turned into a "I may as well make a nice interface... oh and I may as well put some filtering controls in and I ..." A [url] link checker can be found here Installation Upload imagestatuscheck.php to your vB directory. Install the product, set overwrite to yes. Customizing
Screenies Shot 1 is AdminCP during scan Shot 2 is a typical Browser section output Shot 3 is no results output Changelog See attached file for specific changes. 1.00 - 16th August 06 1.01 - 17th August 06 1.02 - 27th December 06 Show Your Support
|
Comments |
#22
|
|||
|
|||
Updated to 1.01 to clear up the early bugs and improve a few things:
- Misc: Install code creates empty db table - Misc: Corrected silly oversight to reduce db errors (escaping image urls) - Scanner: Added options to maintenance section - Scanner: Rewrote quite a bit of the code to work with the new options - Browser: Added "you haven't scanned yet" warning if the table is missing (unlikely but best to be handled) - Browser: isc_no_results template wasn't included in the 1.00 product for some reason. It is now and is used when there are no results - Browser: Added a perpage, lower limit 5, upper limit 100. Outside these and it defaults to 30 Reupload imagestatuscheck.php. Reimport the product xml with overwrite set to yes. |
#23
|
|||
|
|||
If I click on "search/Filter" it blinks an than it shows me the startscreen of imagestatuscheck.php but no resulst.
What is wrong? GreeTz Snatch |
#24
|
|||
|
|||
Have you run a scan first?
If so, how many images did it scan? |
#25
|
|||
|
|||
LoL sorry, my fault.
GreeTz Snatch |
#26
|
|||
|
|||
2 more questions.
1: now i runed the process for find death images. But when I go to the .php File i get this Error Code:
Datenbankfehler in vBulletin 3.6.0: Invalid SQL: SELECT i.id AS iid, i.postid, i.userid, i.imageurl, i.status, u.username, t.forumid, t.title AS threadtitle, f.title AS forumtitle FROM imagestatus i LEFT JOIN user u ON (i.userid = u.userid) LEFT JOIN post p ON (i.postid = p.postid) LEFT JOIN thread t ON (p.threadid = t.threadid) LEFT JOIN forum f ON (t.forumid = f.forumid) WHERE i.`status` IN (401,402,403,404,405,406,407,409,410,411,412,413,414,415,416,417,000,0,100,101,201,202,203,204,205,300,301,303,305,400,408,500,501,502,503,504,505) AND t.forumid NOT IN (0) ORDER BY u.username asc LIMIT 0, 30; MySQL-Fehler : Got error 28 from storage engine Fehler-Nr. : 1030 Datum : Friday, August 18th 2006 @ 10:48:58 AM Skript : http://www.celebritymarkt.de/imagestatuscheck.php Referrer : IP-Adresse : Benutzername : Klassenname : vb_database 562,783 images remaining Muhahaha 2: What means the text "duplicate / dealt with" behind the ImageUrl? Show Attach! The first 2 Pages are o.k. but then only "duplicate / dealt with" GreeTz Snatch |
#27
|
|||
|
|||
Error code 28 means no more space left. Either the hard drive ran out of space or your allowed disk space maxed itself.
If you really have 562k images, and I believe you do, then that's not really a surprise as the script creates a new table with all the images in it. I have 1300 images and takes up about 170k. So multiplying it up there's probably a table size of 70mb or so. However it obviously managed to get some images in at least. The duplicate/dealt with message comes up because: Lets say you have one image and it's been linked in 2 posts. There's no point scanning the same image twice since one scan will tell us if it's valid. Therefore it's scanned once and if the image comes up again it's counted as 'duplicate' or 'dealt with' (they mean the same thing in this case). Another reason is if you resume a scan (not restart it). As it will already have scanned some of the images and they'll be classed as "dealt with". If you have a lot of images saying that then it could be because you're doing another scan but not from the start, or it could be related to the error 28, depending what got inserted and what didn't. |
#28
|
|||
|
|||
Does this work with VB 3.6.2?
If so, everytime I run a scanner, and then run statuscheck.php, I get: You haven't run the scanner yet. You will find it in the Admin Control Panel under Maintainance -> Update Counters, at the bottom. Non-admins don't see this message. Tried a hundred times, but keeps doing the same thing.:down: image status checker in vb options: 5,6,7 I need to get this to work. Please someone help. |
#29
|
||||
|
||||
{I first posted my query in the URL checker thread}
Hi, I have a custom HTML Daily Digest that includes Images that are inserted using {IMG} tags. I want to prevent images from forcing the Digest to be too wide because they are over 750 pixels wide. I can resize it in the digest if I know the image is too wide. So I'm looking for some code that will tell my how wide an {IMG} is. Can this hack help me? Can you help me? Thanks! Barry |
#30
|
|||
|
|||
Ahhh now I see.
I've just realised that basically, no. I think that in order to get the dimensions of an image, the server would have to fully download it and then analyse it as the information isn't included in the http headers. That would drain the destination server's bandwidth and take a lot longer. My only real suggestion is to load up the images you want to include in a web browser, right click them and click properties, and see the dimensions there. |
#31
|
||||
|
||||
Thanks, but I was trying to find some automated way of doing this. I guess I'll check the image resizing hacks to see how they do it. Thanks anyway.
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|