Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Link / URL Status Checker Details »»
Link / URL Status Checker
Version: 1.01, by bairy bairy is offline
Developer Last Online: Jul 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.6.0 Rating:
Released: 12-16-2006 Last Update: 12-26-2006 Installs: 45
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

What does this do?
For anyone who has seen or got my Image Status Checker hack, this is exactly the same, but works on links ([url=], [url]) instead.

Basically it scans all your posts, extracts all the url tags, and scans each of the images to see if they're still valid.

The rest of this is basically the description of that hack reworded


Why?
I had a look at all the links on my site and was alarmed at how many were now gone. Since the only way you can check the links on your board is to manually read every post and click them, 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 url 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, linkstatuscheck.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 [url=] and [url] 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 link 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, link 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 [url] and [url=] tags. If you have HTML turned on in any forums it won't see <a href=> links.
  • Biggie: There's no way to update a single post or link 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.
  • No cron job.
  • No session variables. (People without cookies will be logged out a lot).


Footnotes
The code to the Image Status Check hack is very similar, so I pretty much copy pasted and adapted it. It is a little bigger due to handling the [url=] "option", but you may find references to images. Let me know if you do.


It will work on 3.6 and 3.5, though you'll need to remove the "executionorder=" from the .xml file to get it working on 3.5


Installation
Upload linkstatuscheck.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 usc_ if you want to change them.
  • You can add a link to linkstatuschecker.php on the navbar (or anywhere) if you want your members to be able to view it.


Screenies
Exactly the same as the Image Status Checker, only with URL links rather than image links.
What? I'm feeling lazy.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 12-17-2006, 07:17 PM
bairy bairy is offline
 
Join Date: Oct 2005
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If someone makes a post with a url in, and they make another post with the same url in, then there's no point pinging the site twice. So it'll ping it once, and any occurance after that will be labelled as already dealt with.
It also happens if you manually restart pages, or start scanning from an id other than -1
Reply With Quote
  #13  
Old 12-17-2006, 07:18 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thats strange... cause i dont get it on the 1st page but all the rest i do!

Quote:
Originally Posted by bairy View Post
If someone makes a post with a url in, and they make another post with the same url in, then there's no point pinging the site twice. So it'll ping it once, and any occurance after that will be labelled as already dealt with.
It also happens if you manually restart pages, or start scanning from an id other than -1
Reply With Quote
  #14  
Old 12-17-2006, 07:20 PM
Bounce's Avatar
Bounce Bounce is offline
 
Join Date: Mar 2004
Location: Edinburgh,Scotland
Posts: 919
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working fine here , thanks

Does the IMAGE checker work on 3.6 ?
Reply With Quote
  #15  
Old 12-17-2006, 07:24 PM
bashy bashy is offline
 
Join Date: Nov 2005
Posts: 2,544
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah well, must be my site not wanting to play ball with both checkers, thanks anyway, but have removed now, the idea was there,, thanks again
Reply With Quote
  #16  
Old 12-17-2006, 09:02 PM
bairy bairy is offline
 
Join Date: Oct 2005
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hIBEES View Post
Working fine here , thanks

Does the IMAGE checker work on 3.6 ?
Yes. At least, on 3.6.0. I should imagine it working in the whole 3.6 range.
Reply With Quote
  #17  
Old 12-18-2006, 01:32 AM
UltimateOreo! UltimateOreo! is offline
 
Join Date: Nov 2006
Location: Missouri
Posts: 462
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why dont you check this into beta if there are so many issues?
Reply With Quote
  #18  
Old 12-18-2006, 06:10 AM
bchertov's Avatar
bchertov bchertov is offline
 
Join Date: Dec 2004
Location: Sonoma County, CA
Posts: 259
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This looks good!

Is it possible to query to width of the image as well?

Thanks!
Barry
Reply With Quote
  #19  
Old 12-18-2006, 12:34 PM
bairy bairy is offline
 
Join Date: Oct 2005
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by UltimateOreo! View Post
Why dont you check this into beta if there are so many issues?
Because putting it in Beta implies that I'll be updating it at some point, which is unlikely unless a bug is found and a workaround is easy, or it's a serious bug.
This is a "I use it, it works for me, others may as well use it if it works for them" hack.

Quote:
Originally Posted by bchertov View Post
Is it possible to query to width of the image as well?
I'm guessing you meant to reply to the image status checker, however I shall answer here.
I'm afraid I probably won't be including that. I'm not sure if vbulletin holds that info in any case. May I ask why you'd want it to, there might be another way to do it...
Reply With Quote
  #20  
Old 12-18-2006, 03:33 PM
ymy ymy is offline
 
Join Date: Feb 2003
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks ,

Install click
Reply With Quote
  #21  
Old 12-19-2006, 11:48 PM
Hornstar Hornstar is offline
 
Join Date: Jun 2005
Location: Australia
Posts: 2,469
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This actually looks very handy. nice work.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 07:23 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06192 seconds
  • Memory Usage 2,314KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete