BNS Inline Asides
Have you ever wanted to add a personal comment into the body of a post or page and have it stand out from the rest of the content?
Have you really wanted to throw a rant in a review because the subject just really got under your skin but you don’t want to dramatically disrupt the content?
This plugin will allow you to style sections of the post, or page, content with a shortcode that can add more emphasis by leveraging a style element from the active theme.
These asides can be left open as part of the content flow; or these asides can be closed to leave your readers the option of opening them if they choose to.
Download
Latest version: Download BNS Inline Asides v0.6.1 [zip]
Installation
This section describes how to install the plugin and get it working.
- Go to the “Plugins” menu in the Administration Panels (“dashboard”).
- Click the ‘Add New’ link.
- Click the “Upload” link.
- Browse for the bns-inline-asides.zip file on your computer; upload; and, install accordingly.
- Activate.
– or -
- Go to the “Plugins” menu in the Administration Panels (“dashboard”).
- Click the ‘Add New’ link.
- Search for BNS Inline Asides.
- Install.
- Activate.
Please read this article for further assistance: http://wpfirstaid.com/2009/12/plugin-installation/
Usage
This plugin makes use of WordPress Shortcode API (additional information can be found in the codex here: http://codex.wordpress.org/Shortcode_API)
The basic shortcode usage is [aside]CONTENT[/aside]. The default values of the shortcode are type: aside; and, status: open.
[aside]CONTENT[/aside] = [aside type="aside" status="open"]CONTENT[/aside]
To use the [aside] shortcode and have it initially “closed” any status other than “open” will work as the plugin will change the status to “closed” if it is not equal to “open”.
Some pre-defined aside types are currently available:
- Note – uses the theme element’s default text color on a Light Grey background
- Rant – uses black text on a red background with a non-repeating flame graphic
See the frequently asked questions section for how to add your own custom type.
FAQ
Q. How can I style the plugin output?
A. To add your own custom aside type styles you might consider creating a new stylesheet in this plugin’s folder using the name: bnsia-custom-types.css
The plugin will create a class name from the custom aside type you use in your shortcode. For example, [aside type="bacon"] will generate these classes you can style:
- .open-aside.bacon
- .close-aside.bacon
- .bnsia.aside.bacon
- blockquote.aside.bacon
- p.aside.bacon
This method can also be used to over-write the Pre-Defined Aside Types styles as the bnsia-custom-types.css file loads after the main stylesheet.
The bnsia-custom-types.css stylesheet should not be over-written by updates.
Q. How do I use the ‘show’ and ‘hide’ parameters?
A. If you do not want to use the default ‘show’ and ‘hide’ parameters, you can change them to your own preference in each instance of the shortcode. If you want your aside type to be dynamically inserted into the message simply use the %s placeholder in your custom message.
Here are some examples:
[aside type="bacon" show="Want to see my <em>%s</em>?" status="closed"][aside type="soup" hide="No %s for you!"]
Changelog
0.6
- released November 2011
- confirmed compatible with WordPress version 3.3
- added PHPDoc style documentation
- added
BNS Inline Asides TextDomaini18n support - added
BNS Theme Elementto set CSS element to be used - added
bnsiaclass (to be used as default) - removed
is_admincheck from enqueue action function (not needed) - removed ‘span’ support; going forward with block display elements only
0.5
- released June 2011
- re-wrote the enqueue stylesheets code to be more correct
0.4.1
- enqueued stylesheets
- released May 23, 2011
0.4
- verified to work with WordPress version 3.2-beta1
- re-wrote the BNSIA_PATH define statement
- re-wrote the stylesheet paths to use BNSIA_PATH
- released May 23, 2011
0.3
- verified to work with WordPress version 3.1.2
- added new parameters to allow end-user to define ‘show’ and ‘hide’ messages
- released: May 7, 2011
0.2
- add the ‘span’ element
- fix readme markup issues
0.1
- Initial Release.
- Released: February 20, 2011






13 Comments
Hi!
Nice work!
Is there a way that I can have an in-line link to the aside rather than the message? I’m thinking of defining words, adding details, you know, aside sorta stuff, but more cleanly.
Thanks again for developing this plug-in!
JP
If I can just tell the plug-in not to do a carriage return, so that the aside stays on the same line next to its object (still right-justified) that would be very useful as well. Probably obvious, I’m just not seeing it!
JP
@JP – To just use the plugin for a few words within a paragraph would be better suited to adding
<span>tags around them with an appropriate class to style …… and along those same lines, if you change the plugin to use a ‘<span>’ then this may also accomplish what you are looking to do.
PS: I may look at adding the ‘<span>’ to the plugin code myself but it may be a while before I get back to working on this plugin. EAC.
Hi Edward,
Thanks for the fast reply!
Would I just replace block quote or with ?
JP
@JP – It would be a little involved but here is the basic outline:
- make back-ups of the plugin files
- open the main plugin file and look at line 89; add you element using the same format or change the ‘blockquote’ one
- open the plugin stylesheet and duplicate every instance of blockquote using the element you added …
… I’ll see about doing an update that adds the ‘span’ element (it will still need to be manually activated).
@JP – Have a look at version 0.2 which I just uploaded. All you have to do to start is comment out the blockquote element and un-comment the span element … it still needs some work but your welcome to have a run at it.
Edward,
WOW! That’s wonderful, thanks!
I’ll play with it and let you know how it goes. I rely pretty heavily on Dreamweaver, so when I have to get into the code manually I have to stop and ponder for a while. Probably good for me!
Best regards,
Brian
Well, I don’t have it on the same line, but this is moving in the right direction.
‘http://wildsideassociates.com/recreation-parks-and-greenspace/’
JP
@JP – That’s a nice implementation. Well Done!
[...] This may just be another excuse for me to use my BNS Inline Asides plugin; but, it is also yet another example of what it can be used [...]
Great Plugin, Cais!
One feature I’d love to see is a shortcode parameter to specify the displayed link text (i.e. the hard-coded “To see the %s click here.”) Since I have need for this very functionality, I’m going to hack it up myself. Would you like a patch when I’m done?
@Chip – Thanks! … and yes, I would be interested in seeing it.
I considered many versions of the “displayed link text” before choosing the current phrase; and, I agree, having a different text string per instance would add a great deal to the usefulness of the plugin.
@Chip – Have a look at version 0.3 … I added the feature you suggested. Of course, the plugin is still in its early stages so there may be additional fine tuning that can still be done.