Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

+49 -4
View File
@@ -3,7 +3,7 @@
* @brief Chat Application Class
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2014 Invision Power Services, Inc.
* @package IPS Social Suite
* @package IPS Community Suite
* @subpackage Chat
* @since 03 Jan 2014
* @version
@@ -56,7 +56,7 @@ class _Application extends \IPS\Application
if( count( $times ) AND $times[0] )
{
/* Do we need to adjust the time zone? */
if( isset( $times[2] ) AND $times[2] != \IPS\Member::loggedIn()->timezone )
if( isset( $times[2] ) AND $times[2] AND \IPS\Member::loggedIn()->timezone AND $times[2] != \IPS\Member::loggedIn()->timezone )
{
$start = new \IPS\DateTime( '2015-01-01 ' . $times[0], new \DateTimeZone( $times[2] ) );
$start->setTimezone( new \DateTimeZone( \IPS\Member::loggedIn()->timezone ) );
@@ -67,8 +67,20 @@ class _Application extends \IPS\Application
$times[1] = $end->format( 'H:i' );
}
$currentTime = new \IPS\DateTime( NULL, new \DateTimeZone( ( isset( $times[2] ) ) ? $times[2] : \IPS\Member::loggedIn()->timezone ) );
$currentTime->setTimezone( new \DateTimeZone( \IPS\Member::loggedIn()->timezone ) );
if( ( isset( $times[2] ) AND $times[2] ) OR \IPS\Member::loggedIn()->timezone )
{
$currentTime = new \IPS\DateTime( NULL, new \DateTimeZone( ( isset( $times[2] ) AND $times[2] ) ? $times[2] : \IPS\Member::loggedIn()->timezone ) );
}
else
{
$currentTime = new \IPS\DateTime;
}
if( \IPS\Member::loggedIn()->timezone )
{
$currentTime->setTimezone( new \DateTimeZone( \IPS\Member::loggedIn()->timezone ) );
}
$currentTime = $currentTime->format( 'H:i' );
/* Convert times to floats, as that is simple to compare */
@@ -93,4 +105,37 @@ class _Application extends \IPS\Application
}
}
}
/**
* Default front navigation
*
* @code
// Each item...
array(
'key' => 'Example', // The extension key
'app' => 'core', // [Optional] The extension application. If ommitted, uses this application
'config' => array(...), // [Optional] The configuration for the menu item
'title' => 'SomeLangKey', // [Optional] If provided, the value of this language key will be copied to menu_item_X
'children' => array(...), // [Optional] Array of child menu items for this item. Each has the same format.
)
return array(
'rootTabs' => array(), // These go in the top row
'browseTabs' => array(), // These go under the Browse tab on a new install or when restoring the default configuraiton; or in the top row if installing the app later (when the Browse tab may not exist)
'browseTabsEnd' => array(), // These go under the Browse tab after all other items on a new install or when restoring the default configuraiton; or in the top row if installing the app later (when the Browse tab may not exist)
'activityTabs' => array(), // These go under the Activity tab on a new install or when restoring the default configuraiton; or in the top row if installing the app later (when the Activity tab may not exist)
)
* @endcode
* @return array
*/
public function defaultFrontNavigation()
{
return array(
'rootTabs' => array(),
'browseTabs' => array( array( 'key' => 'Chat' ) ),
'browseTabsEnd' => array(),
'activityTabs' => array()
);
}
}