Main Menu

Novus

Welcome, Guest. Please login or register.
Did you miss your activation email?

May 27, 2022, 11:22:33 AM

Login with username, password and session length

Recent

Random Quotes go here...

Author Topic: Inline Images  (Read 155 times)

Offline Rasyr

  • Administrator
  • Newbie
  • *****
  • Posts: 33
  • Karma: +0/-0
Inline Images
« on: January 21, 2022, 07:54:44 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.

  [ You are not allowed to view this attachment ]