Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Image Status Checker / Dead Image Finder Details »
Image Status Checker / Dead Image Finder
Mod Version: 1.02, by bairy (Member) bairy is offline
Developer Last Online: Aug 2014 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.5.7 Rating: (1 vote - 5.00 average) Installs: 33
Released: 16 Aug 2006 Last Update: 27 Dec 2006 Downloads: 176
Not Supported DB Changes Uses Plugins Additional Files  

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
  • General
  • Fully phrased.
  • Templates are grouped. Who's online handled.
  • Part 1 - Admin
  • Reads the post table, scans all the [img] tags on demand and records the actual http status code returned.
  • If it gets stuck during the scan, you can restart the section it's currently doing.
  • If an image appears in more than one post, it's only checked once.
  • Start from, per page and timeout options for scanning.
  • Part 2 - Browser
  • Status codes are put into one of three descriptions for simplicity: Working, Dead, Unknown. Unknown is if the server didn't respond or similar - on the basis that a temporary timeout doesn't necessarily mean the image has gone.
  • In the browser, image urls are force wrapped. Unless people post using all caps, you have a low screen resolution, or the font size is big, the table should never stretch.
  • Filtering allows you to show just the working/dead/unknown images, and there's a search facility for a variety of fields.
  • Convenient link to edit the post (if a dead link is found). This works by can_moderate - edit links only appear for people who own the post, or can moderate the forum it's in.
  • Works by canview - if someone can't view a particular forum (e.g. staff forum) normally, they can't view the images within it.
  • Uses css for common stuff to reduce the size of the outputted pages.


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!
  • Only supports http://, not https://
  • Can only handle replies like: HTTP 1.x 200 as the first line.
  • Only supports [img] tags. If you have HTML turned on in any forums it won't see <img src=> images.
  • Biggie: There's no way to update a single post or image without a full re-scan. That means if someone edits their post to update or remove a dead link, it will not change on the browser until a full re-scan is done. I did play with various update methods but most are flawed in one way or another. A planned feature will be to update the table dynamically whenever a post is made, edited or deleted, and on demand using a link.
  • No cron job.
  • No session variables. (People without cookies will be logged out a lot).


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
  • By default it's set to only allow moderators, super-moderators and administrators to view the browser. This can be changed with the setting in AdminCP > vB Options.
  • The phrases all start with ics_ if you want to change them.
  • You can add a link to imagestatuschecker.php on the navbar (or anywhere) if you want your members to be able to view it.


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

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	1.png
Views:	807
Size:	27.7 KB
ID:	52233   Click image for larger version

Name:	2.png
Views:	726
Size:	83.6 KB
ID:	52234   Click image for larger version

Name:	3.png
Views:	520
Size:	16.7 KB
ID:	52235  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
  #31  
Old 19 Dec 2006, 16:19
mauro1947 mauro1947 is offline
 
Join Date: Nov 2006
Hi!
Does this mod works on vBulletin 3.6.4???
Thanks
Bye!
Reply With Quote
  #32  
Old 19 Dec 2006, 16:45
bairy bairy is offline
 
Join Date: Oct 2005
Real name: Chris
It works in 3.6.0 and doesn't rely on much vb code, so I would say yes it'll be fine in 3.6.4
Reply With Quote
  #33  
Old 20 Dec 2006, 00:49
Hornstar's Avatar
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Real name: Matt
Nice work, this looks like something I would need as i have lots of images.
Reply With Quote
  #34  
Old 20 Dec 2006, 23:37
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Real name: J
Originally Posted by bairy View Post
It works in 3.6.0 and doesn't rely on much vb code, so I would say yes it'll be fine in 3.6.4
All I get is no images found

3.6.4

Run the scan in maintenance: There are a total of 8,057 images.

my link above has been run

I've removed 2 images to try it
__________________
Thanks for your help

J
Reply With Quote
  #35  
Old 21 Dec 2006, 08:41
bairy bairy is offline
 
Join Date: Oct 2005
Real name: Chris
Did you actually run the scan (looks like screenshot 1 in the first post), or just get as far as the image count screen?
Reply With Quote
  #36  
Old 21 Dec 2006, 13:56
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Real name: J
Originally Posted by bairy View Post
Did you actually run the scan (looks like screenshot 1 in the first post), or just get as far as the image count screen?
I Ran the scan in admincp/ maintenance: There were are a total of 8,057 images.

But when i went to the link no images were found ?

Thanks
__________________
Thanks for your help

J
Reply With Quote
  #37  
Old 23 Dec 2006, 09:31
bairy bairy is offline
 
Join Date: Oct 2005
Real name: Chris
Hmm,
Could you go into "Execute SQL Query", just underneath "Update Counters" and run:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

On the next page it'll say Results: x

I'm interested in what number x is.
Reply With Quote
  #38  
Old 23 Dec 2006, 11:30
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Real name: J
Originally Posted by bairy View Post
On the next page it'll say Results: x

I'm interested in what number x is.
Results: 13,314 (0.0064s), Page 1 of 666

All at Status 000

If this is any use to you
__________________
Thanks for your help

J
Reply With Quote
  #39  
Old 23 Dec 2006, 13:55
bairy bairy is offline
 
Join Date: Oct 2005
Real name: Chris
Ah I believe it's because I missed something that throws the error message even when the table exists. Do you have a table prefix?

I'm not sure why they're all status 000, we'll deal with that after.
Reply With Quote
  #40  
Old 24 Dec 2006, 17:59
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Real name: J
Originally Posted by bairy View Post
Ah I believe it's because I missed something that throws the error message even when the table exists. Do you have a table prefix?
Not that I know of

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Should I have ?
__________________
Thanks for your help

J
Reply With Quote
  #41  
Old 26 Dec 2006, 17:16
bairy bairy is offline
 
Join Date: Oct 2005
Real name: Chris
Nah no table prefix should be fine.
I just thought I'd missed something, but it wouldn't make a difference, plus you'd get a database error message.

To be honest, I don't know. If you want to give me admin access and the ability to execute sql queries, I could have a look. Otherwise, I don't know what it might be.
Reply With Quote
  #42  
Old 26 Dec 2006, 23:10
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Real name: J
Originally Posted by bairy View Post
If you want to give me admin access and the ability to execute sql queries, I could have a look. Otherwise, I don't know what it might be.

you have a pm
__________________
Thanks for your help

J
Reply With Quote
  #43  
Old 27 Dec 2006, 10:05
bairy bairy is offline
 
Join Date: Oct 2005
Real name: Chris
Updated to 1.02

- Browser: Corrected bug that said "you haven't scanned" even if you have. This only affects people with table prefixes.

Re-upload the /imagestatuscheck.php file. The product file hasn't been changed so there's no need to re-import.

Last edited by bairy; 27 Dec 2006 at 10:09.
Reply With Quote
  #44  
Old 24 Aug 2007, 14:12
HarryBO HarryBO is offline
 
Join Date: Jan 2003
I use vb. 3.6.8 an it doesn´t work. Where is the link in admincp, where i can scan? When I start imagestatuscheck.php I see the page,but i become no matches.
Plz help
Reply With Quote
  #45  
Old 24 Aug 2007, 22:55
HarryBO HarryBO is offline
 
Join Date: Jan 2003
Great Problem!!!

I have even noticed that all my Images in the Forum are gone and all letters in threads are small. How can I fix that? A normal Deinstall wont work ;(
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 02:37.

Layout Options | Width: Wide Color: