[drupal-devel] unlimited comments displayed on drupal.org is a hack?

Morbus Iff morbus at disobey.com
Thu Jan 27 12:49:35 UTC 2005


> Is this some hack in the drupal.org code, or have I seriously missed 
> some setting? It would probably be diserably to provide such a setting 
> on the comment control panel wouldn't it?

It's a hack. I've done something similar by offering a display option 
for "999 comments" over at Gamegrene.com. In my phptemplate, I use:

// changes/shortens the names of the available options, but
// also adds a '999' option to the number of available comments.
// this allows people to see all comments on one page, no flips.
function phptemplate_comment_per_page_form($comments_per_page) { 
$options = '';
   $comment_per_page = _comment_per_page(); $comment_per_page[] = '999';
   foreach ($comment_per_page as $i) { $options .= " <option 
value=\"$i\"". ($comments_per_page == $i ? ' selected="selected"' : '') 
.'>'. t('%a comments/page', array('%a' => $i)) .'</option>'; }
   return "<select name=\"comments_per_page\">$options</select>\n";
}


-- 
Morbus Iff ( be realistic. demand the impossible. )
Technical: http://www.oreillynet.com/pub/au/779
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus



More information about the drupal-devel mailing list