How to change the date format in Wiwimod?

Requested and Answered by Jfmoore on 2007/2/27 22:13:02

How to change the date format in Wiwimod?

First of all, I'm not a php guy, so, with that in mind: Using seRapid Search & Replace, there are apparently 8, maybe 9, lines in 5 files which need changing. Here is the search output. I searched for the string 'date("'.The line numbers refer to the byte position in the file:

---------------------------
 
Index.php  -  13.708 bytes  -  Fri24.06.05 at 15:45  -  Wiwimod
12.040    
'lastmodified' => date("d.m.y"strtotime($pageObj->lastmodified)),
---------------------------
 
Wiwipdf.php  -  4.427 bytes  -  Fri08.04.05 at 11:05  -  Wiwimod
1.690    
'lastmodified' => date("d.m.y"strtotime($pageObj->lastmodified)),
---------------------------
 
listpages.php  -  6.124 bytes  -  Mon16.05.05 at 22:05  -  WiwimodAdmin
5.278    
<td>'.date("d.m.y", @strtotime($pageArr[$i]->lastmodified)).'</td>
---------------------------
 
wiwimod_recent.php  -  1.443 bytes  -  Tue07.06.05 at 22:30  -  WiwimodBlocks
1.035    $link
['lastmodified'] = date("d.m.y"strtotime($content["lastmodified"]));
---------------------------
 
wiwimod_showpage.php  -  3.501 bytes  -  Tue10.05.05 at 22:41  -  WiwimodBlocks
1.700    $block
['lastmodified'] = date("d.m.y"strtotime($pageObj->lastmodified));
2.835    $block['lastmodified'] = date("d.m.y"strtotime($pageObj->lastmodified));
---------------------------
 
wiwiRevision.class.php  -  24.872 bytes  -  Tue07.06.05 at 18:47  -  WiwimodClass
3.811    date
("Y-m-d H:i:s"),        //-- lastmodified is Now
4.834    date("Y-m-d H:i:s"),
13.360    '"<tr><td colspan=3><strong>".date("d.m.y", strtotime($counter))."</strong></td></tr>"',
13.442    '"<tr><td>&nbsp;".date("H:i",strtotime($content["lastmodified"]))."</td><td><A href="index.php?page=".$this->encode($content["keyword"])."">".($content["title"] == "" ? $content["keyword"] : $content["title"])."</a></td><td><span
22.393    $sql = "SELECT keyword, MAX(id) AS id FROM ".$xoopsDB->prefix("wiwimod")." WHERE lastmodified<'".date("
Y-m-d H:i:s", time() - 61 * 24 * 3600)."' GROUP BY keyword";
As to what to change these to, that depends upon how you want the dates displayed. Here's a page that talks about PHP date formats: http://us2.php.net/date Probably the only one I would hesitate to change is the last one preceded by "$sql", and it may be ok to change it. Perhaps someone else who knows better will say. Good luck!

This Q&A was found on XOOPS Web Application System : https://xoops.org/modules/smartfaq/faq.php?faqid=668