Additional Info
Type
Package ID
Dougiefresh:ILA
First Created
August 02, 2013, 05:05:55 PM
Last Updated
November 09, 2023, 03:57:01 PM

Post and PM Inline Attachments v7.11

Allows user to include attachments in the content of their post
Compatible With 2.0.14, 2.0.15, 2.0.17, 2.0.18, 2.0.19, 2.1.1, 2.1.2, 2.1.4
Latest version v7.11
Downloads 4,726
Reviews 0
Rating 0/5
Subscribers 23
License BSD 2-Clause "Simplified" License (View License)




Post and PM Inline Attachments
For SMF 2.0 and SMF 2.1
v7.11


By Dougiefresh and GL700Wing
Link to Mod



Introduction
This mod adds the ability to position your attachments inline in either a forum post or personal message using the [attach id=n msg=NNNN] BBCode where n is the number of the attachment in the post/message (eg: first = 0; second = 1; etc) and, for forum posts, NNNN is the forum message number.





NOTES FOR SMF 2.0

In order to fully support the Automatic Attachment Rotation (and Resize) mod you must install this mod first!!
Also, if you subsequently need to uninstall this mod you must uninstall the Automatic Attachment Rotation (and Resize) mod beforehand.

In order to support inline attachments in personal messages (PMs) you must install the PM Attachments mod **version 2.6 or later** before you install this mod!!
Also, if you subsequently need to uninstall the PM Attachments mod you must uninstall this mod beforehand.

The SMF default WYSIWYG editor will be disabled when this mod is installed because if it is enabled the '(Insert Attachment)' link will not work.

** IMPORTANT NOTE FOR FORUMS USING TAPATALK **
If the Tapatalk plug-in is subsequently updated/reinstalled this mod must be uninstalled and reinstalled as it updates some of the Tapatalk plug-in files.  Failure to do this may result in Tapatalk timing out when displaying boards, unread posts, etc.




NOTES FOR SMF 2.1

Support has been added for SMF 2.1 to provide backward display and print page compatibility for ILA BBCodes in existing posts of forums that used this mod prior to being upgraded from SMF 2.0.  In addition, Print Page image layout/formatting is the same as when this mod was installed on SMF 2.0.

Support will not be added to this mod for inserting attachments inline.

Unfortunately, and because a message may contain a mix of ILA BBCodes and native SMF 2.1 BBCodes for attachments that are inserted inline, it is not possible to remove an obsolete ILA BBCode (eg, [attach id=4 msg=5678]) from the body of a message when an attachment is deleted.
Therefore, if an attachment that was inserted inline into a message by this mod is subsequently deleted the message must be saved and then edited again to remove the ILA BBCode that refers to the deleted attachment (eg, [attach id=4 msg=5678]) before more attachment are added to the message.
If this procedure isn't followed the text "[ Invalid Attachment ]" may appear when the message is displayed/printed and/or if another attachment is added it will be displayed/printed in the message using the ILA BBCode (eg, [attach id=4 msg=5678]) that refers to the deleted attachment.





New BBCodes
This mod supports five new BBCodes in order to position your attachments inline:
o attachment => Show full expanded picture
o attach => Show thumbnail, expandable to full picture
o attachthumb => Show thumbnail ONLY, not expandable
o attachmini => Show thumbnail, expandable to full picture
o attachurl => Shows attachment size, image dimensions, and download count; no picture

Version 1.x BBCodes Parameters
Each new BBCode accepts the following formats:
[attach={id}][/attach]
[attach={id},{width}][/attach]
[attach={id},{width},{height}][/attach]

In each case, {id} is the attachment number relative to the topic, {width} is the max desired width, {height} is the max desired height, {pixels} is the number of pixels surrounding the image, and {float} can be either left, right, or center.  All text between the opening and closing attachment tags is discarded.

Version 2.0+ BBCode Parameters
Version 2.0+ introduced a new format that allows the following parameters:
[attachment id={id} {parameter}={value}][/attachment]

Allowed parameters:
id{attachment id}    ID number of the attachment to show inline (NOT attachment number!)
width{width}Desired width of image to show.  Valid: positive integers.
height{height}Desired height of image to show.  Valid: positive integers.
float{float}Floats image to relation to everything else.  Valid: left, right, center
margin{pixels}Margin around inline attachment.  Valid: positive integers
margin-left{pixels}Left margin around inline attachment.  Valid: positive integers
margin-right{pixels}Right margin around inline attachment.  Valid: positive integers
margin-top{pixels}Top margin around inline attachment.  Valid: positive integers
margin-bottom    {pixels}Bottom margin around inline attachment.  Valid: positive integers
border-style{style}Border style.  Valid: none, dotted, dashed, solid, double, groove, ridge, inset, outset
border-width{pixels}Border width around inline attachment.  Valid: positive integers
border-color{color}Border color.  Valid formats: plain text, #xxx, #xxxxxx, rbg(d,d,d)
scale{answer}Override scaling of image.  Valid: true, false, yes, no
msg{msg ID}Message ID number.  Valid: positive integers.
In each case, {id} is the attachment number relative to the topic, {width} is the max desired width, {height} is the max desired height, {pixels} is the number of pixels surrounding the image, and {float} can be either left, right, or center.  All text between the opening and closing attachment tags is discarded.

