[CDB] QAIP - Quote Attachments Img in Posts

A place for Extension Authors to post and receive feedback on Extensions still in development. No Extensions within this forum should be used within a live environment!
Suggested Hosts
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: Extensions Development rules

IMPORTANT FOR NEEDED EVENTS!!!
If you need an event for your extension please read this for the steps to follow to request the event(s)
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

[CDB] QAIP - Quote Attachments Img in Posts

Post by 3Di »

Extension Name: Quote Attachments Img in Posts

Extension description:
  • - Quotes and resize attached images only via direct post quoting (not from topic review or copy and paste a quote).
  • - Resizes the images posted within [IMG] BBcode.
  • - Each type of attached images are quoted as images.
  • - The thumbs originated from images posted within [IMG] BBcode remains not clickable.
  • - Use CSS to center quoted images - selectable in ACP/Posting/post settings - Defaulted to No.
  • - Quoted images are resized on the fly with CSS.
  • - The measure of the thumbnail can be modified in the css. Shipped with a "max-height: 250px;"
  • - No image's hard-manipulation, images are untouched and all of their attributes preserved.
  • - Unlimited nested quotes compliant.
  • - Disabling the extension only removes resizing, posts will still show the images at the original size.
Requirements:
  • phpBB >= 3.2.5
Extension Version: 1.2.0

Extension Download: https://www.phpbb.com/customise/db/extension/qaip/

GH Tracker: https://github.com/3D-I/qaip/issues/new/choose

Installation:
Copy the content of the uncompressed package into PHPBB_ROOT/ext/
So the result would be ./ext/threedi/qaip

Update from previous version:
1) disable - 2) delete data - 3) delete files - 4) upload the new ones - 5) enable it again.

Changes Log: See the package's content.
Last edited by 3Di on Sun Sep 08, 2019 6:34 pm, edited 13 times in total.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco

Re: [3.1][3.2][DEV] QAIP - Quote Attachments Img in Posts

Post by 3Di »


1.2.0 - 20-Jul-2019
- FIX - not unique real_filenames : https://github.com/3D-I/qaip/issues/13
- update version checker
- main logic rewritten (thx mrgoldy)

1.1.0 - 29-Jun-2019
- Use relative URL
- update version checker
- code housekeeping

1.0.2-rc - 2019-06-20
- remove suppport for 3.1
- remove support for 3.1 anami style
- FIX - filename being shown
- FIX - CSS centering for 3.2
- FIX - attachment sort ordering
- FIX - replace images in the same place they were put if INLINE
- FIX - potential SQL injection
- update version checker
- remove redundant code
- code housekeeping
ToDo
  • Center attached images also for phpBB 3.2.x. Done in 1.0.2-RC.
  • Fix the Poll's bug (see here) Done in 1.0.0-beta3.
  • Auto Image Rotation for attachments. Done separately: viewtopic.php?f=456&t=2477256
Extras (Premium - on demand)
  • Use just on a per forum basis.
  • Watermark.
  • Make clickable the thumbs originated from images posted within [IMG] tags.
