Special Text Boxes is very simple, very little and very useful WordPress plugin (for me and, I hope, for you). It adds little style sheet file and short code to blog for highlighting some portion of text in post as colored boxes. That may be warning, alert, info and download portion of post’s text.
(This post is available on russian language.)
Support Forum for this plugin.
Examples
CSS mode


Javascript mode


Installation
- Unpack plugin archive file.
- Put plugin folder to WordPress
wp-content/pluginsfolder. - Activate plugin on Admin page.
Settings
You can set border style, text shadow, box shadow and Allow or disable rounded corners for your special text boxes.
Available languages of Admin Panel:
- English
- Russian
- Italian by Gianni Diurno
- Belarus by Fat Cower
- Uzbek by Alisher Safarov
- Polish by Daniel Fruzynski
- Arabic by مدونة رسين
- Dutch by Rene
- Ukrainian by official ukrainian localization team
- German by Renate
- Czech by Stanislav Čihák
If you want and can translate this plugin to your language, do it, and send me .po file by e-mail (minimus AT simplelib.com). Thanks.
Styles Repository
Starting with version 4.0.65 plugin allows you to have as many styles as you want. All styles are stored in the styles repository (database table) and can be customized to suit every taste. Styles fall into two categories: predefined (system and special) styles, and custom styles. The parameters of all styles can be changed by blog administrator. The difference is that the slugs (unique names) can be set only for custom styles. Slugs for predefined styles can not be changed.
Use this repository to customize existing and create new styles of blocks.
Usage
To embed special textbox to your post, use short code as this:
OR
[stextbox id="defined_id" caption="Some Caption"]Highlighted text and/or short code(s)[/stextbox]
where defined_id may be alert, download, info, warning, black, custom and gray.
You can insert short code(s) of another plugin(s) inside wp-special-textboxes short code. For example:

Customising “On The Fly”

