[dokuwiki] Re: pending patches?

Sander Tekelenburg schrieb am 18.01.2007 22:22:

I know that. But when the generated (X)HTMLcode has no special tags (like q
or blockquote or cite or whatever) around the passages, I do not see what
this css code helps for me.

Well, if the text in question is in fact a quote (and why else would you use
quote characters), the proper mark-up would be to use <q> or <blockquote>. If
you're saying those elements aren't there, then I'd say *that* is the problem.

Yes sir :-) You got me right. I cannot show quotation marks via CSS when there is no tag aropund ;-)

I do recognise that Dokuwiki's inline editor doesn't offer buttons to
generate such mark-up, so you'd have to allow raw HTML to be entered. (Or
perhaps it can be done with markdown, which I believe Dokuwiki supports.)

[That aside, because I didn't quite understand which problem you're trying to
solve, I tried to keep my suggestion somewhat generic -- I mentioned <q> and
<blockquote>, but you can of course apply such CSS rules to other elements,
if you think it makes sense. I just meant to show that CSS can generate the
characters, per language, and per quote level.]

Yes, as a generic solution your CSS code is fine. But it does not work within "floating text" as created by DokuWiki. And since we are in a DokuWiki mailing list here... ;-)

And there are no special tags in the code where
I want quotations marks *other than those provided by DWs renderer*.

I still don't understand to exactly what situation this applies. Is this a
character replacement function? Are we talking about manually entered quote
characters in the content, that Dokuwiki then replaces with other quote
characters? (In which case I assume the idea is to let people enter minute
and inch signs and have Dokuwiki convert them to quote characters, right?)

If that's what you're talking about, then indeed CSS won't do any good.

Yes, that is what I am talking about. DokuWike replaces " and ' entered in the text with HTML entities. That is not a problem. The problem ist that I want other entities...

Still, IMO it would be better to not have hard-coded quote characters in your
content, but to instead enter proper mark-up, and leave the presentational
aspect to CSS. The reason for this is that user-agents can then apply the
proper quote characters themselves (through their built-in Style Sheet), and
users can override with whatever they consider to be correct quote
characters. After all, not everybody agrees on exactly which quote characters
are 'right' for a given language.

Yes, it would be better to have <q></q> and have CSS do the rest. But I like a wiki where IE users see quotation marks too ;-) So it is /theoretically/ better, but /practically/...

DokuWiki inserts quotation marks into the (X)HTML code - in my mail to
Sander I said where this happens. And I do not want those question marks

I assume that was just a typo, but if you really meant "question marks", I
can't follow what you mean here :)

Caught ;-) - I meant quotation marks. Question was just shorter ;-)


Assuming my above assumptions about what you mean are correct, perhaps
something like this could work

$myhtml = str_replace('&ldquo;', '<q>', $myhtml);
$myhtml = str_replace('&rdquo;', '</q>', $myhtml);

(This, like your version, doesn't take the language into account though.)

And I am not sure if IE supports :before and :after CSS tags. At least, the HTML entities show up...

The tricky bit of course is that you'd need to make sure to only apply this
to inline situations, and not to block level content. I'm not sure how you'd
do that. You'd need to have some other part of Dokuwiki's code for that.
Something that sanitizes entered content.

The replacement works fine. I get the code after it passed through the renderer. The renderer takes care where to use &quot; and &ldquo; :-) Sometimes I get an opening tag when I expect a closing one and vice versa, but this comes from the misunderstanding ;-) by the parser. I have to insert a blank before or after and then it works.

(OTOH, for blockquote Dokuwiki already offers syntax:
<http://wiki.splitbrain.org/wiki:syntax#quoting>. Given that, it might
perhaps be reasonable to assume that minute and inch characters are most
likely inline, and thus <q>. But I I'm just looking for arguments here,
without convincing myself ;))

Up to now (I use the current devel) there are no <q>...</q> tags. Obviously, he is not yet convinced ;-). And since there are a lot people around using IE...

Cheers,
Werner

--
Werner Flamme, Abt. WKDV
Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
Permoserstr. 15 - 04318 Leipzig
Tel.: (0341) 235-3921 - Fax (0341) 235-453921
http://www.ufz.de - eMail: werner.flamme@xxxxxx
--
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: