1

Topic: Double-click to Quote

This is a quick and dirty hack that I added to my PunBB forum and my users enjoy, so I thought I'd share it with the community. This really needs clean-up!

With this modification, users can double-click on another users post; when they do, they will be taken to the reply form with the selected post quoted. This makes replying to threads faster because you can just double click anywhere in the text of a post as opposed to clicking the tiny "Quote" link.

To try this out, open viewtopic.php and change this line (line 352 for me):

<div class="postright">

To this:

<div class="postright"<?php echo ' ondblclick="document.location=\'post.php?tid='.$id.'&qid='.$cur_post['id'].'\'"'; ?>>

Now, just double-click in the text of any post and you'll start a reply. Things you are welcome to add include making this an option that users can select to use from their profile, blocking guests from using it, and blocking it on threads that are closed or the user does not have permission to reply to. Also, expanding the double-click area to be the entire right side box for a post would be helpful.

Enjoy!

Saab92x.com
Over 2300 users and 265,000 posts, running PunBB for 3 years