Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
7 - 6 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: Newbb date problems (after upgrade to xoops 2.3)
by ghia on 2009/4/11 8:50:23

Huh, very drastic!
It may work for you, but it is not a general solution!
Re: Newbb date problems (after upgrade to xoops 2.3)
by Heromorph on 2009/4/5 17:33:16

OK I figured it out.

It was again with newbb/include/functions.php
I edited
From this:
le="color: #000000"><?php function newbb_formatTimestamp($time, $format="c", $timeoffset="")


To this
le="color: #000000"><?php function newbb_formatTimestamp($time, $format="j M Y H:i:s a", $timeoffset="-8")

Re: Newbb date problems (after upgrade to xoops 2.3)
by ghia on 2009/4/5 17:30:54

Quote:
The definitive solutions for date/time formatting in CBB/newbb with XOOPS 2.3.x are given in this thread:
https://xoops.org/modules/newbb/vi ... =&topic_id=66922&forum=28

That is true for the unpatched version.
With the patch that reactivates some unreachable code, the date formats are in /modules/newbb/language/english/main.php
le="color: #000000"><?php function newbb_formatTimestamp($time, $format = "c", $timeoffset = "") { /* if(strtolower($format) == "reg" || strtolower($format) == "") { $format = "c"; } if( (strtolower($format) == "custom" || strtolower($format) == "c") && !empty($GLOBALS["xoopsModuleConfig"]["formatTimestamp_custom"]) ) { $format = $GLOBALS["xoopsModuleConfig"]["formatTimestamp_custom"]; } load_functions("locale"); return XoopsLocal::formatTimestamp($time, $format, $timeoffset); if(class_exists("XoopsLocal") && is_callable(array("XoopsLocal", "formatTimestamp")) && defined("_TODAY")){ return XoopsLocal::formatTimestamp($time, $format, $timeoffset); } */ global $xoopsConfig, $xoopsUser; if(strtolower($format) == "rss" || strtolower($format) == "r"){ $TIME_ZONE = ""; if(!empty($GLOBALS['xoopsConfig']['server_TZ'])){ $server_TZ = abs(intval($GLOBALS['xoopsConfig']['server_TZ']*3600.0)); $prefix = ($GLOBALS['xoopsConfig']['server_TZ']<0)?" -":" +"; $TIME_ZONE = $prefix.date("Hi",$server_TZ); } $date = gmdate("D, d M Y H:i:s", intval($time)).$TIME_ZONE; return $date; } $usertimestamp = xoops_getUserTimestamp($time, $timeoffset); switch (strtolower($format)) { case 's': $datestring = _SHORTDATESTRING; break; case 'm': $datestring = _MEDIUMDATESTRING; break; case 'mysql': $datestring = "Y-m-d H:i:s"; break; case 'rss': $datestring = "r"; break; case 'l': $datestring = _DATESTRING; break; case 'c': case 'custom': default: newbb_load_lang_file("main", "newbb"); $current_timestamp = xoops_getUserTimestamp(time(), $timeoffset); if(date("Ymd", $usertimestamp) == date("Ymd", $current_timestamp)){ $datestring = _MD_TODAY; }elseif(date("Ymd", $usertimestamp+24*60*60) == date("Ymd", $current_timestamp)){ $datestring = _MD_YESTERDAY; }elseif(date("Y", $usertimestamp) == date("Y", $current_timestamp)){ $datestring = _MD_MONTHDAY; }else{ $datestring = _MD_YEARMONTHDAY; } break; } return date($datestring, $usertimestamp); }

Quote:
I altered the functions php as above

Meaning only the change of the second argument or also the rest of the function as here above?
Re: Newbb date problems (after upgrade to xoops 2.3)
by Heromorph on 2009/4/5 17:09:57

I tried the things mentioned above and at the link but it is still broken. Could very well be the fact that the site is running XOOPS 2.0.17. Thank you
Re: Newbb date problems (after upgrade to xoops 2.3)
by Anonymous on 2009/4/5 16:22:56

The definitive solutions for date/time formatting in CBB/newbb with XOOPS 2.3.x are given in this thread:
https://xoops.org/modules/newbb/viewtopic.php?viewmode=flat&type=&topic_id=66922&forum=28

HTH

Who's Online

134 user(s) are online (102 user(s) are browsing Support Forums)


Members: 0


Guests: 134


more...

Donat-O-Meter

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

Latest GitHub Commits