Version 4.7.0

This commit is contained in:
Neo committed 2025-12-19 16:00:35 -08:00
1 parent 517a5e1f70
commit 8ba7d43898
1933 files changed
+65613 -11332

No files matched your search

@@ -76,7 +76,7 @@ class _browse extends \IPS\Content\Controller
if ( \IPS\Member::loggedIn()->member_id )
{
$key = md5( ( \IPS\Member::loggedIn()->members_pass_hash ?: \IPS\Member::loggedIn()->email ) . \IPS\Member::loggedIn()->members_pass_salt );
$key = \IPS\Member::loggedIn()->getUniqueMemberHash();
\IPS\Output::i()->rssFeeds['gallery_rss_title'] = \IPS\Output::i()->rssFeeds['gallery_rss_title']->setQueryString( array( 'member' => \IPS\Member::loggedIn()->member_id , 'key' => $key ) );
}
@@ -295,6 +295,15 @@ class _browse extends \IPS\Content\Controller
{
$club->setBreadcrumbs( $category );
}
/* Data Layer Page Context */
if ( \IPS\Settings::i()->core_datalayer_enabled AND !\IPS\Request::i()->isAjax() )
{
foreach ( $category->getDataLayerProperties() as $property => $value )
{
\IPS\core\DataLayer::i()->addContextProperty( $property, $value, true );
}
}
\IPS\Output::i()->contextualSearchOptions[ \IPS\Member::loggedIn()->language()->addToStack( 'search_contextual_item_categories' ) ] = array( 'type' => 'gallery_image', 'nodes' => $category->_id );
\IPS\Output::i()->output = \IPS\Theme::i()->getTemplate( 'browse' )->category( $category, $albums, (string) $table );
@@ -189,6 +189,7 @@ class _submit extends \IPS\Dispatcher\Controller
'storageExtension' => 'gallery_Images',
'image' => TRUE,
'maxFileSize' => \IPS\Member::loggedIn()->group['g_max_upload'] ? ( \IPS\Member::loggedIn()->group['g_max_upload'] / 1024 ) : NULL,
'canBeModerated' => TRUE
) ) );
/* And output */
@@ -436,6 +437,7 @@ class _submit extends \IPS\Dispatcher\Controller
'multiple' => TRUE,
'minimize' => FALSE,
'template' => "gallery.submit.imageItem",
'canBeModerated' => TRUE
);
if( $maxNumberOfImages )
@@ -666,6 +668,9 @@ class _submit extends \IPS\Dispatcher\Controller
/* Fix descriptions */
$imageData['image_description'] = ( isset( $imageData['image_textarea'] ) AND $imageData['image_textarea'] ) ? $imageData['image_textarea'] : ( ( isset( $imageData['image_description'] ) ) ? $imageData['image_description'] : '' );
/* Will we need to moderate this? */
$imageData['requires_moderation'] = $image->requiresModeration;
if ( !isset( $existing[ (string) $image ] ) )
{
@@ -751,6 +756,11 @@ class _submit extends \IPS\Dispatcher\Controller
/* Get the data from the row and set */
$fileData = json_decode( $file['upload_data'], TRUE );
if ( isset( $fileData['requires_moderation'] ) )
{
$values['imageRequiresModeration'] = $fileData['requires_moderation'];
unset( $fileData['requires_moderation'] );
}
if( \count( $fileData ) )
{
@@ -785,6 +795,7 @@ class _submit extends \IPS\Dispatcher\Controller
$thumb = \IPS\Db::i()->select( '*', 'core_files_temp', array( 'id=?', $value ) )->first();
$values['image_thumbnail'] = $thumb['contents'];
$values['image_thumbnail_requires_moderation'] = $thumb['requires_moderation'];
$thumbnailReset = TRUE;
\IPS\Db::i()->delete( 'core_files_temp', array( 'id=?', $value ) );
break;
@@ -189,7 +189,7 @@ class _view extends \IPS\Content\Controller
/* Add JSON-ld */
\IPS\Output::i()->jsonLd['gallery'] = array(
'@context' => "http://schema.org",
'@type' => $this->image->media ? "VideoObject" : "VisualArtwork",
'@type' => "MediaObject",
'@id' => (string) $this->image->url(),
'url' => (string) $this->image->url(),
'name' => $this->image->mapped('title'),
@@ -309,6 +309,12 @@ class _view extends \IPS\Content\Controller
$return['comments'] = $commentsAndReviews;
}
/* Data Layer Properties */
if ( \IPS\Settings::i()->core_datalayer_enabled )
{
$return['dataLayer'] = $this->image->getDataLayerProperties();
}
\IPS\Output::i()->json( $return );
}
/* Switching comments only */