Hard coded IDs in Comment Module

Starting the new year off with some Lullabot podcast listening while the little one naps. There are lots of blog posts to come from it on various topics. The latest podcast is a live show of a question and answer session from Do it With Drupal.

The first question that kicked off the session was about frustration in theming comments and the comment form in Drupal. As the answers say on the on the podcast this is slightly better in Drupal 6 than it is in Drupal 5. However there's a pretty serious bug that rapidly becomes a deal-stopper when trying to do much with comments. The problem lurks in comment_render(). And following that link you'll notice it's not fixed in Drupal 7 yet either.

Fortunately there is an issue on Drupal.org for working on it. However to date we haven't really solved the problem. On one level the current solution which basically moves the theming function basically makes overriding the theming of comment lists possible but a better way is needed. The problem with the current solution is it's too specific to comments. There are other places where it would be very handy to be able to pass a nested array and have that rendered either in a threaded or flat version for comments as well as any other place a module might want to generate a list items to be displayed in a similar way.

Basically it seems something along the lines of:

comment_render() generates a nested array of comment things to be displayed. This in turn calls theme_threaded() which, with a set of arguments, will out of the box theme a structured array in either a flat or nested display.

Let's figure out what the best way to solve this is and get it fixed in Drupal 7 sooner rather than later.

No votes yet

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Link to Amazon products with: [amazon product_id inline|full|thumbnail]. Example: [amazon 1590597559 thumbnail]
  • You may insert videos with [video:URL]
  • Use [fn]...[/fn] (or <fn>...</fn>) to insert automatically numbered footnotes.
  • Allowed HTML tags: <a> <b> <dd> <dl> <dt> <i> <li> <ol> <u> <ul><p> <img> <table> <tr> <td><strong><em><sup><div><fn><h1><h2><h3><h4><blockquote><img style="">
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically. (Better URL filter.)
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can enable syntax highlighting of source code with the following tags: . Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Twitter-style @usersnames are linked to their Twitter account pages.
  • Twitter-style #hashtags are linked to search.twitter.com.

More information about formatting options