News:

Wondering if this will always be free?  See why free is better.

Main Menu

Image Floating to Left or Right BBCode

Started by dougiefresh, December 01, 2014, 05:57:11 PM

Previous topic - Next topic

dougiefresh

Uploaded v1.9 - April 4th, 2015
o Updated for SMF 2.1 Beta 1
o Fixed image upload location within package-info.xml

dougiefresh

Uploaded v1.10 - May 1st, 2015
o Fixed missing BBCode button in editor for SMF 2.1 Beta 1.

dougiefresh

Uploaded v1.11 - May 2nd, 2015
o Fixed package-info.xml so that image is placed in correct folder.

dougiefresh

Uploaded v1.12-  July 12th, 2015
o Added "margin", "margin-left", "margin-right", "margin-top" and "margin-bottom" parameters.

Steve

Sweet! I've switched from a different floating image mod to this one because of the flexibility you've added. Nicely done Dougie. :)
DO NOT pm me for support!

dougiefresh

Uploaded v1.13 - July 24th, 2015
o Added "border-style", "border-width" and "border-color" parameters.

@Everybody:  Here is the information about the new parameters:
Quote
alt - Alternate text if the event that the image can't be displayed.
width - Width of the image.  Expressed in pixels.
height - Height of the image.  Expressed in pixels.
margin - Margin around the image.  Expressed in pixels.
margin-left - The image's left margin.  Expressed in pixels.
margin-right - The image's right margin.  Expressed in pixels.
margin-top - The image's top margin.  Expressed in pixels.
margin-bottom - The image's bottom margin.  Expressed in pixels.
border-style - Border style.  Valid answers: dotted, dashed, solid, double, groove, ridge, inset, outset
border-width - Border width.  Expressed in pixels.
border-color - Border color.  Expressed either as #xxx, #xxxxxx, rbg(x,x,x), or {text}


Steve

Awesome. Will give this new version a go this weekend. ;D
DO NOT pm me for support!

Steve

#27
Can't get this to work dougie. Uninstalling the previous version then installing this causes all posts that I've used this in to not show the image.

Reverting back to the previous version makes them show as they originally did.

Edit: Forgot to show you the error it throws:

8: Undefined offset: 1
Apply Filter: Only show the errors from this file
File: /home/*****/public_html/forums/Sources/Subs-BBCode-Float.php
Line: 70
DO NOT pm me for support!

dougiefresh

Uploaded v1.14 - July 27th, 2015
o Removed code that attempted to make the image responsive.
o Rewrote to make "border-style" mandatory for use with "border-width" and "border-color".
o Added tags without "border-style", "border-width", or "border-color" parameters.




@Steve:  Whoops!  Sorry about that.  It's been fixed, and a few minor changes added...

Steve

No worries. Appears to be working now. Will play with the parameters when I get a chance. ;D
DO NOT pm me for support!

Steve

Okay, how are the parameters used? For example, if I wanted a 3 pixel wide solid red border, how would I write that?
DO NOT pm me for support!

dougiefresh

Quote from: Steve on July 28, 2015, 12:47:59 PM
Okay, how are the parameters used? For example, if I wanted a 3 pixel wide solid red border, how would I write that?
Let's assume you're going to use the imgleft tag.  You would use it like this:
[imgleft border-stye=solid border-width=3 border-color=red]{url}[/imgleft]
where {url} is the image URL you want to show.

Steve

Ah, so just spaces between parameters then. Thanks Dougie! ;D
DO NOT pm me for support!

dougiefresh

UPDATE: Yesterday, I was notified of a potentially "fatal flaw" in SMF's bbcode parser function.  The parser generates an array with all possible permutations of the parameters, and thus can run out of memory when dealing with a bbcode tag with a large number of parameters.  I've solved this problem in my Post and PM Inline Attachments mod, and I'm going to attempt to solve it for this mod as well....  It's a little more complicated because of the "alt" parameter in the mess of things....

dougiefresh

Uploaded v1.15 - July 30th, 2015
o Performance increase due to modification of parse_bbc function to deal with memory issue found.

Steve

Something be wrong dougie ... can't get it to work.

8: Undefined offset: 1
Apply Filter: Only show the errors from this file
File: /home/*****/public_html/forums/Sources/Subs-BBCode-Float.php
Line: 142
DO NOT pm me for support!

dougiefresh

#36
Can you show me the message with bbcode tags that you're trying to insert?

EDIT: Never mind!  The error occurs when no parameters are given....   Gonna upload a new version shortly....

dougiefresh

New version has been uploaded.  Somehow the download counter still read 0, so I didn't change the version number on the reuploaded mod....

Steve

Appears to be working now. Thanks for the quick fix. :)
DO NOT pm me for support!

dougiefresh

Uploaded v1.16 - August 8th, 2015
o Fixed the imgleft and imgright so that the images are floated to left/right of DIV area.
o Fixed issue with "fix parameter order" function so that it displays expected output.

Advertisement: