Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
@@ -23,11 +23,25 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
* @brief Content Router extension: Gallery
|
||||
*/
|
||||
class _Gallery
|
||||
{
|
||||
{
|
||||
/**
|
||||
* @brief Content Item Classes
|
||||
*/
|
||||
public $classes = array( 'IPS\gallery\Image' );
|
||||
public $classes = array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \IPS\Member|NULL $member If checking access, the member to check for, or NULL to not check access
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( \IPS\Member $member = NULL )
|
||||
{
|
||||
if ( $member === NULL or $member->canAccessModule( \IPS\Application\Module::get( 'gallery', 'gallery', 'front' ) ) )
|
||||
{
|
||||
$this->classes[] = 'IPS\gallery\Image';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Owned Node Classes
|
||||
|
||||
@@ -36,8 +36,7 @@ class _gallery
|
||||
return array(
|
||||
'gallery_image' => array(
|
||||
'link' => \IPS\Http\Url::internal( "app=gallery&module=gallery&controller=submit&_new=1", 'front', 'gallery_submit' ),
|
||||
'extraData' => array( 'data-ipsDialog-size' => "narrow", 'data-ipsDialog' => true ),
|
||||
'title' => 'select_category'
|
||||
'extraData' => array( 'data-ipsDialog-size' => "fullscreen", 'data-ipsDialog' => true )
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,14 @@ class _Images
|
||||
{
|
||||
if ( $id2 )
|
||||
{
|
||||
return \IPS\gallery\Image\Comment::load( $id2 );
|
||||
if ( $id3 === 'review' )
|
||||
{
|
||||
return \IPS\gallery\Image\Review::load( $id2 );
|
||||
}
|
||||
else
|
||||
{
|
||||
return \IPS\gallery\Image\Comment::load( $id2 );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -22,8 +22,18 @@ if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
/**
|
||||
* Front Navigation Extension: Gallery
|
||||
*/
|
||||
class _Gallery
|
||||
class _Gallery extends \IPS\core\FrontNavigation\FrontNavigationAbstract
|
||||
{
|
||||
/**
|
||||
* Get Type Title which will display in the AdminCP Menu Manager
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function typeTitle()
|
||||
{
|
||||
return \IPS\Member::loggedIn()->language()->addToStack('frontnavigation_gallery');
|
||||
}
|
||||
|
||||
/**
|
||||
* Can access?
|
||||
*
|
||||
@@ -31,7 +41,7 @@ class _Gallery
|
||||
*/
|
||||
public function canView()
|
||||
{
|
||||
return !\IPS\Application::load('gallery')->hide_tab and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'gallery', 'gallery' ) );
|
||||
return parent::canView() and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'gallery', 'gallery' ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -63,14 +73,4 @@ class _Gallery
|
||||
{
|
||||
return \IPS\Dispatcher::i()->application->directory === 'gallery';
|
||||
}
|
||||
|
||||
/**
|
||||
* Children
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function children()
|
||||
{
|
||||
return array();
|
||||
}
|
||||
}
|
||||
@@ -27,19 +27,22 @@ class _Gallery
|
||||
/**
|
||||
* Process Form
|
||||
*
|
||||
* @param \IPS\Form\Tabbed $form The form
|
||||
* @param \IPS\Helpers\Form $form The form
|
||||
* @param \IPS\Member\Group $group Existing Group
|
||||
* @return void
|
||||
*/
|
||||
public function process( &$form, $group )
|
||||
{
|
||||
$form->addHeader( 'gallery_album_permissions' );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'g_create_albums', $group->g_create_albums, FALSE, array( 'togglesOn' => array( 'g_create_albums_private', 'g_create_albums_fo', 'g_delete_own_albums', 'g_album_limit', 'g_img_album_limit' ) ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'g_create_albums_private', $group->g_create_albums_private, FALSE, array(), NULL, NULL, NULL, 'g_create_albums_private' ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'g_create_albums_fo', $group->g_create_albums_fo, FALSE, array(), NULL, NULL, NULL, 'g_create_albums_fo' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Number( 'g_album_limit', $group->g_album_limit, FALSE, array( 'unlimited' => 0 ), NULL, NULL, NULL, 'g_album_limit' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Number( 'g_img_album_limit', $group->g_img_album_limit, FALSE, array( 'unlimited' => 0 ), NULL, NULL, NULL, 'g_img_album_limit' ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'g_delete_own_albums', $group->g_delete_own_albums, FALSE, array(), NULL, NULL, NULL, 'g_delete_own_albums' ) );
|
||||
if( $group->g_id != \IPS\Settings::i()->guest_group )
|
||||
{
|
||||
$form->addHeader( 'gallery_album_permissions' );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'g_create_albums', $group->g_create_albums, FALSE, array( 'togglesOn' => array( 'g_create_albums_private', 'g_create_albums_fo', 'g_delete_own_albums', 'g_album_limit', 'g_img_album_limit' ) ) ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'g_create_albums_private', $group->g_create_albums_private, FALSE, array(), NULL, NULL, NULL, 'g_create_albums_private' ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'g_create_albums_fo', $group->g_create_albums_fo, FALSE, array(), NULL, NULL, NULL, 'g_create_albums_fo' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Number( 'g_album_limit', $group->g_album_limit, FALSE, array( 'unlimited' => 0 ), NULL, NULL, NULL, 'g_album_limit' ) );
|
||||
$form->add( new \IPS\Helpers\Form\Number( 'g_img_album_limit', $group->g_img_album_limit, FALSE, array( 'unlimited' => 0 ), NULL, NULL, NULL, 'g_img_album_limit' ) );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'g_delete_own_albums', $group->g_delete_own_albums, FALSE, array(), NULL, NULL, NULL, 'g_delete_own_albums' ) );
|
||||
}
|
||||
|
||||
$form->addHeader( 'gallery_restrictions' );
|
||||
$form->add( new \IPS\Helpers\Form\YesNo( 'g_movies', $group->g_movies, FALSE, array( 'togglesOn' => array( 'g_movie_size' ) ) ) );
|
||||
@@ -60,12 +63,16 @@ class _Gallery
|
||||
*/
|
||||
public function save( $values, &$group )
|
||||
{
|
||||
$group->g_create_albums = $values['g_create_albums'];
|
||||
$group->g_create_albums_private = $values['g_create_albums_private'];
|
||||
$group->g_create_albums_fo = $values['g_create_albums_fo'];
|
||||
$group->g_album_limit = $values['g_album_limit'];
|
||||
$group->g_img_album_limit = $values['g_img_album_limit'];
|
||||
$group->g_delete_own_albums = $values['g_delete_own_albums'];
|
||||
if( $group->g_id != \IPS\Settings::i()->guest_group )
|
||||
{
|
||||
$group->g_create_albums = $values['g_create_albums'];
|
||||
$group->g_create_albums_private = $values['g_create_albums_private'];
|
||||
$group->g_create_albums_fo = $values['g_create_albums_fo'];
|
||||
$group->g_album_limit = $values['g_album_limit'];
|
||||
$group->g_img_album_limit = $values['g_img_album_limit'];
|
||||
$group->g_delete_own_albums = $values['g_delete_own_albums'];
|
||||
}
|
||||
|
||||
$group->g_movies = $values['g_movies'];
|
||||
$group->g_movie_size = $values['g_movie_size'];
|
||||
$group->g_max_upload = $values['g_max_upload'];
|
||||
|
||||
@@ -27,7 +27,7 @@ class _Images
|
||||
/**
|
||||
* Process Form
|
||||
*
|
||||
* @param \IPS\Form\Tabbed $form The form
|
||||
* @param \IPS\Helpers\Form $form The form
|
||||
* @param \IPS\Member $member Existing Member
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -68,12 +68,18 @@ class _gallery
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'profile.css', 'gallery', 'front' ) );
|
||||
//\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'profile.css', 'gallery', 'front' ) );
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'gallery.css', 'gallery', 'front' ) );
|
||||
if ( \IPS\Theme::i()->settings['responsive'] )
|
||||
{
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, \IPS\Theme::i()->css( 'gallery_responsive.css', 'gallery', 'front' ) );
|
||||
}
|
||||
|
||||
$table = new \IPS\gallery\Album\Table( $this->member->url()->setQueryString( 'tab', 'node_gallery_gallery') );
|
||||
$table->setOwner( $this->member );
|
||||
$table->limit = 10;
|
||||
$table->tableTemplate = array( \IPS\Theme::i()->getTemplate( 'global', 'gallery' ), 'profileAlbumTable' );
|
||||
$table->rowsTemplate = array( \IPS\Theme::i()->getTemplate( 'global', 'gallery' ), 'profileAlbumRow' );
|
||||
$table->rowsTemplate = array( \IPS\Theme::i()->getTemplate( 'browse', 'gallery' ), 'albums' );
|
||||
|
||||
return (string) $table;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user