Re: How to implement link checking in the content a CMS stores
Vlad Alexander (XStandard) <vlad.alexander-2yTxSKUaU0r2eFz/[email protected]>
| Newsgroups | gmane.comp.cms.cms-forum.general |
|---|---|
| Message-ID | <gkzvbfxuxp7f5p1.070220051748@pinscher> |
Hi Darrel, >>are there any products out there that folks would >>recommend that would scan the site externally looking >>for bad links? We have a product called ScriptQ which is used to process batch jobs on the server for CMS. It can be used to check for broken links. Check out the link "Web Bot" in the left margin from this link: http://belus.com/scriptq/ >>This other page is later deleted, and now you have a bad link. Before content is stored in the database, some CMS systems parse the markup and get a list of URLs. Depending on the format of URLs used in the CMS, you can determine if the URL is external (usually an absolute URL) or internal (usually relative URL starting with a document ID). If you are authoring in XHTML, you can use an XML parser to parse the markup and get the URL from <a href=""> or <img src="">. So, in your database, you'll need to create a two column table. Column one is the source document id and column to is the target document id. You know the source document id because it is the current document being saved. And you get target document IDs from the relative URLs. Now, when a document is delete, you delete all the reconds in this table where the "source" equals to the document ID. Then you check if this document ID appears in the "target" column. If it does, you generate an email to the admin. I would go with an external broken link checker approach. Regards, -Vlad http://xstandard.com ----- Original Message ----- From: "Austin, Darrel" <[email protected]> To: <[email protected]> Sent: Monday, February 07, 2005 3:49 PM Subject: [CMS] How to implement link checking in the content a CMS stores > For those of you that build CMSes, how do you handle the checking of links > within the content of the CMS. > > For instance, you have page content stored in a DB record. This content is > formatted HTML, and has a link to another page on your site. This other page > is later deleted, and now you have a bad link. > > I'm guessing the weak link here is storing URIs as hard-coded in the HTML. > Are there practical alternatives to that? If not, are there any products out > there that folks would recommend that would scan the site externally looking > for bad links? > > -Darrel > _______________________________________________ > cms mailing list > [email protected] > Subscription controls: > http://lists.cms-forum.org/mailman/listinfo/cms > Netiquette FAQ and related CMS lists - [cms-forum], [cms-pr], [contentmanagers], [cmpros] > http://www.cmsreview.com/NetiquetteFAQ.html >