Styles support (CSS resizing)
  • The extension supports the prosilver style and those who inherit from it.
  • If you have another style try copying the prosilver folder and rename it with your style name.
  • I could be not able to provide support for every style, basicly.
    • Language support
      • The extension supports the following languages, please avoid to create PRs on GitHUb for extra languages, those will be not merged. Create a fork of the language and share the link, instead.
      • en
    Last edited by 3Di on Sat Jul 20, 2019 8:52 pm, edited 15 times in total.
    🆓 Free support for our extensions also provided here: phpBB Studio
    🚀 Looking for a specific feature or alternative option? We will rock you!
    Please PM me only to request paid works. Thx. Buy me a coffee -> Image
    My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
    User avatar
    3Di
    I've Been Banned!
    Posts: 17538
    Joined: Mon Apr 04, 2005 11:09 pm
    Location: I'm with Ukraine 🇺🇦
    Name: Marco

    Re: [3.1][3.2][DEV] QAIP - Quote Attachments Img in Posts

    Post by 3Di »

    Credits
    • Inspired by Татьяна5's editor_of_attachments.
    • CSS resizer, improved, inspired by quotethumbnails of HiFiKabin.
    • ACP posting setting, adapted, inspired by Lightbox of VSE.
    • Beta testing: Puchahawa (Randy), profKroy, 3Di.
    • Contributor: profKroy, which expressly requested this extension.
    Last edited by 3Di on Fri Jun 21, 2019 8:41 pm, edited 3 times in total.
    🆓 Free support for our extensions also provided here: phpBB Studio
    🚀 Looking for a specific feature or alternative option? We will rock you!
    Please PM me only to request paid works. Thx. Buy me a coffee -> Image
    My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
    User avatar
    3Di
    I've Been Banned!
    Posts: 17538
    Joined: Mon Apr 04, 2005 11:09 pm
    Location: I'm with Ukraine 🇺🇦
    Name: Marco

    Re: [3.1][3.2][DEV] QAIP - Quote Attachments Img in Posts

    Post by 3Di »

    Image
    Last edited by 3Di on Fri Jun 21, 2019 8:43 pm, edited 5 times in total.
    🆓 Free support for our extensions also provided here: phpBB Studio
    🚀 Looking for a specific feature or alternative option? We will rock you!
    Please PM me only to request paid works. Thx. Buy me a coffee -> Image
    My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
    BerthaH
    Registered User
    Posts: 5
    Joined: Sun Feb 12, 2017 10:39 pm

    Re: [3.1][3.2][DEV] QAIP - Quote Attachments Img in Posts

    Post by BerthaH »

    Have you a test-login for this extension?

    http://3di.space/32/viewtopic.php?f=10&t=26

    I dont see any quotes here :roll:
    User avatar
    HiFiKabin
    Community Team Member
    Community Team Member
    Posts: 6817
    Joined: Wed May 14, 2014 9:10 am
    Location: Swearing at the PC, UK
    Name: James

    Re: [3.1][3.2][DEV] QAIP - Quote Attachments Img in Posts

    Post by HiFiKabin »

    Its something I have been thinking about/swearing about/trying to do for ages.

    Thanks Marco, it sounds like its an answer to many a prayer
    User avatar
    3Di
    I've Been Banned!
    Posts: 17538
    Joined: Mon Apr 04, 2005 11:09 pm
    Location: I'm with Ukraine 🇺🇦
    Name: Marco

    Re: [3.1][3.2][DEV] QAIP - Quote Attachments Img in Posts

    Post by 3Di »

    HiFiKabin wrote: Sat Feb 18, 2017 5:46 pm Its something I have been thinking about/swearing about/trying to do for ages.

    Thanks Marco, it sounds like its an answer to many a prayer
    Thanks to you too. :)
    BerthaH wrote: Sat Feb 18, 2017 5:34 pm Have you a test-login for this extension?

    http://3di.space/32/viewtopic.php?f=10&t=26

    I dont see any quotes here :roll:
    No, I don't have any test account available at my board, I want to keep it as clean as possible.
    I sat my board for guests to see only the first post of a topic, enough to share links to free downloads (ie.: packaged extensions).

    Here's the screenshot of the quoted attachment as per the link you above posted
    http://prntscr.com/eagfud (phpBB 3.2.0)

    This one instead is from the development environment on phpBB 3.1.10
    http://prntscr.com/eahjxn (centered).
    🆓 Free support for our extensions also provided here: phpBB Studio
    🚀 Looking for a specific feature or alternative option? We will rock you!
    Please PM me only to request paid works. Thx. Buy me a coffee -> Image
    My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
    User avatar
    3Di
    I've Been Banned!
    Posts: 17538
    Joined: Mon Apr 04, 2005 11:09 pm
    Location: I'm with Ukraine 🇺🇦
    Name: Marco

    Re: [3.1][3.2][BETA] QAIP - Quote Attachments Img in Posts

    Post by 3Di »

    First Public release available, see first post and following.
    🆓 Free support for our extensions also provided here: phpBB Studio
    🚀 Looking for a specific feature or alternative option? We will rock you!
    Please PM me only to request paid works. Thx. Buy me a coffee -> Image
    My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
    User avatar
    HiFiKabin
    Community Team Member
    Community Team Member
    Posts: 6817
    Joined: Wed May 14, 2014 9:10 am
    Location: Swearing at the PC, UK
    Name: James

    Re: [3.1][3.2][BETA] QAIP - Quote Attachments Img in Posts

    Post by HiFiKabin »

    Quick test and its BRILLIANT! One slight 'error'

    When quoting an attachment, as well as the image you get the attachment name

    Image

    phpBB 3.2.0 prosilver
    User avatar
    3Di
    I've Been Banned!
    Posts: 17538
    Joined: Mon Apr 04, 2005 11:09 pm
    Location: I'm with Ukraine 🇺🇦
    Name: Marco

    Re: [3.1][3.2][BETA] QAIP - Quote Attachments Img in Posts

    Post by 3Di »

    HiFiKabin wrote: Tue Feb 21, 2017 11:08 am Quick test and its BRILLIANT! One slight 'error'

    When quoting an attachment, as well as the image you get the attachment name

    ..snip..

    phpBB 3.2.0 prosilver
    Isn't an error nor a bug, that's a feature. :geek: :P :lol: (Already taken, uh?)

    That's intentional, this extension has been created on purpose for a Graphic's Online Courses website, I thought the Students and Teacher would benefit in having the filename on front of them while reading the quotes in the discussion. To add, that's the normal behaviour of phpBB without this ext, let's see how the attached images are quoted:

    Attachment IMG (regular) http://prntscr.com/ebsxnk
    (up side, underneath is the quoted attachment with QAIP)

    Attachment IMG (inline) http://prntscr.com/ebszu6 without QAIP

    Attachment as LINK http://prntscr.com/ebt1t2 without QAIP
    Attachment as LINK http://prntscr.com/ebtlu7 with QAIP (same attachment link quoted as image)

    As you can see then, the quoted images are appended (literally) to the event's message parser, before of the closing QUOTE tag being replaced (previously stripped) and the arrays merged and post data sent back to the event itself, preserving the native behaviour. At the end, and because the filename in the quoted post isn't necessary at all for the extension to work, you could delete it before to click on Submit.

    If you read the code you will see my code comment:
    * Put the quoted image on a new line after its real filename
    I didn't modify that behaviour from the adapted snippet for the reasons as per above. :)

    If you ask, yes, it could be possible to have a select box for that, like "Do you like the filename to be shown in the quoted message?". If you so wish, please open a feature request there on GitHub, I will take a look at this sooner or later.

    Thanks for feedback. :)
    🆓 Free support for our extensions also provided here: phpBB Studio
    🚀 Looking for a specific feature or alternative option? We will rock you!
    Please PM me only to request paid works. Thx. Buy me a coffee -> Image
    My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
    User avatar
    HiFiKabin
    Community Team Member
    Community Team Member
    Posts: 6817
    Joined: Wed May 14, 2014 9:10 am
    Location: Swearing at the PC, UK
    Name: James

    Re: [3.1][3.2][BETA] QAIP - Quote Attachments Img in Posts

    Post by HiFiKabin »

    Nope, theres no problem with the name being shown. I just didn't understand the whys and wherefores of it being there. (thats why I put 'error' in quotes )

    My users are loving it already
    User avatar
    pierredu
    Registered User
    Posts: 1274
    Joined: Thu Nov 01, 2012 8:04 am
    Location: Paris (France)

    Re: [3.1][3.2][BETA] QAIP - Quote Attachments Img in Posts

    Post by pierredu »

    Indeed a fantastic extension !!
    User avatar
    2600
    I've Been Banned!
    Posts: 2567
    Joined: Fri Nov 14, 2014 5:14 pm
    Location: Area-51

    Re: [3.1][3.2][BETA] QAIP - Quote Attachments Img in Posts

    Post by 2600 »

    Thanks a million! It works like a charm and in fact it works with the AWS S3 extension too! I've requested this extension like two or three times and no one took interest. Finally! 8-)
    Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
    Hack me.
    Consider a canary token.
    The nature of my chosen username
    :ugeek:
    User avatar
    3Di
    I've Been Banned!
    Posts: 17538
    Joined: Mon Apr 04, 2005 11:09 pm
    Location: I'm with Ukraine 🇺🇦
    Name: Marco

    Re: [3.1][3.2][BETA] QAIP - Quote Attachments Img in Posts

    Post by 3Di »

    Thank you all for the positive feedback, guys.
    I am glad that you find it useful and are enjoying this extension. :)
    🆓 Free support for our extensions also provided here: phpBB Studio
    🚀 Looking for a specific feature or alternative option? We will rock you!
    Please PM me only to request paid works. Thx. Buy me a coffee -> Image
    My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
    User avatar
    3Di
    I've Been Banned!
    Posts: 17538
    Joined: Mon Apr 04, 2005 11:09 pm
    Location: I'm with Ukraine 🇺🇦
    Name: Marco

    Re: [3.1][3.2][BETA] QAIP - Quote Attachments Img in Posts

    Post by 3Di »

    Breaking news: a bug has been catched, If a user "quotes" a post that is in a poll, the bbcode break and the parsed message results in a mess.

    Here's a quick hack which prevents this issue, in the meantime I will provide a new version.

    Please note, with this hack the topics which are polls are not anymore under the supervision of QAIP, I mean the original features of phpBB are rolled back, within POLLs.
    (Quoted IMGs are not controlled by QAIP over there).

    Open the file /ext/threedi/qaip/event/main_listener.php and FIND this line

    Code: Select all

    if ($mode == 'quote' && !$submit && !$preview && !$refresh)
    REPLACE the above line with this one

    Code: Select all

    if ( $mode == 'quote' && !$submit && !$preview && !$refresh && (empty($post_data["poll_title"])) )
    SAVE the file back and use it, no need to disable the extension at all.

    A new version it is scheduled, with a concrete fix.

    Thanks.
    🆓 Free support for our extensions also provided here: phpBB Studio
    🚀 Looking for a specific feature or alternative option? We will rock you!
    Please PM me only to request paid works. Thx. Buy me a coffee -> Image
    My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades

    Return to “Extensions in Development”