I’ve added three helpful new templates to MDC that will help us standardize the look and feel of certain special situations in reference documentation:

The new method_noscript template is used to create a section heading for an interface method which can only be called from native code.  You use it like this:

{{template.method_noscript(“methodName”)}}

This creates a heading that looks like this:

The next template is method_fx_minversion, which creates a section heading for an interface method introduced in a specified version of Firefox.  For example:

{{template.method_fx_minversion(“methodName”, “3.5″)}}

The resulting heading looks like this:

Finally, the method_gecko_minversion template is used to badge a method as being introduced in a specified version of Gecko, like this:

{{template.method_gecko_minversion(“methodName”, “1.9.1″)}}

This produces the following heading:

The right edges actually do line up in real usage… I resized my window some in between taking these screenshots, and was too lazy to redo them.

These should help us make the documentation more concise in expressing this information to readers.

 

As seen in this photo we took in Florida last week, even the wildlife can turn to alcohol when times are tough:

This poor guy was in the median on the road near our hotel in Orlando.

 

One thing that occurred to me today is that most people don’t realize that because Mozilla Developer Center’s documentation site uses Lucene for search, you can use powerful queries when searching to help limit your results to more closely match what you’re looking for.

You can do some pretty powerful stuff; for example, if you’re looking for information about XML templates, you can search on “XML and template”.  This will leave out the articles on XUL templates.

You can also limit your search to just article titles, by using the “title” operator, like this: “title:(XML and template)”.  This search prioritizes results that include both “XML” and “template” in the article’s title.

It’s also important to note that certain characters need to be escaped in your search queries, by prefacing them with a backslash.  These special characters are:

+ – && || ! ( ) { } [ ] ^ ” ~ * ? : \

If you fail to escape these characters, you’ll get a somewhat cryptic error message about invalid syntax in your search query.

Hopefully this information will help you get more accurate and helpful results when searching MDC!

 

I need an add-on that lets me find and open web and/or FTP servers discovered using Bonjour.  Anyone up to creating one?  Bonus points if it works on both Windows and Mac.  Extra bonus points if it also works on Linux.

© 2012 Bit Stampede Suffusion theme by Sayontan Sinha