Version 4.3.6
This commit is contained in:
1 parent
fe1acf984a
commit
1a0c7fd3c2
609 files changed
+14707
-5726
No files matched your search
@@ -359,6 +359,8 @@ class _browse extends \IPS\Content\Controller
|
||||
\IPS\Output::i()->metaTags['og:image'] = $album->coverPhoto('masked');
|
||||
}
|
||||
|
||||
\IPS\Output::i()->metaTags['og:title'] = $album->_title;
|
||||
|
||||
$albumItem = $album->asItem();
|
||||
\IPS\core\Facebook\Pixel::i()->PageView = array(
|
||||
'item_id' => $album->id,
|
||||
@@ -498,6 +500,7 @@ class _browse extends \IPS\Content\Controller
|
||||
}
|
||||
|
||||
/* Display form */
|
||||
\IPS\Output::i()->title = \IPS\Member::loggedIn()->language()->addToStack( 'edit_album' );
|
||||
\IPS\Output::i()->output = $form->customTemplate( array( call_user_func_array( array( \IPS\Theme::i(), 'getTemplate' ), array( 'forms', 'core' ) ), 'popupTemplate' ) );
|
||||
}
|
||||
|
||||
@@ -608,9 +611,10 @@ class _browse extends \IPS\Content\Controller
|
||||
}
|
||||
|
||||
/* And then redirect */
|
||||
if( isset( $moveTo ) )
|
||||
if( isset( $moveData['moveTo'] ) )
|
||||
{
|
||||
\IPS\Output::i()->redirect( $moveTo->url() );
|
||||
$target = $moveData['moveToClass']::load($moveData['moveTo']);
|
||||
\IPS\Output::i()->redirect( $target->url() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -118,7 +118,7 @@ class _submit extends \IPS\Dispatcher\Controller
|
||||
$tagsField = $tagsField->html();
|
||||
|
||||
$imageTagsField->name = $imageTagsField->name . '_DEFAULT';
|
||||
$imageTagsField = $imageTagsField->html();
|
||||
$imageTagsField = $imageTagsField->html();
|
||||
}
|
||||
|
||||
\IPS\Member::loggedIn()->language()->parseOutputForDisplay( $tagsField );
|
||||
@@ -447,6 +447,7 @@ class _submit extends \IPS\Dispatcher\Controller
|
||||
$tagsFieldName = $tagsField->name . '_' . $imageId;
|
||||
$tagsField->name = $tagsFieldName;
|
||||
$tagsPrefix = NULL;
|
||||
$tagsValue = NULL;
|
||||
|
||||
foreach( $imagesData as $_imageData )
|
||||
{
|
||||
@@ -461,20 +462,20 @@ class _submit extends \IPS\Dispatcher\Controller
|
||||
}
|
||||
}
|
||||
|
||||
if( !isset( $tagsValue ) )
|
||||
if( !$tagsValue )
|
||||
{
|
||||
$tagsValue = \IPS\Request::i()->tags_all;
|
||||
$tagsPrefix = \IPS\Request::i()->prefix_all;
|
||||
}
|
||||
|
||||
$form->add( $tagsField );
|
||||
|
||||
$checkboxInput = $tagsFieldName . '_freechoice_prefix';
|
||||
$prefixinput = $tagsFieldName . '_prefix';
|
||||
|
||||
\IPS\Request::i()->$tagsFieldName = ( is_array( $tagsValue ) ) ? implode( "\n", $tagsValue ) : $tagsValue;
|
||||
\IPS\Request::i()->$checkboxInput = 1;
|
||||
\IPS\Request::i()->$prefixinput = $tagsPrefix;
|
||||
|
||||
$form->add( $tagsField );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -580,7 +581,7 @@ class _submit extends \IPS\Dispatcher\Controller
|
||||
|
||||
if( !isset( $imageData['image_credit'] ) OR !$imageData['image_credit'] )
|
||||
{
|
||||
$imageData['image_credit'] = $values['credit_all'];
|
||||
$imageData['image_credit_info'] = $values['credit_all'];
|
||||
}
|
||||
|
||||
if( !isset( $imageData['image_tags'] ) OR !$imageData['image_tags'] )
|
||||
@@ -693,6 +694,8 @@ class _submit extends \IPS\Dispatcher\Controller
|
||||
/* Fix thumbnail reference if this is a video */
|
||||
if( isset( $values['image_thumbnail'] ) )
|
||||
{
|
||||
$thumbnailReset = FALSE;
|
||||
|
||||
foreach( $values as $key => $value )
|
||||
{
|
||||
if( mb_strpos( $key, 'image_thumbnail_existing' ) === 0 )
|
||||
@@ -702,15 +705,18 @@ class _submit extends \IPS\Dispatcher\Controller
|
||||
$thumb = \IPS\Db::i()->select( '*', 'core_files_temp', array( 'id=?', $value ) )->first();
|
||||
|
||||
$values['image_thumbnail'] = $thumb['contents'];
|
||||
$thumbnailReset = TRUE;
|
||||
\IPS\Db::i()->delete( 'core_files_temp', array( 'id=?', $value ) );
|
||||
break;
|
||||
}
|
||||
catch( \UnderflowException $e )
|
||||
{
|
||||
unset( $values['image_thumbnail'] );
|
||||
}
|
||||
catch( \UnderflowException $e ){}
|
||||
}
|
||||
}
|
||||
|
||||
if( !$thumbnailReset )
|
||||
{
|
||||
unset( $values['image_thumbnail'] );
|
||||
}
|
||||
}
|
||||
|
||||
/* If GPS is supported but the admin did not specify whether to show the map or not, then default to showing it */
|
||||
|
||||
@@ -232,12 +232,15 @@ class _view extends \IPS\Content\Controller
|
||||
'userInteractionCount' => $this->image->mapped('num_reviews')
|
||||
);
|
||||
|
||||
\IPS\Output::i()->jsonLd['gallery']['aggregateRating'] = array(
|
||||
'@type' => 'AggregateRating',
|
||||
'ratingValue' => $this->image->averageReviewRating(),
|
||||
'reviewCount' => $this->image->reviews,
|
||||
'bestRating' => \IPS\Settings::i()->reviews_rating_out_of
|
||||
);
|
||||
if ( $this->image->averageReviewRating() )
|
||||
{
|
||||
\IPS\Output::i()->jsonLd['gallery']['aggregateRating'] = array(
|
||||
'@type' => 'AggregateRating',
|
||||
'ratingValue' => $this->image->averageReviewRating(),
|
||||
'reviewCount' => $this->image->reviews,
|
||||
'bestRating' => \IPS\Settings::i()->reviews_rating_out_of
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if( $this->image->media )
|
||||
|
||||
Reference in new issue
Block a user