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 |
#12
|
||||
|
||||
There was also another issue, I edited my post.
|
#13
|
|||
|
|||
Thanks installed
|
#14
|
|||
|
|||
OK i try it it works byt i get many worning links with Unknown status
Y this happents? Can you tell me how can i add it also to navbar for moder admin smoder groups only?? i mean if there is no 5,6,7 dont show the link EDIT: Ok i made it its easy LOL <if condition="$bbuserinfo[usergroupid] == 6"> <td class="vbmenu_control"><a href="imagestatuscheck.php">DIF</a></td> </if> |
#15
|
|||
|
|||
Chad : Each image is requested one by one and only the first 12 characters of the return are read, as they are the ones with the status code in them. After that the connection is closed. Theoretically it will use output about 200 bytes and input 12 bytes per request. Practically I don't know how web servers work, but I suspect once php has sent a close to the other server the transfer will stop. So no, not much bandwidth
|
#16
|
|||
|
|||
Hello ,
there is error , Database error in vBulletin 3.6.0: Invalid SQL: INSERT INTO imagestatus VALUES (NULL, 172959, 3498, 'http://www.dohaeye.com/lyrics/3'air%20elnass.jpg', ''); MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'air%20elnass.jpg', '')' at line 1 Error Number : 1064 Date : Wednesday, August 16th 2006 @ 09:21:55 PM Script : http://www.dha.net/moda/admincp/misc...tus&cis=findem Referrer : http://www.dha.net/moda/admincp/misc...k_image_status IP Address : 213.6.1.100 Username : Admin Classname : vb_database |
#17
|
|||
|
|||
The sql errors are because the image url isn't escaped. Silly oversight. I'll probably get an updated product out tomorrow along with a couple of other changes.
|
#18
|
|||
|
|||
on a related note, what about scanning all posts for img tags, rehosting all remote images at a local location and editting the posts with the new url so that you don't have to worry about the images going away?
|
#19
|
|||
|
|||
Quote:
Unknown generally means one of two things: 1. Server didn't reply within 15 seconds 2. Server didn't send a nice http header back Quote:
|
#20
|
|||
|
|||
Thanks bairy
|
#21
|
||||
|
||||
Quote:
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|