Find Alt Attributes with FrontPage Queries - Current Issue
FrontPage News
FrontPage Links
General Links
FrontPage ArticleEditor: Tina Clarke
Issue 4 Vol a: 25th March 2006 Members: 2,395
~~~~++++FrontPage SPONSOR AD++++~~~~~
FrontLook Backup Prohttp://anyfrontpage.com/r2/fbu.htm
Backup to a remote FTP Server means your Data is safe from disaster!
Data is compressed before it is copied to the FTP Server to save bandwidth and space.
Your Data is encrypted to make sure no one can access it except you!
Automatic backups mean you don’t have to remember to backup your data
Restoring files is self-serve-easy with FrontLook Data Backup.
http://anyfrontpage.com/r2/fbu.htm
~~~~++++FrontPage SPONSOR AD++++~~~~~
FrontPage News
~ Editors ramblings
I've been working on more FrontPage Tips Ebooks but they are not ready yet. I am also working on a Getting Started with FrontPage Ebook as a bonus it will have a Full DWT Template with FP Includes for the menus and Full CSS, which is Free with the ebook.
I've been concentrating more on hardware since the last issue and will shortly have a nice new 120gb drive, which will be just in time, this one is brimming over. Plus a beta machine where I can play and break things with impunity, everyone should have a beta machine.
Lastly I have a new domain called http://any-expression.com unlike my present sites for FrontPage I won't be splitting help features up into different domains for Tips, Tutorials, Ebooks, Ezines and Addons. Every help feature will be on the one site. I have not yet started with any content but keep an eye out for upcoming news.
Anyfrontpage Members only have access to a freebie this issue, see the text version that arrives in your mail box. New members that missed the posting of the ezine can still obtain this gift and others like the FrontPage Newbie Secrets ebook, via the archives.
~ FrontPage News and Information
FrontPage as we know it is coming to an end. FrontPage 2003 is the last version. HOWEVER, we do have something to put in it's place from Microsoft, and it comes in two flavours. Microsoft Office Sharepoint Designer 2007 and Expression Web Designer learn more about the next generation of FrontPage In moving forward Anyfrontpage will be supporting Expression Web Designer and will always support as our domain name says, Any FrontPage - any version of FrontPage. The CTP version of EWD will now be available to all in June of this year. Sharepoint Designer 2007 however will probably ship in January with the Expression Suite sometime after that.
FrontPage Links
Each of these links below have changed from the old link to a new link and you should look to see if your links are up to date.
http://atfrontpage.com/
http://msmvps.com/blogs/spiderwebwoman/archive/category/321.aspx
http://msmvps.com/blogs/frontpage/
http://msmvps.com/blogs/sitebuilder/
http://www.jimcosoftware.com/
http://www.elijournals.com/products/showProduct.asp?prodID=32&catId=3
http://www.websunlimited.com/wumain/
Expression and Sharepoint Resources
Any Expression
Microsoft Expression Web Designer
Microsoft Expression Graphic Designer
Devi on Expression Web Designer
By Expression
Office Zealot - Sharepoint
The Expression Designers
Rob Mauceri's FrontPage Blog
General Links
Digital Photography Tips
Step by step Wordpress Tutorial
Text to Table - Spreadsheet to Html
FrontPage Article
Find Alt Attributes with FrontPage Queries
We discussed in the previous issue Alt Text in FrontPage, but what do you do if you miss entering the text into the Alt Attribute and need to check your whole site? It is quite easy to forget to do so, and even more so with design graphics such as bullets, spacers and line bars.
There are two ways to check your whole site.
1) FrontPage Addon TP_ErrOmi - The FrontPage Addon TP_ErrOmi which is only available via the wayback machine as the webmaster is no longer on the net. The addon will search the whole site for you and warn you of missing Alt Attributes and even insert text for you such as 'Your Alt- Text here' or it will enter the Image File Name and size parameters of the graphic. You can also enter image file names to exclude them from Alt - Text Tests.
NOTE: If your site has a DWT (Dynamic Web Template) then make sure none of the other features of the addon are enabled as they interfere with the editable region coding.
2) Using a Query in the Find and Replace box. - FrontPage uses Extensible Markup Language (XML) to perform queries and you can write your own queries with the Find and Replace Dialog box. Once your query is created you can then save it so you can use it again or you provide it for others to use.
How to write a Query
Without Attribute - Alt
Go to the 'Edit' Menu and Click 'Replace' or press Control + H on the keyboard.
Click the 'HTML Tags' Tab, Where it says 'Find Tag' click the drop down arrow and scroll down till you find 'img'.
Next click the 'HTML Rules' button and the 'HTML Rules' Dialog box will appear. Click 'New Rule' and the 'New Rule' drop down box will appear at the bottom, click the drop down arrow and select 'Without attribute'.
With 'Without attribute' selected a second drop down box will appear, in there select 'alt' then click ok.
The 'Without Attribute' finds the text or tag only if it is in a tag without an attribute. For example, you can search for all instances of "img" and limit your search to only those tags that do not include a specific attribute.
Next press the 'Save Query' Icon
and the 'File Save' Dialog box will appear with the Queries folder already selected. Type in the name of the query you have just made, I've called mine without-query-alt and the file will be saved with the extension .fpq.
Next select 'All Pages' under Search Options > Find Where: Then Press the 'Find in Site' Button.
FrontPage proceeds to run the query and find all the images on your website that do not contain a Alt Attribute. Double click the first selection and FrontPage will open the page and highlight the first graphic on the page that does not contain an Alt Attribute (There may be more than one graphic without a Alt Attribute on any given page).
When you have inserted the Alt Attribute code and the Alt Text or perhaps left it blank for such graphics as bullets which are part of the design (For ways and means to do this see the next section). Tick the radio button to 'save and close this page' and if you are running the expanded query (see next section) click 'Next Page' if not click 'Back to list'.
Without Attribute - Alt - Replace Action
What happens when you find each graphic with the above query and you want to insert the code for the alt? You can either go to 'Code View' and find the graphic and insert the code. Or use 'Split View', the graphic will be selected in the Design pane, and this highlights it in the Code View, where you can insert the code. Which is - alt="". Or you can right click the graphic in 'Design View' go to the 'Appearance' Tab and insert Alt Text or tick the 'Text' radio button to insert a blank Alt Attribute for such graphics as bullets and spacers and FrontPage will do the job for you.
I think it's much easier to have your query fill in the actual code without any further clicking and using split view either insert the Alt Text or leave as it is if it's a Design graphic such as a spacer.
This requires just a little more tweaking of the query.
Where it says 'Replace action' click the drop down arrow and select 'Set attribute value' this makes the 'Attribute' and 'To' boxes appear. In the 'Attribute' box, click the dropdown and select alt. In the 'To' box leave it blank. Save the query as I outlined above and call it without-attribute-alt-replace.fpq
Running a Query
When you come to use The 'Find and Replace Queries' Dialog box again, you will need to select the query you want to use, do this by clicking the 'Open Query' Icon on the 'HTML Tags' Tab, and select the query in the 'File Open' Dialog box then press Open.
You can check you have selected the correct query as the text will display on the Dialog box in this case it should say Without Attribute; alt (see above screenshot)
Sharing Queries
FrontPage saves queries under C:\Documents and Settings\Tina\Application Data\Microsoft\FrontPage\Queries (where C is the drive in use and Tina is the user - change Tina for your user name) by default, but they can be saved to a easier to remember location. All queries are saved with the .fpq file extension and you can open them in notepad.
Open a browser window and insert location of your queries for our example we are using the default location, as I mentioned above change the user name to yours. C:\Documents and Settings\Tina\Application Data\Microsoft\FrontPage\Queries
In the browser window pane Right click on the query you wish to open and choose 'Open With', scroll down and choose Notepad, make sure 'Always use this program to open these files' is NOT ticked and press OK, notepad will open and the query will be displayed as a xml file. You can then save the file.
e.g.
<?xml version="1.0" encoding="utf-8" ?>
<fpquery version="1.0">
<queryparams />
<find tag="img">
<rule type="attribute" attribute="alt" compare="=" value="" negate="true" />
</find>
<replace type="none" />
</fpquery>
In notepad go to File | Save As where it says 'Save as Type' change to 'All Files' and name the file, browse to the web you want to save it in and press save. Link to the files you wish to make available.
For those that don't wish to make the query I have discussed above then they can obtain it from Missing Alt Attribute Replace Query
See the next section for how to save the query and run it.
The Missing Alt Attribute Query without the code for the Alt Attribute
Saving a Query from a third party
Click the Download link for the query you wish to use above in the browser window, by right clicking and choosing 'Save Target As'. Where it says 'Save in' click the arrow on the drop down and browse to the default location - C:\Documents and Settings\Tina\Application Data\Microsoft\FrontPage\Queries - (see above under Sharing Queries for more Details on the location) and see Running a Query for more information on how to run it.
FrontPage Query - Remove Border Thickness on Images
FrontPage Query Gift to AnyFrontPage Members
I've made another query for AnyFrontPage members that allows a global query for all images that contain the border attribute.
When we first start to make webs, we all do the usual newbie things like leaving the border thickness for Graphics and Thumbnails set to a number greater than 0. This allows linked images, in particular thumbnails which link to a larger picture to have a visible hyperlink border which is not going to give a polished and professional look to your images and site.
You can of course set your Thumbnail Border Thickness to 0 globally via Tools | Page Options | AutoThumbnail. However if you have already worked through a site before learning it's just not cool to display your linked images in this way, all you can do is run various Find and Replace searches for each thickness you may have used. This query allows a global search for any number greater than 0.
If your reading this article and you are not a member of AnyFrontPage Ezine then delay no longer and sign up to become a member and you will be entitled to the free FrontPage Query - Remove Border Thickness on Images
ABOUT THE AUTHOR:
******************************
Tina Clarke, Microsoft MVP -FrontPage
http://accessfp.net/
http://frontpage-tips.com/
http://frontpage-ebooks.com/
Tina is Editor of AnyFrontPage and other FrontPage Resource sites (see Sister Sites on anyfrontpage.com) her most recent site is
http://any-expression.com/
******************************
↑ Top

