Tag Archives: comments
Keyboard shortcuts in Drupal: Navigating through comments
It was one of the best features of Google Reader and Google GMail: the keyboard shortcuts, specially the ones to navigate through messages or posts (n = next, p = previous). I decided it was time to implement it on spaniards.es, so here is the code I used. So far it only navigates through comments [...]
Ajax comments in Drupal 5: How I made it – Part III
In Ajax comments in Drupal 5: How I made it parts I and II we saw the code needed on the back-end. Now, let’s see what goes on the client side: the Javascript. Submitting the comment with an ajax request Basically, to add a comment we need the node id (nid) and the comment text. [...]
Ajax comments in Drupal 5: How I made it – Part II
In Axaj comments in Drupal 5: How I made it – Part I I covered the most important part of the module code: saving comments to the database. Now, let’s see how to display them properly. Rendering the new comment Comments usually have more information than the user name and the comment text. In my [...]
Ajax comments in Drupal 5: How I made it – Part I
First of all, I would like to apologize for not publishing this the right way. I haven’t had time to put it all on a standalone module, which will make it easier to share the code at www.drupal.org. Feel free to grab the code and put it on a module if you wish (and let [...]
vancode2int
vancode2int is a very simple but nice function I was looking for for a while and I had no idea Drupal included. It basically decodes the thread id of a comment in Drupal converting it back to an integer, which is very useful when displaying comments on a plain list, instead of on a threaded [...]