flag of the United Kingdom
URBAN
Mainframe

User Comments

(for: Extending User Comments)
1 | Posted by: Mike P. (Guest) | ~ 1 year, 11 months ago |

Simon’s class is really quite good. Making it work along with what you have already, that is, allowing a ‘pro’ mode and a… ‘standard’ mode would be very cool.

With respect to markup, I’ve been playing witht using some javascript to insert tags where needed. Alex King has a snippet of code here that does what I’d like, however it works with names, not id’s, and I’m not quite sure how I’d get it working when we deliver application/xhtml+xml.

Can’t say that I have thought about it much, but someone ‘here’ is supposed to be looking into it…

(Hmm, previewing of comments would be nice, even if you can edit them…)

2 | Posted by: Mike P. (Guest) | ~ 1 year, 11 months ago |

Here:

http://tinyurl.com/3aatv

Hmm, I guess I could have edited the previous entry rather then add a new one…

3 | Posted by: DarkBlue (Registered User) | ~ 1 year, 11 months ago |

Mike P.: I took the liberty of editing your comment (#2) since it was the victim of a bug in the “diffs” code that kicks in after a comment has been edited.

Namely that URL hyperlinks become “escaped” resulting in the less-than and greater-than characters being displayed rather than acting as containers for HTML (another reason why the parser needs to allow mark-up).

I’ve had a look at Alex King’s code samples but, while they are impressive, I don’t think I’ll use them. I would prefer to have all the parsing in the handler (so that parsing would be performed during page generation) rather than in the page (where parsing would be performed during rendering). I am always aware that many users turn JavaScript off, which would obviously “break” the system.

Thanks for pointer though.

4 | Posted by: Mike P. (Guest) | ~ 1 year, 11 months ago |

hmm. Just finished making the first coffee, and can see that I wasn’t very clear…

I meant developing some JS buttons that the user can use to insert markup into the textarea to ease the making of a ‘pro’ comment.

One thing I have seen is the odd person complaining that having to markup comments can be a bit.. heavy, I suppose. That would be why a system like yours would be quite good, having the best of both worlds…

5 | Posted by: DarkBlue (Registered User) | ~ 1 year, 11 months ago |

Are you advocating a switchable WYSIWYG editor Mike?

I guess I could this. By default a WYSIWYG editor, but a button allows the more advanced user to switch to a plain textarea.

If I did this, I’d make it so that your preference would be remembered too.

Or have I misunderstood?

6 | Posted by: Mike P. (Guest) | ~ 1 year, 11 months ago |

Hey, late reply butt…

I meant having a simple javascript button thingy as more of a courtesy. People could hand code, hit a button for tags, or simple simply not enter any markup whatsoever…

(what’s up with all of this coach/trainer insanity in the footy world?)

NOTE: This comment has been edited by its author! Additions are shown in italics, deletions with a strike-through.

7 | Posted by: DarkBlue (Registered User) | ~ 1 year, 11 months ago |

I see. Well I’ll see what I can do when I start writing the module.

Don’t get me started on football Mike. My team (Leeds United) has just been relegated and might not even exist for much longer!

England is about to get crushed (again) in Euro 2004.

I think “insanity” is a great word to describe the sport’s current shenanigans.

Who’s your team Mike (totally non-hostile question)?

8 | Posted by: DarkBlue (Registered User) | ~ 1 year, 11 months ago |

I might not need to write any code at all for this…

I have just discovered a wonderfully elegant and simple system, called Markdown, which was developed my John Gruber over at Daring Fireball.

Markdown uses a syntax similar to that which some will recognise from email and Usenet usage.

The parser is written in Perl and is released under the GPL.

Please take a look at: http://daringfireball.net/projects/markdown/ and let me know if you think this is suitable.

9 | Posted by: DarkBlue (Registered User) | ~ 1 year, 11 months ago |

The not-quite-totally-out-of-context comment…

Itrntinliztin

(see: http://tinyurl.com/259ed and all will be made clear - well, clearer).

10 | Posted by: DarkBlue (Registered User) | ~ 1 year, 11 months ago |

これは日本語のテキス… トです。読めますか

देखें हिन्दी कैसी नजर आती है। अरे वाह ये तो नजर आती है।

Testing to see if my Unicode support is complete…

11 | Posted by: Mike P. (Guest) | ~ 1 year, 11 months ago |

Looks good, but the e-mail made me want to check the page!

12 | Posted by: DarkBlue (Registered User) | ~ 1 year, 11 months ago |

That’s part of the new comment module working anyway! :-)

13 | Posted by: DarkBlue (Registered User) | ~ 1 year, 11 months ago |

“previewing of comments would be nice, even if you can edit them…”

I agree, especially if I introduce Markdown. It would be beneficial to be able to preview if you’ve gone to the trouble of adding formatting.

14 | Posted by: DarkBlue (Registered User) | ~ 1 year, 11 months ago |

IMPORTANT:

I have been playing with John Gruber’s Markdown to see if it is worth introducing here and I am completely sold on it. It is easy use, the syntax is straightforward (after a slight learning curve) and the results are styled comments in valid XHTML.

There’s an awful lot of flexibility in there too. It’s really rather neat.

I have decided to use it here!

I recommend you head on over to http://daringfireball.net/projects/markdown/dingus where you can try it out.

Please test it. If you don’t like it, LET ME KNOW - because I’d like to deploy it as soon as possible.

Thank you.

15 | Posted by: DarkBlue (Registered User) | ~ 1 year, 11 months ago |

Testing comment markup with an adaptation of John Gruber’s Markdown.

Markdown is a plug-in for Movable Type, amongst others.

The logo for Movable Type should be displayed below:

Movable Type logo

Along with the embedded hyperlink and the oh-so-cool image link facilities, Markdown provides plenty of other tags for comment enhancement.

Let’s Try a Few…

Bulleted Lists:

  • This is a list item
  • So is this
  • this is a list item with an embedded link
  • and so on…

Numbered Lists Too:

  1. Foo
  2. Bar

Quoting is easy - especially if you’re familiar with email

You can even post code snippets now:

<Macro vhost $host>
    <VirtualHost $host:80>
        DocumentRoot /path-to-apache/vhosts/$host/docs
        ScriptAlias /cgi-bin/ /path-to-apache/vhosts/$host/cgi-bin/
        CustomLog logs/$host:80.log combined
        ErrorLog logs/$host:80.err
        Use any_other_macros_you_have
    </VirtualHost>
</Macro>

All in all, Markdown is a very cool plug-in…

16 | Posted by: DarkBlue (Registered User) | ~ 1 year, 11 months ago |

The comments handler has now been extended to address the issues discussed here.

Your Comments
  • Formatting your comments
  • A valid email address is only required if you wish to receive notifications of new comments posted in relation to this page


remember my details:
notify me of new comments:


W3C VALIDATE XHTML
W3C VALIDATE CSS