We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Event day and times don't show up | Forum

Wisdom Alchemy
Wisdom Alchemy Jan 29 '14
I'm taking oxwall 1.6 on a test drive for a planned future social network site. The primary function of the site will revolve around event dates and times. The current release shows month only in the details section, nothing else, no day or times. Just wondering if this been an issue in previous versions?
Attachments:
  oxwall_event_3.jpg (3.89Kb)
ross Team
ross Jan 30 '14
Can you please uninstall plugin and reinstall it back: 

http://www.oxwall.org/store/item/44 ? As we can't reproduce this issue on 1.6 on our test websites as well as on demo. 

Wisdom Alchemy
Wisdom Alchemy Jan 30 '14
I tried as you suggested, ended up with the same results. Then I tried to reinstall from scratch, still same results. All testing was on a XAMPP localhost server.

After installing on a live server everything works as it should. I like to test and tweak on locally before going live, obviously theres something not translating locally. Thanks so much for your help!
ross Team
ross Jan 30 '14
Can you please, enable debug mode on your local server and copy the errors (if you get ones) here?
The Forum post is edited by ross Jan 30 '14
Wisdom Alchemy
Wisdom Alchemy Jan 31 '14
This is from the server php error log.

[30-Jan-2014 18:34:38 Europe/Berlin] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\oxwall\ow_core\database.php on line 332

[31-Jan-2014 19:14:50 Europe/Berlin] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\oxwall\ow_plugins\watchdog\bol\watchdog_service.php on line 147
ross Team
ross Feb 3 '14
you need to increase maximum execution time in php.ini - max_execution_time increase it to 60. 

Also, can you please disable watchdog plugin and try plugin events again, whether the issue persist. 

Matt
Matt Mar 4 '14
Lol, no one got a fix for this stupid bug? I dont have watchdog installed.


Edit:

Okay, I just fixed it. Had to rewrite a few lines in formatSimpleDate() to be cross platform compatible.


1 ) Go to root/ow_utilities/date_time.php and search for "function formatSimpleDate".

2 ) In this function, you need to make the changes specified below.

3 ) ??????????

4 ) Profit!


Works on Windows as well as Linux.


Replace:


if ( $onlyDate )

{

    return ( date('y', $timeStamp) === date('y', time()) ) ?

        $month . strftime(" %e", $timeStamp) :

        $month . strftime(" %e '%y", $timeStamp);

}


return ( date('y', $timeStamp) === date('y', time()) ) ?

    $month . ( $militaryTime ? strftime(" %e, %H:%M", $timeStamp) : strftime(" %e, %I:%M%p", $timeStamp) ) :

    $month . ( $militaryTime ? strftime(" %e '%y, %H:%M", $timeStamp) : strftime(" %e '%y, %I:%M%p", $timeStamp) );


With:


if ( $onlyDate ) {

    $sDateTimeFormat = ( date('y', $timeStamp) === date('y', time()) ) ? " %e" : " %e '%y";


    if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {

        $sDateTimeFormat = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $sDateTimeFormat);

    }


    return $month . strftime($sDateTimeFormat, $timeStamp);

}


$sDateTimeFormat = ( date('y', $timeStamp) === date('y', time()) ) ?

    ( $militaryTime ? " %e, %H:%M" : " %e, %I:%M%p" ) :

    ( $militaryTime ? " %e '%y, %H:%M" : " %e '%y, %I:%M%p" );


if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {

    $sDateTimeFormat = preg_replace('#(?<!%)((?:%%)*)%e#', '\1%#d', $sDateTimeFormat);

}


return $month . strftime($sDateTimeFormat, $timeStamp);

The Forum post is edited by Matt Mar 4 '14