Version 3.0+ BBCode Format
Version 3.0 makes further changes and allows the use of the inline attachments BBCodes without closing brackets, as well as using attachments from another post!

Version 3.11+ BBCode Format
Version 3.11 makes further changes and allows the use of closed tags, like [attach].  This new form is auto-numbered!
Note that the [attach] tag is processed first, then [attachment], then [attachmini], then [attachthumb], then [attachurl].

Other Mod Features
o Error Text strings are shown for invalid/missing/deleted attachments.
o Inline attachment processes takes place in the parse_bbc function, which means any parsing requests can benefit from this mod!
o Text string is shown as alternative in code.
o Adds [Insert Attachment x] next to each attachment/upload box to insert the BBCode.
o Attachments used by the inline attachments mod can be omitted from the attachment display at the bottom of the post.
o Reloads the attachments for Ajax Editing.
o Removing an attachment removes the attachment BBCode for that attachment & changes remaining attachment tags to ensure proper post appearance.
o Text between inline attachment brackets are removed (as of version 3.0).
o Automatic modification of boilerplates that use the ILA tags within them when changing "1-based" numbering option.
o For print page view - option to show inline images in the message body, and to show non-inline images and list non-image attachments below the message body.

Admin Settings
The BBCode may be disabled by going to Admin -> Forums -> Posts and Topics -> Bulletin Board Code and unchecking the attachment BBCode.

On the Admin -> Layout -> Attachments and Avatars -> Inline Attachments page, there are several new options:
o Remove attachment image under post after in-post use.
o Use "One based numbering" for attachment IDs (first attachment is 1 instead of 0).
o Allow quoted attachment images from another post.
o Show download link and counter under inline attachment, like non-inline attachments.
o Turn off "nosniff" option for IE and Chrome browsers.
o Whether "attach" tag is the same as the "attachment" tag.
o Allow playing inline attachments that are videos.
o Use Highslide effects for inline attachments. (Only if supported Highslide mod is installed)
o Show EXIF information. (Only if EXIF mod is installed)
o Display attachments below the post in a line/row (the number of attachments per row/line can be configured). (v7.00 onwards)
o Separate download link and counter for attachments displayed below post. (v7.00 onwards)

Attachment Download Permissions (v7.00 onwards for SMF 2.0 only)
o Added 'Do NOT allow attachments displayed inline to be downloaded' and 'Do NOT allow attachments displayed below post to be downloaded' permissions to prevent attachments displayed inline and/or below the post from being downloaded (only thumbnails and/or attachment names will be shown).  Configured via Admin -> Permissions -> General Permissions.  Can be configured for membergroup and/or board permission profiles.

Compatibility Notes
This mod was tested on SMF 2.0.17, but should work on SMF 2.0 and up.
SMF 1.x is NOT supported.
SMF 2.1 will NOT be supported for inserting attachments inline as this is a standard feature of SMF 2.1.

The following mod (not required) must be installed after this mod:
o Automatic Attachment Rotation (and Resize)

These mods (not required) must be installed before this mod:
o Tapatalk plug-in**
o Who Downloaded Attachment
o Anti-Spam Links
o Highslide Image Viewer
o HS4SMF v0.8.1
o PM Attachments

These mods (not required) can be installed at any time:
o JQLightBox
o SCEditor4Smf
o EXIF
o Boilerplates for Posts
o Lazyload
o SMFPacks Advanced Editor
o Play Media Attachments

The following mods (not required) may also be installed before versions of this mod prior to v7.00 - they are not compatible with v7.00 and must be uninstalled prior to installing v7.00 or later.
o Custom View of Attachments
o New Hooks (Required for Custom View of Attachments)

The following mod (not required) may also be installed before versions of this mod prior to v7.03 - it is not compatible with v7.03 and must be uninstalled prior to installing v7.03 or later.
o Images on Print Page

Translators
o Dutch: @rjen
o Spanish Latin: RockLee

License
QuoteCopyright (c) 2014-2020 Douglas Orend, 2018-2023 Kathy Leslie
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer; and
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Post_and_PM_Inline_Attachments_v7.08.zip
134.57 KB v7.08 2.0.19, 2.1.2
Post_and_PM_Inline_Attachments_v7.11.zip
183.29 KB v7.11 2.0.19, 2.1.4
Manual installation info
You have to register or login to be able to leave a review
There are currently no reviews on this customization
Advertisement: