The continuing saga of my love/hate relationship with Gallery 3. AKA, "I code hard so you get a nicer looking product."
So, I decided to try adding some information I have on my
big chart o' makes and models onto my gallery. Trial and error led me to almost what I wanted, which is the nice table that's
on this sample page.
Tables are incredibly easy to make either by hand or with a
WYSIWYG HTML editor. I have Macromedia Dreamweaver MX and it's 3 clicks. However, that's
regular HTML. Not
Gallery 3 HTML.
So, here's how it went:
* Create a new table in Dreamweaver.
* Paste in table entries from my website.
* Check to see if it looks good in a browser.
* Test with the
W3C Markup Validation Service to make sure code is 100% compliant -- in other words, "Should work in any browser."
* Paste code into the "Edit Album" field in Gallery 3.
* Cry because all the entries are screwed up.
Alignment? Negative. Gigantic blank space between header and table? You betcha. I spend about 15-20 minutes to see if it's a problem with the theme I'm using or some odd little setting in Gallery 3. Nope.
I Google to see if Gallery 3 uses some sort of odd table format. Yah. They do.
Explanation page. *Sigh*
So, I try just modifying my code with Gallery 3's addition. Fails. So I Google for this "caption" tag that I've never used, but Gallery 3 seems to. Ah.
It's CSS being called by HTML. Grand.
If you check the above linky for that CSS-aware table, it's got this nice, neat layout:
<TABLE>
<CAPTION>This is a simple 3x3 table</CAPTION>
<TR id="row1">
<TH>Header 1 <TD>Cell 1 <TD>Cell 2
<TR id="row2">
<TH>Header 2 <TD>Cell 3 <TD>Cell 4
<TR id="row3">
<TH>Header 3 <TD>Cell 5 <TD>Cell 6
</TABLE>
Shiny. I copy and paste it into Gallery 3 and it works like a champ. The next step is to modify the code for my use: I axe the caption, I change the <TH> stuff to <TD> -- I've got three columns -- and axe row 3. Additionally, so I can read the code easier, I insert a couple carriage returns between each "row."
I test. It fails. It doesn't like the carriage returns between the lines. Hunh? That's different. Well, I can cope with that. If I'm really interested, I could always add a couple
comment tags.
So, I fill in the top row of my table with no further drama. However, the second row has multiple lines. OK. So I copy and paste one of my multi-lines into one block (call it "Cell 3" in the above example). Crash. Burn. Why? Well, I'm using the the very standard, very compatible
<span> tag for each line of text. Gallery 3 doesn't like that. It wants the
XHTML tag <br />. Arrrrrgggggghhhhh.
OK, so I do all of that for Cell 3 and proceed to fill in the next cell. Test. Crash. Burn. Why? Again it's a carriage return: Gallery 3 wants a
tab between things like, say, the 5 and the < in the above example, not a carriage return. I do a face palm. I must say that it's more painful when you wear glasses.
Anyhow, after sorting all that, I think the page came out quite nicely. If anyone wants the full code I used, drop me a line. You've also got to install Gallery 3's HTML Purifier plug-in.