Customisation Short Code Options:
- color – body font color
- ccolor – caption font color
- bcolor – border color
- bgcolor – background color (CSS mode) or start color of background gradient (Javascript mode)
- bgcolorto - stop color of background gradient (Javascript mode only)
- cbgcolor – caption background color (CSS mode) or start color of caption background gradient (Javascript mode)
- cbgcolorto - stop color of caption background gradient (Javascript mode only)
- image – full URL of pictogram image. Use null value as URL to disable image output
- big – use this parameter in case plugin settings are different with your needs. May be true or false. CSS mode only.
- mode – drawing mode (css|js)
- float – turn on floating mode of Special Text Box. May be true or false.
- align – alignment of box in float mode. May be left or right.
- width – width of box in float mode (pixels)
- collapsed – display STB in collapsed mode if collapse/expand mode enabled. May be true or false.
- mleft – left margin in px.
- mright – right margin in px.
- mtop – top margin in px.
- mbottom – bottom margin in px.
- collapsing – allow/disable collapsing (default|true|false)
- defcaption – allow using name of style as caption of block (true|false)
- direction – language direction (default|ltr|rtl)
You can use Insertion Dialog to insert short code to post. Just select text you needed and click “Insert Special Text Box” button.
Special Text Box anywhere in blog
You can use function stbHighlightText to output Box anywhere in your blog.
This function defined as
|
1 |
function stbHighlightText( $content = null, $id = 'warning', $caption = '', $atts = null ) |
- $content – text in the Box (string)
- $id – ID of Box (string)
- $caption – caption of Box if needed (string)
- $atts – extended attributes of Box (array)
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
atts = array( 'id' => 'warning', 'mode' => '', 'level' => 0, 'caption' => '', 'defcaption' => '', 'color' => '', 'ccolor' => '', 'bcolor' => '', 'bgcolor' => '', 'bgcolorto' => '', 'cbgcolor' => '', 'cbgcolorto' => '', 'bwidth' => '', 'image' => '', 'big' => '', 'float' => 'false', 'align' => 'left', 'width' => '200', 'collapsed' => '', 'mtop' => '', 'mleft' => '', 'mbottom' => '', 'mright' => '', 'direction' => '', 'collapsing' => 'default', 'shadow' => '' ); |
- color – body font color (six HEX digits of color without # as string)
- ccolor – caption font color (six HEX digits of color without # as string)
- bcolor – border color (six HEX digits of color without # as string)
- bgcolor – background color (CSS mode) or start color of background gradient (Javascript mode) (six HEX digits of color without # as string)
- bgcolorto – stop color of background gradient (Javascript mode only) (six HEX digits of color without # as string)
- cbgcolor – caption background color (CSS mode) or start color of caption background gradient (Javascript mode) (six HEX digits of color without # as string)
- cbgcolorto - stop color of caption background gradient (Javascript mode only) (six HEX digits of color without # as string)
- image – full URL of pictogram image. Use null value as URL to disable image output (string)
- big – use this parameter in case plugin settings are different with your needs. May be true or false (boolean as string). CSS mode only.
- mode - drawing mode (css|js)
- float – turn on floating mode of Special Text Box. May be true or false. (string)
- align – alignment of box in float mode. May be left or right. (string)
- width – width of box in float mode (pixels) (string)
- collapsed – display STB in collapsed mode if collapse/expand mode enabled. May be true or false. (string)
- mleft – left margin in px.
- mright – right margin in px.
- mtop – top margin in px.
- mbottom – bottom margin in px.
- collapsing – allow/disable collapsing (default|true|false)
- defcaption - allow using name of style as caption of block (true|false)
- direction - language direction (default|ltr|rtl)
- level – nesting level of the block. Only Javascript mode. Allows you to defer the drawing of the indoor block as long as parent block will be drawn. (0|1)
- shadow – enables/disables shadow of block vs default settings
You can partially define atts array (version 2.0.22+). For example:
|
1 2 3 |
<?php stbHighlightText('This is content', 'warning', 'This is caption', array('image' => "http://www.simplelib.com/images/wp-b.png", "big" => "true")); ?> |
or
|
1 2 3 4 5 6 |
<?php if(class_exists('StbBlock')) { $block = new StbBlock('This is content', 'warning', 'This is caption', array('image' => "http://www.simplelib.com/images/wp-b.png", "big" => "true")); echo $block->block; } ?> |
In this example the image of block was redefined as “wp-b.png” image and this one was defined as big image.
Inserting Special Text Box into Special Text Box
If you want insert one STB to another, you can use additional short code “stb“. For example:
CSS mode

Javascript mode

Special Text widget

Special Text widget. Admin Page
Download
Special Text Boxes
Highlights any portion of text as text in the colored boxes.
Author: minimus, version: 4.3.72, updated: February 13, 2012,
Requires WP version: 3.0 or higher, tested up to: 3.3.2.
Download (66 251 hits) 



(32 votes)
Tests

2. Mozilla FireFox 3 .. 9
3. Opera 10.0 .. 11.52
4. Google Chrome 1.0.154.53 .. 15.0.874.121
5. Apple Safari 3.1.2 .. 5.1.1
Awards
© 2009 – 2013, minimus. All rights reserved.
Popularity: 97%


Hello! Thank you for this plugin! Its realy very good!
But I have a wish. Сan you make opening and closing of the block by click on the title? or is it done? If it’s done how can I use it?
Total Comments by Alex: 2
Wait new (4) version… Example!
It’s great! Thank you!
Total Comments by Alex: 2
Hello! When will be the update?
Total Comments by Mike: 2
Very soon …
I like the look of the new version, however the new version doesn’t render inside the wordpress post tabs plugin anymore. I assume it’s because of javascript. This conflict will likely kill many uses for your users who are trying to use special text boxes inside other plugins. Can this be fixed somehow?
http://wordpress.org/extend/plugins/wordpress-post-tabs/
Total Comments by dgodfather: 10
Thanks for info! I will think how to fix it …
Try these changes in file stb-class.php:
Line 74:
to
And line 274:
to
I want to know result of changes!
This didn’t change anything.
Total Comments by dgodfather: 10
Any other suggestions?
Total Comments by dgodfather: 10
I am having the same problem of not showing up in Post pages.
I see a very tiny box (2-5 pixels square) in the upper left corner of the post.
eDave
Total Comments by eDave: 20
Try this beta of next version …
This version does not fix my problem.
Total Comments by dgodfather: 10
If you add a checkbox option into the settings to not load your bundled version of jquery it may fix my problem. I think it may be trying to load multiple versions or the same library.
Total Comments by dgodfather: 10
URL of blog?
http://profaneentertainment.com/league/frag-league-wiki/
Total Comments by dgodfather: 10
Firebug for Firefox reports this:
opts.textShadow is undefined
http://profaneentertainment.com/league/wp-content/plugins/wp-special-textboxes/js/jquery.stb.min.js?ver=4.1.68
Line 7
Total Comments by dgodfather: 10
This too:
Component returned failure code: 0×80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIDOMCanvasRenderingContext2D.fillText]
http://profaneentertainment.com/league/wp-content/plugins/wp-special-textboxes/js/jquery.stb.min.js?ver=4.1.68
Line 7
Total Comments by dgodfather: 10
Look over here! Do you like it?
It looks good in IE (but not FF – see attached), however I’d like to use the javascript method. I’m not having problems with the CSS method.
Firefox – http://postimage.org/image/esufwi8bf/
Total Comments by dgodfather: 10
Look again! You can test it…
Looks great and works great! Thanks for creating a fix. I really do appreciate it.
Total Comments by dgodfather: 10
The beta didn’t fix my problem either
Total Comments by eDave: 20
URL?
http://atwatermerced912ers.com/
http://atwatermerced912ers.com/2010/03/17/mission-statement/
look in the page source and you will see the table missing that shows up as two cells only.
Our Mission
To propagate the Founders Constitutional values and to preserve the Republic under God through self education.
Our Vision
To become aware, articulate and persuasive individuals – comfortable and confident to speak boldly on our personal values.
Total Comments by eDave: 20
I did figure out that this is a problem in Javascript mode, but not in CSS mode.
Total Comments by eDave: 20
Hey Minimus,
Using your plugin on a couple of blogs, been very impressed with the last few round of updates, you’ve really taken it up a notch. On one blog though I found the latest update stopped the short code tags working altogether. The plugin backend functions fine and it doesn’t hinder any blog functionality it just doesn’t add the text box styling in to pages/posts.
Any ideas or can a way to contact you to go through see if we can find the bug?
Total Comments by Craig: 2
Give me URL of page containing bug of STB output …
Bug is fixed. Try fixed version …
Hey,
Thanks for the reply, sorry I was a little slow trying out the modded version.
Still not go JS version working but CSS collapsing boxes work now.
http://bit.ly/sjdFn7 is the page I am testing this stuff on, was all working fine until last update!
I have “mixed” mode on at the moment
Total Comments by Craig: 2
I made some changes – you must redownload plugin again… It’s needed for debug…
Love the plugin! Good Stuff
the text and graphics on the right hand side of the javascript dropdown box is overlapping to the post with outside of the box. take a look at the second box on the sticky post. tnx
http://bootsnslippers.com/
Total Comments by eDave: 20
Thanks for good words!
About overlapping! I can not do anything in this case, since the width of child element (content of box) is more than width of parent element (content of post). Sorry!
I see that in the graphic, but the text should be wrapping?
Total Comments by eDave: 20
Also, the smaller graphic is right justified, and overlapping the STB boarders.
Total Comments by eDave: 20
No! The big image increases width of the parent container and the text is arranged according to new width of the container containing it.
When I upgraded to the latest version of WordPress, or maybe it was when I upgraded the SPT plugin, Special Text Boxes stopped working. Thanks for any help you can provide.
Total Comments by Rick: 3
Sorry, I meant to say STB no SPT
When I upgraded to the latest version of WordPress, or maybe it was when I upgraded the SPT plugin, Special Text Boxes stopped working. Thanks for any help you can provide.
Total Comments by Rick: 3
FIXED, please disregard my previous comments. Special Text Boxes magically reappeared and everything looks beautiful. I think the problem was that after the upgrade I needed to change the settings for Special Text Boxes and I changed them BUT . . I didn’t see the changes right away because the server at my website host was caching the page and showing me the old version, then a day later I am now seeing the new version.
Total Comments by Rick: 3
This plugin just work wordpress 2.8, not to wordpress 3.3.1?
Total Comment by Sholeh: 1
Why do you think so? It works under WP 3.3.1 …
Hello, I appreciate so much your work, however since the last version of STB and WordPress, the javascript button in TinyMCE does not work any more. Did you already encounter the problem ?
Total Comment by Florian: 1
Did you select any text before clicking button?
Hi there,
Is there any way to alter the font of the Title in the special text box?
Thanks!
Omma
Total Comments by Omma: 3
Parameters->Javascript for js mode …
Thanks for this. I think I found a way to do it that works with the boxes I have (not the javascript ones) – in the ‘Special Text Boxes > Settings > CSS tab’ there is an option to change the font of the caption
Total Comments by Omma: 3
Hi,
love the plugin but I have an Opera only issue with it (works fine with FireFox). When I click on the TinyMCE, the code is automatically entered twice, like this:
I can manually remove the second part and then it’s fine but I though I let you know anyways.
Total Comments by crinrict: 2
Since the code was replace in the previous post, I added some spaces so you see how it looks in my Visual Tab.
[st extbox id="info" defcaption="true"]Das Bild wurde anonymisiert. Bild und Name des Sims sind weiterhin vorhanden.[/st extbox] [st extbox id="info" defcaption="true"][/st extbox]
Total Comments by crinrict: 2
To my mind this is problem of Opera…
Hi Minimus, any updates about why 4.2.70 breaks the shortcodes of the MP3-jPlayer plugin?
http://forum.simplelib.com/showthread.php?572-STB-4.2.70-breaks-shortcode-for-plugin-MP3-jPlayer
Thanks!
Peter
Total Comment by Peter: 1
Hi, since a few Weeks STB gives me, when i click on the icon, in the Cofigurationwindow only an Internal Server Error. See Screenshot

What can i do?
Thy for help!
Total Comment by tribun: 1
At first, look the “Error log” in your hosting account…
any way to get white space into caption”
example…
Chapter 1 In the Begining
instead of
Chapter 1 In the Begining
Total Comment by terry: 1
This is a great plugin, thank you! I’ve made interesting use of it for a formatted Specials Board, by modding the CSS outside the plugin. However I’ve put in text links and they don’t appear clickable- why is this? Can it be fixed?
Thanks again, –Liz
Total Comments by Liz: 2
Oh I found it! It was my use of floats. Works great now! –L
Total Comments by Liz: 2
Hi there,
I have installed the plugin, put the settings, put it the short codes in a page: I get show the text box itself, but the opening/closing by using the arrow on the right does not work, as if it was not clickable… any idea why this could have happened.. running on latest version of WordPress and latest version of chrome..
Many thanks
Carsten
Total Comments by Carsten: 2
Hi there,
big issue: Since I had once activated this plugin, suddenly all my main menu texts have been added a SHADOW! — which realldy dont need… the CSS seems fine, I cannot find any shadow addings there in the font style (like a text decoration).. PLEASE HELP – WHERE has this plugin being able to cause this? Also deleting the Plugin has not resolved this issue..
Many thanks! Carsten
Total Comments by Carsten: 2
This problem is not problem of this plugin…
Hi there,
Such a great plugin, I use it a lot.
I am having trouble using it with Suffusion in the left-hand sidebar.
Can you tell me if there is a way to use this plugin for a sidebar in the Suffusion theme without breaking the footer? At the moment, it pushes the footer to the far right.
Thanks!
Total Comments by Omma: 3
Hi Minimus.
I’m trying to get the CSS mode working but it doesn’t want to display correctly.
The javascript method displays fine.
The code I am using us:
text here
Here is a screen capture of the result showing js at top and css at bottom:
Hopefully this image can be seen.
Regards
Iain
Total Comments by Iain: 2
Well that post didn’t display how I wanted it to.
Here is the code again:
[ stextbox id="custom" caption="Why eScribe?" mode="css" shadow="true" image="null" ]text here
[ /stextbox ]
url to screen capture is http://www.escribecaptions.com.au/stb.png
Total Comments by Iain: 2
Hello, I am encountering a problem with this plugin, it works perfectly, but I need it enters the screen with the option closed, so when you click the “+” it expands and opens the text, anyone know how to do this?
Total Comment by Anderson: 1
Use option {php}collapsed=true{/php} for shortcodes…
I have just moved a site to a new domain and copied all the data files etc.
My big problem is that the special text boxes which I was using on the old site have not copied across. Nothing shows at all in published mode.
I am not sure, but in the ‘styles’ settings there used to be an image showing in the list (old site), now it only shows the word instead. ie, instead of showing the image for ‘info’ it now just says ‘info’!
I have tried uninstalling and reinstalling, but nothing changed.
How do I get the box back along with the images?
Many thanks for assistance.
Andy
Total Comments by Andy: 2
Download plugin from WordPress.org and reinstall again …
Thanks for the reply.
I did that, but nothing changed.
Total Comments by Andy: 2
Register on support forum and send me PM with registration data (account) created for me on you site.
Great plugin, works perfectly. Only thing I can’t seem to alter is the font style of the caption. I was able to change the size and font family in Javascript, but I can’t figure out how to UNBOLD the caption. I do believe it is bolded (or possibly a background shadow in the same color). this is only an issue in the caption. Any help would be greatly appreciated.
Total Comment by kelly: 1
hello, can you tell me why its not showing text shadows in IE9?
text shadows show up fine in the other 4 browsers..
I’m using css mode but have tried all 3..
no dice.
im guessing a simple fix..
Total Comment by jason: 1
Hello Minimus,
Today i received a announcement from my hosting that this script is caused of overload server wp-plugins/wp-special-textboxes/css/wp-special-textboxes.css.php
Could you please take a look to find out what’s happend?
p/s: i’m using lastest version of theme and plugin.
Regards,
Tuan Vo.
Total Comment by Tuan Vo: 1
very nice and useful plug in. but just one question, will it affect SEO? what will happen to those texts inside the codes..
thanks!
Total Comment by BON: 1
This is a good plugin that highlights the text. I could do with something like this.
Total Comment by Shalu: 1
Is there any way I can put columns into a box so I have to parallel lists. This is what I have now but it doesn’t form the columns just shows the short code for them.
<ul>
<li>Newspapers</li>
<li>Magazines</li>
<li>Books</li>
<li>Textbooks</li>
<li>Appliance Manuals</li>
<li>Prescription Labels</li>
</ul>
[/one_third]
[one_third last="yes"]
<ul>
<li>Forms at a Doctors’ Office</li>
<li>Employment Applications</li>
<li>Drivers’ License Exam</li>
<li>Voting Ballots</li>
<li>Birthday Cards</li>
<li>The Internet</li>
</ul>
[/one_third]
Total Comment by Ryan: 1
Hello,
I have implemented this great plugin on a page that takes some time to load because of an image slider. Problem: I see the content of textbox first, and after some time I get the collapsed visual mode and the txt disappears. How can I make the text unvisible until the plugin is fully loaded? tried visibility=hidden in a div but then it stays invisible forever. Where can I switch the CSS or something to visibilty:visible as soon as the plugin is full loaded?
Thank you
Total Comment by jazzymoods: 1
hello, i have problem with Special Text Box. stop working in my blog, when i add new post and click insert special text box, its show me white empty box.
any suggest please ? the plugin very importent to me.
Total Comment by Ayman: 1