Identification, Images, & Information
For Insects, Spiders & Their Kin
For the United States & Canada
Clickable Guide
Moths Butterflies Flies Caterpillars Flies Dragonflies Flies Mantids Cockroaches Bees and Wasps Walkingsticks Earwigs Ants Termites Hoppers and Kin Hoppers and Kin Beetles True Bugs Fleas Grasshoppers and Kin Ticks Spiders Scorpions Centipedes Millipedes

Upcoming Events

Discussion of 2018 gathering

Photos of insects and people from the 2015 gathering in Wisconsin, July 10-12

Photos of insects and people from the 2014 gathering in Virginia, June 4-7.

Photos of insects and people from the 2013 gathering in Arizona, July 25-28

Photos of insects and people from the 2012 gathering in Alabama

Photos of insects and people from the 2011 gathering in Iowa

Photos from the 2010 Workshop in Grinnell, Iowa

Photos from the 2009 gathering in Washington

Fixing broken links to CBIF

CBIF (Canadian Biodiversity Information Facility) has changed its web address, so all the links that used that site to compare moths are broken. Does anyone know how to fix them? The problem may be that the new links have square brackets in them, which confuse our system.

Here's one of the old links:

This is how it looked on our page:
both species together for comparison

Here's the new address for that comparison:[]=108890.jpg%2CPseudoplusia+includens&image[]=108908.jpg%2CAutographa+precationis

but I can't make that work.

Any ideas?

Comparing Moths
The links are constructed as follows:[]=NUMBER.jpg,LABEL&image[]=NUMBER.jpg,LABEL


Note that the weird %2C, %5B and %5D are just encoded , [ and ] respectively.

You can click on a province here and check some boxes to create the comparison URL.

Just for fun, here are the 227 pages on BugGuide that still link to the old addresses, which are currently being redirected by their system.

Thanks John,
I'm sorry - I didn't explain the problem clearly.

I know how to make comparison pages on CBIF. But what I don't know, is how to put those links on a BG page. With their old links, I could hide that big long ugly link behind some text. But now I can't do that.

This is one of the old links - the ugly long link is hidden.
(compare images of all three species)

If I try that with one of their new links, it doesn't work.

Does that make sense?

If I understand the problem correctly, you are using BBCode syntax which uses a left square bracket and the letters "url" and an equals sign and then the URL itself, a right square bracket, then the text you want to display, then a left square bracket, a "/url" and a right square bracket. Whew.

The problem with this is that the right square bracket is used both to end the URL (for BBCode) and as part of the actual URL that CBIF wants to use.

There are two solutions. The first is to use regular HTML hyperlink syntax instead of using BBCode.

The second is to use the encoded versions of [ and ] (namely %5B and %5D) in your BBCode link to prevent BBCode link from recognizing the right square bracket.

I have done the same comparison link below, the first using an HTML hyperlink and the second using encoded brackets. If this is not your actual question ask again and I'll try again. :)

this link entered as an HTML hyperlink

this link entered as BBCode

I just figured out something else...
A very quick easy fix for the broken links is to insert: SpeciesBank/ after ca/ in the url.
Not all the links are broken - the butterfly links are fine, and there are few links to lists that work. But all the ones that go to pinned moth images are broken.

I'm slowly working my way through your list - although I'm not fixing links in individual people's posts - just on the info pages.

fixing links
I fixed all the links on this list that were not individual postings, and that were moth photos. (Butterfly links work fine.) There are still many more broken ones that I run across - I'll fix them when I see them.

Thanks John,
That's just what I needed!

Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.