1
Anonymous
wiwimod 0.8.3 - changing date format
  • 2007/1/8 18:23

  • Anonymous

  • Posts: 0

  • Since:


Okay - I give up

Where is the date format set? I can't find the code anywhere in the files.

Dates are coded as dd.mm.yy and I want dd/mm/yyyy like the rest of my site. I know what code to use - I just can't see where to change it.

Can anyone help, please?

2
jfmoore
Re: wiwimod 0.8.3
  • 2007/2/27 22:02

  • jfmoore

  • Quite a regular

  • Posts: 360

  • Since: 2004/6/6 5


First of all, I'm not a php guy, so don't blame me if you mess up your site.

Now, using seRapid Search & Replace, there are apparently 8, maybe 9, lines in 5 files which need changing. Here is the search output. 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    '"".date("d.m.y", strtotime($counter)).""',
13.442    '" ".date("H:i",strtotime($content["lastmodified"]))."encode($content["keyword"])."">".($content["title"] == "" ? $content["keyword"] : $content["title"])."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";


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!
...

3
Anonymous
Re: wiwimod 0.8.3
  • 2007/10/18 19:58

  • Anonymous

  • Posts: 0

  • Since:


Just going for the "Lazarus Award for Resurected Threads" for this month

Just got two things to say:

1. "Thanks jfmoore" - seriously, you saved me a lot of searching
2. "Eek!"

jfmoore was correct about the files and places to amend the date format. Having just FUBARed my wiwimod tables in the db I should like to amend the advice above to the following:

---------------------------
 
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    
[color=FF0000]date("Y-m-d H:i:s")[/color],  //-- lastmodified is Now
4.834    [color=FF0000]date("Y-m-d H:i:s")[/color],
13.360    '"".date("d.m.y", strtotime($counter)).""',
13.442    '" ".date("H:i",strtotime($content["lastmodified"]))."encode($content["keyword"])."">".($content["title"] == "" ? $content["keyword"] : $content["title"])."22.393    $sql = "SELECT keyword, MAX(id) AS id FROM ".$xoopsDB->prefix("wiwimod")." WHERE lastmodified<'".[color=FF0000]date("Y-m-d H:i:s"[/color], time() - 61 * 24 * 3600)."' GROUP BY keyword";


Do not under any circumstances alter the three instances of code written in red type as this will alter the way that the "last update date" is written to the database. Trust me, you do not want to see what happens if you do

It's okay to change all of the others, though

TFF backups

Login

Who's Online

429 user(s) are online (110 user(s) are browsing Support Forums)


Members: 0


Guests: 429


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits