I have a lot of fixes for gallery 1.2.0, but my english is not fine
1. Move image to another album. Hide a lot of albums where no permissions to move:
/ext/phpbbgallery/core/album/album.php
find
Code: Select all
if ($list)
{
$selected = (is_array($select_id)) ? ((in_array($row['album_id'], $select_id)) ? ' selected="selected"' : '') : (($row['album_id'] == $select_id) ? ' selected="selected"' : '');
$album_list .= '<option value="' . $row['album_id'] . '"' . (($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected) . '>' . $padding . $row['album_name'] . ' (ID: ' . $row['album_id'] . ')</option>';
}
replace with
Code: Select all
if ($list && !$disabled)
{
$selected = (is_array($select_id)) ? ((in_array($row['album_id'], $select_id)) ? ' selected="selected"' : '') : (($row['album_id'] == $select_id) ? ' selected="selected"' : '');
$album_list .= '<option value="' . $row['album_id'] . '"' . (($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected) . '>' . $padding . $row['album_name'] . ' (ID: ' . $row['album_id'] . ')</option>';
}
2. This fix disables move images to albums where no permissions to move:
/ext/phpbbgallery/core/controller/moderate.php
find
Code: Select all
if ($action == 'move')
{
$category_select = $this->album->get_albumbox(false, 'moving_target', $album_id, 'i_upload', $album_id);
replace with
Code: Select all
if ($action == 'move')
{
$category_select = $this->album->get_albumbox(false, 'moving_target', $album_id, 'm_move', $album_id);
find
Code: Select all
$category_select = $this->album->get_albumbox(false, 'moving_target', $album_id, 'i_upload', $album_id);
replace with
Code: Select all
$category_select = $this->album->get_albumbox(false, 'moving_target', $album_id, 'm_move', $album_id);
3. Fix for move up down personal albums in ucp:
/ext/phpbbgallery/core/ucp/main_module.php
missed $phpbb_ext_gallery in
Code: Select all
function move_album()
{
global $cache, $db, $user, $phpbb_ext_gallery, $phpbb_ext_gallery_core_album, $albums_table, $request;
4. Fix when view subscriptions in ucp:
/ext/phpbbgallery/core/ucp/main_module.php
missed $phpbb_ext_gallery_core_album in
Code: Select all
function manage_subscriptions()
{
global $db, $template, $user, $phpbb_container, $phpbb_ext_gallery, $phpbb_ext_gallery_core_album, $phpbb_gallery_notification, $watch_table, $albums_table, $contests_table;
5. Make album images responsible:
/ext/phpbbgallery/core/styles/prosilver/template/gallery/viewimage_body.html
add classes postbody_album and postimage to image block:
Code: Select all
<div class="postbody_album" id="image">
<!-- IF UC_IMAGE_ACTION --><dl class="thumbnail"><a href="{UC_IMAGE_ACTION}"><!-- ENDIF --><img src="{UC_IMAGE}" class="postimage" alt="{IMAGE_NAME}" /><!-- IF UC_IMAGE_ACTION --></a></dl><!-- ENDIF -->
<!-- IF S_IMAGE_REPORTED --><br /><br /><a href="{U_IMAGE_REPORTED}"><span class="error">{L_IMAGE_REPORTED}</span></a><!-- ENDIF -->
<br /><span class="image-description">{IMAGE_DESC}</span>
</div>
add to css:
Code: Select all
.postbody_album {
text-align:center;
}
.postbody_album img.postimage {
max-width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
6. Make album pics clickable:
/ext/phpbbgallery/core/styles/prosilver/template/gallery/albumlist_polaroid.html
Code: Select all
<!-- IF albumrow.UC_THUMBNAIL -->
<a href="{albumrow.U_VIEWALBUM}"><img src="{albumrow.UC_THUMBNAIL}" alt="{albumrow.UC_IMAGE_NAME}" title="{albumrow.UC_IMAGE_NAME}" /></a>
<!-- ENDIF -->
7. Try to make sort personal gallery albums by decrease (last updated first), but how use images from personal subalbums?..
/ext/phpbbgallery/core/album/display.php
Code: Select all
if (isset($mode_personal))
{
$sql_array['LEFT_JOIN'][] = array(
'FROM' => array(USERS_TABLE => 'u'),
'ON' => 'u.user_id = a.album_user_id',
);
$sql_array['ORDER_BY'] = 'a.album_last_image_id DESC';
}