Well, my days of not taking you seriously are certainly coming to a middle.

Mal ,'Our Mrs. Reynolds'


Buffistas Building a Better Board  

Do you have problems, concerns or recommendations about the technical side of the Phoenix? Air them here. Compliments also welcome.

To-do list


§ ita § - Nov 19, 2002 11:08:31 am PST #1624 of 10000
Well not canonically, no, but this is transformative fiction.

Yup.


John H - Nov 19, 2002 1:24:27 pm PST #1625 of 10000

Thanks for that PHP stuff Gar, I did actually know that you can use arrays in order and as associative arrays, but coming from a Perl background where one has to be a @ and the other has to be a %, it freaks me out when everything's a $.

It's like that Stephen Wright gag about the thermos: put something hot in it, it keeps it hot, put something cold in it, it keeps it cold -- but how does it know?


John H - Nov 19, 2002 1:35:53 pm PST #1626 of 10000

OK the thing about whether stuff gets enclosed in quotes?

Technically speaking, it's about what type of characters are in the attribute's value.

[for people who may not know the terminology -- in <font color="white"> "font" is the tag, "color" is the attribute, and "white" is the attribute's value.]

If you do a syntax check, you'll get an error message for

width=50%

but not for

width=50

because "50" contains alphanumeric characters only, but the per cent sign isn't alphanumeric.

Similarly, you'll get an error for:

font color=#ffffff

but not

font color=white

for the same reason, which kind of seems wrong to me.

But this only applies to non-strict versions of HTML only, like the one we use here. Other versions require much more rigour and everything to be in quotes. Plus it always comes down to the browser's level of forgiveness anyway. Your browser might be happy with it, but not someone else's.

So ita's right, of course, always enclose things in quotes, yes. But please use the same ones at the end you use at the start...


Katie M - Nov 19, 2002 2:23:30 pm PST #1627 of 10000
I was charmed (albeit somewhat perplexed) by the fannish sensibility of many of the music choices -- it's like the director was trying to vid Canada. --loligo on the Olympic Opening Ceremonies

Okay. Using quotes, and using them twice. Got it.


Typo Boy - Nov 19, 2002 2:38:32 pm PST #1628 of 10000
Calli: My people have a saying. A man who trusts can never be betrayed, only mistaken.Avon: Life expectancy among your people must be extremely short.

Thanks for that PHP stuff Gar, I did actually know that you can use arrays in order and as associative arrays, but coming from a Perl background where one has to be a @ and the other has to be a %, it freaks me out when everything's a $.

But the end() function actually did help, right? The rest was just a thought that if you did not know the end() command, you might have missed some of the other functions.

And, yeah the one thing you have to get used to in PHP is how it makes your life easier. Except when it makes your life harder. Or impossible. In short, just like any other programming language.


Typo Boy - Nov 19, 2002 2:38:35 pm PST #1629 of 10000
Calli: My people have a saying. A man who trusts can never be betrayed, only mistaken.Avon: Life expectancy among your people must be extremely short.

John H - Nov 19, 2002 2:49:08 pm PST #1630 of 10000

Not only did the "end()" function help, I've finished a prototype tag-syntax checker at [link] on the strength of it.

I say "tag-syntax" checker because it won't figure out problems with quotes.

It uses Method A (ordered array) and Method B (associative array), but if B is happy it over-rides A.

It explains what it's doing, so just play with it.

For testing, it just checks the integrity of any lowercase bold, italic and font tags, but you know, proof of concept.


Rob - Nov 19, 2002 2:54:44 pm PST #1631 of 10000

I tried it, John, and it doesn't seem to catch any errors at all.

I put in

a
<bold>
a
<bold>
a
<bold>
a
</bold>

and it spit out

found tags: bold, bold, bold, /bold, Trying to match openers and closers:
Diagnosing: Length of outstanding tags array: 0
Sum for each tag (opener +1, closer -1):
bold count =
Sum of all tags: 0
Conclusion: code passes both tests and appears unbroken.


Typo Boy - Nov 19, 2002 2:56:28 pm PST #1632 of 10000
Calli: My people have a saying. A man who trusts can never be betrayed, only mistaken.Avon: Life expectancy among your people must be extremely short.

Also, it happily accepts extra close tags. It did detect some crossed tags nicely though.


Typo Boy - Nov 19, 2002 2:57:52 pm PST #1633 of 10000
Calli: My people have a saying. A man who trusts can never be betrayed, only mistaken.Avon: Life expectancy among your people must be extremely short.

And it does detect an opening tag with not close. The problem is that it takes one closing tag as sufficient for any number of opening tags.