Image Attachment Thumbnail View

Started by GL700Wing, January 10, 2021, 08:59:39 PM

Previous topic - Next topic

@rjen

Find here the language strings in dutch...
<file name="$languagedir/index.dutch.php">
<operation> <!-- End of File -->
<search position="end" />
<add><![CDATA[
// Image Attachment Thumbnail View mod.
$txt['att_awaiting_approval'] = '<br /><em style="color: red;">(Wachtend op goedkeuring)</em>';
]]></add>
</operation>
</file>

<file name="$languagedir/index.dutch-utf8.php" error="skip">
<operation> <!-- End of File -->
<search position="end" />
<add><![CDATA[
// Image Attachment Thumbnail View mod.
$txt['att_awaiting_approval'] = '<br /><em style="color: red;">(Wachtend op goedkeuring)</em>';
]]></add>
</operation>
</file>

<file name="$languagedir/Admin.dutch.php">
<operation> <!-- End of File -->
<search position="end" />
<add><![CDATA[
// Image Attachment Thumbnail View mod.
$txt['attachment_manager_view_thumbs_settings'] = 'Instellingen voor \'Image Attachment Thumbnail View\'';
$txt['attachment_manager_view_thumbs'] = 'Toon miniaturen van afbeelding bijlagen in het beheercentrum <div class="smalltext">Deze instelling heeft invloed op bijlagen, avatars en miniaturen bij \'Bekijk bestanden\'.</div>';
$txt['moderation_center_view_thumbs'] = 'Toon minaturen van niet-goedgekeurde afbeelding bijlagen in het Moderatiecentrum';
$txt['member_profile_view_thumbs_admin'] = 'Toon beheerders miniaturen van afbeelding bijlagen in ledenprofielen';
$txt['member_profile_view_thumbs_moderator'] = 'Toon moderators miniaturen van afbeelding bijlagen in ledenprofielen';
$txt['member_profile_view_thumbs_other'] = 'Toon leden miniaturen van afbeelding bijlagen in ledenprofielen';
$txt['att_awaiting_approval'] = '<br /><em style="color: red;">(Wachtend op goedkeuring)</em>';

]]></add>
</operation>
</file>

<file name="$languagedir/Admin.dutch-utf8.php" error="skip">
<operation> <!-- End of File -->
<search position="end" />
<add><![CDATA[
// Image Attachment Thumbnail View mod.
$txt['attachment_manager_view_thumbs_settings'] = 'Instellingen voor \'Image Attachment Thumbnail View\'';
$txt['attachment_manager_view_thumbs'] = 'Toon miniaturen van afbeelding bijlagen in het beheercentrum <div class="smalltext">Deze instelling heeft invloed op bijlagen, avatars en miniaturen bij \'Bekijk bestanden\'.</div>';
$txt['moderation_center_view_thumbs'] = 'Toon minaturen van niet-goedgekeurde afbeelding bijlagen in het Moderatiecentrum';
$txt['member_profile_view_thumbs_admin'] = 'Toon beheerders miniaturen van afbeelding bijlagen in ledenprofielen';
$txt['member_profile_view_thumbs_moderator'] = 'Toon moderators miniaturen van afbeelding bijlagen in ledenprofielen';
$txt['member_profile_view_thumbs_other'] = 'Toon leden miniaturen van afbeelding bijlagen in ledenprofielen';
$txt['att_awaiting_approval'] = '<br /><em style="color: red;">(Wachtend op goedkeuring)</em>';

]]></add>
</operation>
</file>
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

GL700Wing

Updated 1.5 - 01-Nov-21
1.5 - 01-Nov-21
o Fix for issue of broken image link showing for non-image files in Admin Center - reported by @rjen.
o Added Dutch language support (thanks to @rjen).


Many thanks to @@rjen for reporting this bug and for Dutch language support.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

GL700Wing

Version 1.6 - 22-Apr-22
o Added support for SMF 2.1
o Removed support for SMF 2.1 RC3 and SMF 2.1 RC4
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Dave J

Thanks GL.

I'm not sure if you know, but there are no longer any images on the 'Downloads' page

Ignore that, my connection must have been slow
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

GL700Wing

Version 1.7 - 26-May-22
o Minor coding update - no change in functionality.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

GL700Wing

v1.8 - 10-Jun-23
o SMF 2.1: Fixed minor bug introduced in previous release that was causing approved attachments to show with the text (Awaiting Approval) when viewd in a member profile.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Dave J

Hi GL,

I've just installed the latest version, I did uninstall the previous version first, and now I'm get double images.
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

GL700Wing

Quote from: Dave J on June 14, 2023, 10:13:55 AMI've just installed the latest version, I did uninstall the previous version first, and now I'm get double images.
This isn't happening on the SMF 2.0 or SMF 2.1 forums I've installed tested this on (ie, install previous version, uninstall previous version, install latest version).

That said, the cause is a duplication of the line in the ./Sources/ManageAttachments.php file that displays the images - there should only be one copy of the following line (and it should be above the 'return $link;' line):

if ($viewThumbs)
                            $link .= '<div style="margin: 5px;">' . $imgLink . '</div>';
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Dave J

If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

Dave J

Quote from: GL700Wing on June 14, 2023, 07:23:40 PM
Quote from: Dave J on June 14, 2023, 10:13:55 AMI've just installed the latest version, I did uninstall the previous version first, and now I'm get double images.
This isn't happening on the SMF 2.0 or SMF 2.1 forums I've installed tested this on (ie, install previous version, uninstall previous version, install latest version).

That said, the cause is a duplication of the line in the ./Sources/ManageAttachments.php file that displays the images - there should only be one copy of the following line (and it should be above the 'return $link;' line):

if ($viewThumbs)
                            $link .= '<div style="margin: 5px;">' . $imgLink . '</div>';


When I edited the file you suggested I found duplicate code around line 490

if ($context['browse_type'] != 'avatars' && !$rowData['att_approved'])
$link .= $txt['att_awaiting_approval'];

if ($viewThumbs)
$link .= '<div style="margin: 5px;">' . $imgLink . '</div>';

Once that was deleted the view went to normal and only showing 1 image of each now.

Thanks for the pointer in the right direction
If you want quizzes to add to the new SMF2.1 quiz mod go here . There are also walkthroughs in the forum to explain how to install them and other tips.

GL700Wing

Quote from: Dave J on June 15, 2023, 06:45:13 AM... only showing 1 image of each now.

Thanks for the pointer in the right direction
Thanks for letting me know!
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Advertisement: