Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -3,7 +3,7 @@
|
||||
* @brief Gallery 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 Gallery
|
||||
* @since 04 Mar 2014
|
||||
* @version
|
||||
@@ -45,4 +45,68 @@ class _Application extends \IPS\Application
|
||||
{
|
||||
return 'camera';
|
||||
}
|
||||
|
||||
/**
|
||||
* 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' => 'Gallery' ) ),
|
||||
'browseTabsEnd' => array(),
|
||||
'activityTabs' => array()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform some legacy URL parameter conversions
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function convertLegacyParameters()
|
||||
{
|
||||
/* convert ?module=images§ion=img_ctrl&img=100&file=medium */
|
||||
/* convert ?module=images§ion=img_ctrl&id=100&file=medium */
|
||||
if( isset( \IPS\Request::i()->section ) AND \IPS\Request::i()->section == 'img_ctrl' )
|
||||
{
|
||||
$id = ( isset( \IPS\Request::i()->img ) ) ? \IPS\Request::i()->img : \IPS\Request::i()->id;
|
||||
|
||||
if( $id )
|
||||
{
|
||||
if( \IPS\Request::i()->file == 'med' )
|
||||
{
|
||||
\IPS\Request::i()->file = 'medium';
|
||||
}
|
||||
|
||||
$imageSize = ( \IPS\Request::i()->file ?: 'medium' ) . '_file_name';
|
||||
|
||||
try
|
||||
{
|
||||
\IPS\Output::i()->redirect( (string) \IPS\File::get( 'gallery_Images', \IPS\gallery\Image::load( $id )->$imageSize )->url );
|
||||
}
|
||||
catch ( \Exception $e ){}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user