[whups] Timestamps in comments

Jason Dixon jason at dixongroup.net
Thu Nov 3 19:02:51 PST 2005


Looking at the history of templates/comment.inc, it appears that  
comments should honor the date_format preference.  However, at least  
with whups-1.0cvs, it isn't working for me.  I looked through config/ 
prefs.php.dist and didn't see anything for date_format, only  
report_time_format.  Is the pref missing, or is the pref name  
incorrect in comment.inc?  Here's a patch to allow report_time_format  
affect both the search and history views.  Sorry, pulled from  
comment.inc 1.71.

--- templates/comment.inc  Thu Nov  3 21:58:55 2005
+++ templates/comment.inc       Thu Nov  3 21:59:08 2005
@@ -127,7 +127,7 @@
<table cellspacing="0" width="100%">
   <tr><td style="font-size:4px;">&nbsp;</td></tr>
   <tr>
-  <td width="20%" class="<?php echo $class ?>_l" nowrap="nowrap"  
valign="top"><?php echo strftime($prefs->getValue('date_format'),  
$vars->get('timestamp')) ?></td>
+  <td width="20%" class="<?php echo $class ?>_l" nowrap="nowrap"  
valign="top"><?php echo strftime($prefs->getValue 
('report_time_format'), $vars->get('timestamp')) ?></td>
    <td width="20%" class="<?php echo $class ?>_m" valign="top"><?php  
echo $vars->get('user_id') ? Whups::formatUser($vars->get('user_id'),  
false, true, true) : '&nbsp;' ?></td>
    <td width="30%" class="<?php echo $class ?>_m" valign="top"><?php  
echo implode('<br />', $changes) ?></td>
    <td width="30%" class="<?php echo $class ?>_r rightAlign"  
valign="top"><?php echo implode('<br />', $links) ?></td>


--
Jason Dixon
DixonGroup Consulting
http://www.dixongroup.net





More information about the whups mailing list