Version 4.1.2
This commit is contained in:
1 parent
3ba79295ee
commit
28bd025b35
1131 files changed
+63658
-20579
No files matched your search
File diff suppressed because it is too large.
Load diff
@@ -120,6 +120,21 @@ class _view extends \IPS\Content\Controller
|
||||
}
|
||||
}
|
||||
|
||||
/* Sort out comments and reviews */
|
||||
$tabs = $this->image->commentReviewTabs();
|
||||
$_tabs = array_keys( $tabs );
|
||||
$tab = isset( \IPS\Request::i()->tab ) ? \IPS\Request::i()->tab : array_shift( $_tabs );
|
||||
$activeTabContents = $this->image->commentReviews( $tab );
|
||||
|
||||
if ( count( $tabs ) > 1 )
|
||||
{
|
||||
$commentsAndReviews = count( $tabs ) ? \IPS\Theme::i()->getTemplate( 'global', 'core' )->tabs( $tabs, $tab, $activeTabContents, $this->image->url(), 'tab', FALSE, TRUE ) : NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
$commentsAndReviews = $activeTabContents;
|
||||
}
|
||||
|
||||
/* Set the session location */
|
||||
\IPS\Session::i()->setLocation( $this->image->url(), $this->image->onlineListPermissions(), 'loc_gallery_viewing_image', array( $this->image->caption => FALSE ) );
|
||||
|
||||
@@ -205,6 +220,7 @@ class _view extends \IPS\Content\Controller
|
||||
elseif( \IPS\Request::i()->isAjax() && isset( \IPS\Request::i()->browse ) )
|
||||
{
|
||||
$return = array(
|
||||
'title' => $this->image->mapped('title'),
|
||||
'image' => \IPS\Theme::i()->getTemplate( 'view' )->imageFrame( $this->image, $slider, $this->image->nextItem(), $this->image->prevItem() ),
|
||||
'info' => \IPS\Theme::i()->getTemplate( 'view' )->imageInfo( $this->image, $slider, $this->image->nextItem(), $this->image->prevItem() ),
|
||||
'slider' => \IPS\Theme::i()->getTemplate( 'view' )->imageSlider( $this->image, $slider, $this->image->nextItem(), $this->image->prevItem(), $hasNext, $hasPrev )
|
||||
@@ -212,16 +228,22 @@ class _view extends \IPS\Content\Controller
|
||||
|
||||
if( $this->image->directContainer()->allow_comments )
|
||||
{
|
||||
$return['comments'] = \IPS\Theme::i()->getTemplate( 'view' )->comments( $this->image );
|
||||
$return['comments'] = $commentsAndReviews;
|
||||
}
|
||||
|
||||
\IPS\Output::i()->json( $return );
|
||||
}
|
||||
/* Switching comments only */
|
||||
elseif( \IPS\Request::i()->isAjax() )
|
||||
{
|
||||
\IPS\Output::i()->output = $activeTabContents;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
\IPS\Output::i()->cssFiles = array_merge( \IPS\Output::i()->cssFiles, array( \IPS\Http\Url::internal( 'applications/gallery/interface/videojs/video-js.min.css', 'none' ) ) );
|
||||
\IPS\Output::i()->jsFiles = array_merge( \IPS\Output::i()->jsFiles, \IPS\Output::i()->js( 'front_view.js', 'gallery' ) );
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'view' )->image( $this->image, $slider, $this->image->nextItem(), $this->image->prevItem(), $hasNext, $hasPrev );
|
||||
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'view' )->image( $this->image, $slider, $this->image->nextItem(), $this->image->prevItem(), $hasNext, $hasPrev, $commentsAndReviews );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -391,6 +413,7 @@ class _view extends \IPS\Content\Controller
|
||||
\IPS\Member::loggedIn()->pp_main_photo = (string) $photo;
|
||||
\IPS\Member::loggedIn()->pp_thumb_photo = (string) $photo->thumbnail( 'core_Profile', \IPS\PHOTO_THUMBNAIL_SIZE, \IPS\PHOTO_THUMBNAIL_SIZE );
|
||||
\IPS\Member::loggedIn()->pp_photo_type = "custom";
|
||||
\IPS\Member::loggedIn()->photo_last_update = time();
|
||||
\IPS\Member::loggedIn()->save();
|
||||
|
||||
/* Redirect back to image */
|
||||
|
||||
Reference in new issue
Block a user