Page 1 of 7

[CDB] QAIP - Quote Attachments Img in Posts

Posted: Sat Feb 18, 2017 6:23 am
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.

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

Posted: Sat Feb 18, 2017 6:23 am
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

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

    Posted: Sat Feb 18, 2017 6:24 am
    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.

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

    Posted: Sat Feb 18, 2017 6:24 am
    by 3Di
    Image

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

    Posted: Sat Feb 18, 2017 5:34 pm
    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:

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

    Posted: Sat Feb 18, 2017 5:46 pm
    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

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

    Posted: Sat Feb 18, 2017 9:00 pm
    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).

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

    Posted: Mon Feb 20, 2017 11:23 pm
    by 3Di
    First Public release available, see first post and following.

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

    Posted: Tue Feb 21, 2017 11:08 am
    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

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

    Posted: Wed Feb 22, 2017 1:10 am
    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. :)

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

    Posted: Wed Feb 22, 2017 9:31 am
    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

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

    Posted: Thu Feb 23, 2017 4:18 pm
    by pierredu
    Indeed a fantastic extension !!

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

    Posted: Thu Mar 02, 2017 4:04 pm
    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-)

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

    Posted: Fri Mar 03, 2017 1:00 am
    by 3Di
    Thank you all for the positive feedback, guys.
    I am glad that you find it useful and are enjoying this extension. :)

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

    Posted: Wed Mar 22, 2017 12:58 am
    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.