[DesDev] Re: [Content] Code Guide FAQ
Martin Burns
martin at easyweb.co.uk
Fri Sep 2 16:17:29 CDT 2005
On 1 Sep 2005, at 17:10, aardvark wrote:
> On 1 Sep 2005 at 16:00, Martin Burns wrote:
>
>
>> I've updated the code guide, specifically to address:
>>
>> 1. new site is xHTML Trans, not HTML 4.01
>>
>
> in retrospect, we should link to the spec... i still don't know how
> to edit an article, nor do i think i have the privs... i sent a note
> about this, but i believe it got eaten...
You should always be able to edit your own article, and I fixed that
you didn't have content admin rights.
>> 2. Code block handling is different on the new site, which also
>> affects the code
>> samples in the guide...
>>
>
> looking at this, i think the <code> style should match the <pre> in
> typeface styling... for example, color...
possibly, although the way we're going is towards automatic syntax
colouring in code. Already there for PHP from a drupal module, and
there's a different module using the same theory to auto-colour
pretty much all languages:
http://islands.easyweb.co.uk/~martin/drupal/?q=testing-vimcolo-u-r
> also, i spell color without the 'u,' although i do use other british-
> isms in my spelling...
Oops my bad.
>> 3. I also removed <i> <b> and <hr> from the list of acceptable
>> tags which shouldn't
>> really have been in there in the 1st place
>>
>
> they were allowed but we stated what was preferred... but do edit for
> new standards....
OK. Historically, we've *always* removed them (ok, perhaps not <hr>)
from articles.
>> At some point, i'd like to add some info on how the content
>> filters work, but
>> I have to go drive home for 4 hours rn.
>>
>
> yeah, i'd be curious to read that...
OK, there are currently 4 different filters.
1) Filtered HTML.
Auto-adds <p></p> for double line breaks and <br /> for single ones.
Allows a subset of HTML tags currently set to:
<p> <a> <img> <em> <strong> <caption> <cite> <blockquote> <q> <code>
<pre> <abbr> <acronym> <thead> <tbody> <tfoot> <tr> <th> <td> <table>
<ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <h4> <h5> <h6>
All other tags are stripped.
Javascript event attributes are *always* stripped
HTML style attributes are stripped
2) Evolt permitted HTML
Allows a subset of HTML tags, set to:
<p> <a> <img> <em> <strong> <caption> <cite> <blockquote> <q><br>
<code> <pre> <abbr> <acronym> <thead> <tbody> <tfoot> <tr> <th> <td>
<table> <ul> <ol> <li> <dl> <dt> <dd> <h2> <h3> <h4> <h5> <h6>
All other tags are stripped.
Javascript event attributes are *always* stripped
HTML style attributes are not stripped (but arguably should be)
PHP code samples enclosed in <?php ?> and *not* <code></code> or
<pre></pre> will be nicely colour coded (although irritatingly, using
<font color="#0099cc"></font> type tags - the other module version
uses semantically neutral <span class="xyz"></span>). <code></code>
enclosed content goes through the codefilter module (that also
provides the colour coding for PHP) and escapes entities.
<pre></pre> enclosed content doesn't
<code></code> separated as a block is displayed as a block, whereas
inline within text doesn't.
3) Full HTML
Only available to content admins & godmins
HTML tags are not stripped
Javascript event attributes are *always* stripped (except for godmins
iirc)
HTML style attributes are not stripped
Code content treated as above.
4) PHP Code
Only available to godmins
HTML tags are not stripped
Javascript event attributes are not stripped
HTML style attributes are not stripped
Code posted as <code></code> and <pre></pre> is treated as above
PHP code posted as <?php ?> is *executed*
Note these are rendering transforms to the content in the db - the
content itself isn't changed.
>> Anyway, see the result at
>> http://evolt.org/guide_code
>>
>
> other stuff...
>
> - how do i get to the SE friendly version of the URL?
You mean as above (which is what it was on the old site)?
It's linked that way from the FAQ category:
http://evolt.org/faq
> - an oversight in the last system, all pages, regardless of what URL
> is used to get there, should issue a 301/2 redirect to the final
> URL... this way a page won't split its pagerank in the SEs with
> alternate addresses of itself...
>
> - i don't care for the <h#> syles... the h3/h4 look the same other
> than color (a big no-no, and an odd departure), the h5 appears
> bigger, and the h6 seems smaller than the copy... i have some
> alternate style ideas, but i really have to run out to a meeting...
>
> - which list should i really be sending this to now? desdev? content?
> devnull?
desdev if you want it discussing, but you could stick it on the
issues tracker:
http://evolt.org/issues
so it doesn't get forgotten (which we're historically *very* good at)
Cheers
Martin
More information about the DesDev
mailing list