Main Menu

Anwyn

Novus 2nd Edition

Novus 1st Edition

Author Topic: Inline Images  (Read 3975 times)

0 Members and 1 Guest are viewing this topic.

Offline Rasyr

  • Administrator
  • Hero Member
  • *****
  • Posts: 2628
  • Karma: +3/-0
    • View Profile
Inline Images
« on: January 08, 2022, 05:24:55 AM »
Before today, to post images in a message, you first had to attach them, and then go back and edit the message to put the full URL of the attachment in an IMG tag.

I have just added a Mod that should allow for attaching files and including them in messages at the same time.

Quote
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

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.


I am attaching an image as an example. In this example, I am simply clicking on the "Inset Attachment" link beside where you add the attachment, and not including any extra parameters.

 

* 2e_Cover.jpg
(Filesize: 240.36 KB)
(Dimensions: 673x871, Views: 470)