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
![Hide](http://www.simplelib.com/wp-content/stb-pro-themes/stb-pro-flash-line-2/minus.png)
![Hide](http://www.simplelib.com/wp-content/stb-pro-themes/stb-pro-flash-line-2/minus.png)
Javascript mode
![Hide](http://www.simplelib.com/wp-content/stb-pro-themes/stb-pro-flash-line-2/minus.png)
![Hide](http://www.simplelib.com/wp-content/stb-pro-themes/stb-pro-flash-line-2/minus.png)
Installation
- Unpack plugin archive file.
- Put plugin folder to WordPress
wp-content/plugins
folder. - 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:
There is example of using Download Manager plugin short code with wp-special-textboxes plugin short code. The result of using this code construction you can see below in the Download section of this post.
![Hide](http://www.simplelib.com/wp-content/stb-pro-themes/stb-pro-flash-line-2/minus.png)
Customising “On The Fly”
![Hide](http://www.simplelib.com/wp-content/stb-pro-themes/stb-pro-flash-line-2/minus.png)
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)
![Hide](http://www.simplelib.com/wp-content/stb-pro-themes/stb-pro-flash-line-2/minus.png)
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' => "//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' => "//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
![Hide](http://www.simplelib.com/wp-content/stb-pro-themes/stb-pro-flash-line-2/minus.png)
Javascript mode
![Hide](http://www.simplelib.com/wp-content/stb-pro-themes/stb-pro-flash-line-2/minus.png)
Special Text widget
![Special Text widget](http://www.simplelib.com/images/posts/screenshot-6.jpg)
Special Text widget. Admin Page
Download
Special Text Boxes
Highlights any portion of text as text in the colored boxes.
Author: minimus, version: 6.2.2, updated: May 6, 2024,
Requires WP version: 5.6 or higher, tested up to: 6.5.3.
Download ( hits) (19 votes)
Tests
![Hide](http://www.simplelib.com/wp-content/stb-pro-themes/stb-pro-flash-line-2/minus.png)
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
Video Lessons
Awards
© 2009 – 2018, minimus. All rights reserved.
[…] post is available on english language.) Плагин добавляет в WordPress небольшой файл таблицы […]
Can these styles be inserted in some way on the theme?
Total Comments by stalancer: 5
Yes, but using plugin is more simple way … 😉
Total Comments by minimus: 167
yea…I meant if theres a way to insert the styles with the plugin in to the theme…if theres a code like
Highlighted text and/or short code(s) or
Total Comments by stalancer: 5
Sorry, the code didn’t show…maybe you got the point….
Total Comments by stalancer: 5
Ok, if I understood correctly, you want to place text box somewhere in blog but not in post! Sorry, but not in this version … I plan to include such function to version 2.0 of plugin. It will be fast, possible tomorrow … 😉
Total Comments by minimus: 167
thats exactly what I was saying…
I’m gonna wait for that…this plugin rocks!
Total Comments by stalancer: 5
Get it!
Total Comments by minimus: 167
Now you made one of my dreams come true…thanks a lot! super plugin…
Total Comments by stalancer: 5
I have the same questions as stalancer did. I want the plugin that displays text boxes on my front page and NOT in the posts. I tried downloading the plugin on this site and I put it in my plugin folder however it does not show up in my admin panel. PLEASE HELP!!!
Total Comments by Bignasty247: 4
Hi
Thank you for this useful plugin. I want to use this as the style for verse of the day plugin which you can see in the sidebar of the website. The code in the settings is [TEXT] ([TITLE][VERSION])[ENCLOSURE] where TEXT is the bible verse and i want to wrap this TEXT which is the verse in a special text box. The code i have to put in the sidebar is . I have tried everything and still cant get the bible verses to show there. Any help will be highly appreciated.
Jimmy
Total Comments by Jimmy: 2
Hi, Jimmy!
I am sorry, but Special Text Widget will be presented in next version of plugin …
Total Comments by minimus: 167
Thanks , I really appreciate it.
Total Comments by Jimmy: 2
A nice little thing, thank you for that!
Is there any possibility letting the text flow around such a special textbox? As if it were an image where I have the ‘align’ attribute? That would b… perfect”
Cheers,
Alexander
Total Comment by Alexander: 1
May be … I have to think … 😉
Total Comments by minimus: 167
This plugin is perfect, just what I needed. Thanks so much 🙂
Total Comment by Kenneth: 1
I have the same question as Alexander. Just checking to see if you’re finished thinking….. 🙂
Total Comment by Harvey: 1
I have tried everything and still cant get the bible verses to show there. Any help will be highly appreciated.
Total Comment by Patcher: 1
This is excellent. Will it work for WordPress pages too?
Total Comment by David: 1
Yes, of course!
Total Comments by minimus: 167
Okay, I have successfully installed the plugin!
Can you please assist me in how to use this plugin on my front page instead of in my posts? Thank you!
Total Comments by Bignasty247: 4
I have successfully downloaded the package, thank you! However, I do not know how to use this plugin on my front page only and not in my posts. Please help me do this. Thank you!
Total Comments by Bignasty247: 4
Wait Special Text Boxes 3! It will be ready in the nearest some days … 😉
Total Comments by minimus: 167
Hi!
Thank you for your plugin!
A question: Is it OK to put more text than in your examples? I would like it to use these boxes like newspaper or magazine box with some additional information to the main story, a couple of paragraphs. But may be it is not sound to “hard code” too mcuh text this way. I do not know….
Regards
Erico
Total Comment by erico oller westerberg: 1
Length of text not limited by plugin … 😉
Total Comments by minimus: 167
Installed plugin, works great in Firefox 3.5.3
However, in IE 7, boxes lose rounded corners, drop shadows etc.
Look real bad?
Is there a fix?
Total Comment by Lyle: 1
On plugin parameters page you can read next: “Parameters below add elements of CSS3 standard to Style Sheet. Not all browsers can interpret this elements properly, but including this elements to HTML page not crash browser.” IE5..7 are this browsers (Opera partially too). Sorry … 🙁
Total Comments by minimus: 167
Can’t get this to work I’m afraid. Installed version:3.0.27 on a WordPress 2.84 website, with no other plugins. When I highlight the text to be boxed and click on the icon for Special Text boxes an empty dialog box opens up. Tried it in Internet Exporer, firefox and Chrome.
Any help would be much appreciated.
Total Comments by Wyn James: 3
I think you have problems with dialog.php file (wp-content/plugins/wp-special-textboxes/js).
It may be:
1. File is missing
2. File downloaded with errors
3. You have not access to this file by some system reasons
Check this file or upload plugin …
Total Comments by minimus: 167
Update: I can add the short code manually to posts and pages – but it still doesn’t work. When I look for the wp-special-textboxes/css/wp-special-textboxes.css.php CSS file on firebug I get this message: “There are no rules in this stylesheet.”
Total Comments by Wyn James: 3
It means that your wp-special-textboxes.css.php file is bad! Update plugin again!
Total Comments by minimus: 167
Thanks for the advice, I downloaded again as suggested and now work fine. Excellent plugin – I’ve been looking for this sort of functionality for a while.
Total Comments by Wyn James: 3
You are welcome! 😉
Total Comments by minimus: 167
Works great, thank you
Total Comments by haber: 2
Hello,
U have downloaded the new upgrade, version 3.1, and I have it on good authority that I should be able to insert a single special text box on the front page of my website. How do I do that? (Please refer to past comments from bignasty247 if you need a refresher).
Thank you
Total Comments by Bignasty247: 4
Excuse that has not answered your question earlier!
Somewhere, where you need, in file index.php place this code:
Good luck!
Total Comments by minimus: 167
This is an amazing plugin and just what I was after. Thanks for making this possible.
andy
Total Comments by Andy Bird: 5
LOVE the plugin! Thanks so much. This is exactly what I needed.
Total Comment by Rebecca Gill: 1
A suggestion:
wouldn’t be more great if you could make those text box collapsible?
I mean to have the feature by clicking on title bar to make the text box collapse/expand 😛
Total Comment by Valentin: 1
Excellent idea! I already thought of it … Probably in the following version …
Total Comments by minimus: 167
Hello i am using this plugin on my wordpress blog 2.8.4 , after updating the plugin its not working.
In the editor when i try to insert text box by selecting the text but still it is not working and when i tried it manually with the tags then also its not working.
Please help me 🙁
Total Comments by Sunil Jain: 4
Try to upload plugin again …
Total Comments by minimus: 167
I saw your blog just now – plugin is working!!!
Total Comments by minimus: 167
This was long back dude , now as i upgraded its not working ??
I have uploaded it 3 times again and again but also its not working???
Total Comments by Sunil Jain: 4
Sorry! I don’t understand you. This is your blog just now:
![gupshupblog](//www.simplelib.com/images/gupshupblog.jpg)
What does not work?
Total Comments by minimus: 167
Sorry for late reply , while i write the content for my blog at the back end through editor and after selecting the text when i try to click on the special text box button , it doesn’t open but when i do it manually in html mode its working , but i would like to use it more in visual mode , so let me know , how do i fix it??? 🙂
Total Comments by Sunil Jain: 4
Just read this comment from Pim Uijttewaal and answers …
Total Comments by minimus: 167
Where do you find the code to edit the graphic in the different boxes?
A great, great plug-in, thanks.
Total Comments by Charlie: 11
Thanks! What exactly you interests?
Total Comments by minimus: 167
I want to put other graphics in to replace light bulbs and hearts and stuff like that. If you will look at my site, I have Cardinal heads that I would like put in place of your graphic choices.
Total Comments by Charlie: 11
All plugin images are placed to folder /wp-content/plugins/wp-special-textboxes/images. Replace its with your own images (PNG, transparent background, 25×25 or 50×50 pixels) …
Total Comments by minimus: 167
Done. Check it out.
Total Comments by Charlie: 11
Can I put in the state closed as the default state when inserting a box?
Normally the box is opened when you open the page.
Total Comment by Tom: 1
You are not first who ask me about it. ‘No’ in this version, in next version ‘yes’.
Total Comments by minimus: 167
[…] il sito del […]
A very good plugin, wich I want to use in my blog, but I have a problem, with paragraphs (I hope, that my bad english is right here), I meen – in German: Absatz.
You can see my problem in my Test-Blog: //www.pannenregierung.de/?p=48
The first two pargraphs are ok, but after using your plugin, no more paragraphs are there…
Can you help me to fix this problem, which probably is part of the known WordPress-Problems with Tags?
Thank you very much and excuse my bad english 🙁
Nobbi
Total Comments by Nobbi: 2
May be problem is in breaking off body of paragraph by plugin codes.
Try writing posts without HTML tag p (paragraph) in post’s text. WordPress don’t like this tag. Or don’t break off paragraphs by Special Text Boxes plugin.
Total Comments by minimus: 167
Yes, I think, that the “p” makes problems, but I don’t know how to fix them in my editor :-(. But I tried it with a “/p” after the Special Text Boxes – Code and: It works *g*
Not clean, but working 😉
Total Comments by Nobbi: 2
I can’t get paragraph breaks inside the box and I am not using html.
How to fix?
Total Comments by Charles: 11
Describe, please, your problem more in detail…
Total Comments by minimus: 167
Here’s the problem.
I’m having a problem getting paragraph breaks INSIDE stextbox.
Total Comments by Charles: 11
I use your program for full posts sometimes because of the nice colors.
When I try to use paragraphs, they often run together into one long paragraph. How do you break up the paragraphs?
?
?
Total Comments by Charles: 11
I use button Enter 😉
1. WordPress usually removes p-tags if they are not contain styles or attributes and changes p-tags to br-tags (breaks).
2. My plugin does not change content of post. Shortcodes, in edit mode, are only text and not anything else. In runtime my plugin only adds style to content and does not change content.
I tried to model your situation but can’t …
Total Comments by minimus: 167
I’m wondering if this is possible…I want to use your textbox to format a wp-query of mine. I am calling for 5 categories with 3 posts each but wanted a text box around each one? Here is how I call the query:
<?php
$mycats = array('a,b,c,d,e');
catx_posts($mycats, 3);
even if I broke it done the array and recalled this 5 times(instead of all at once), is there a way to pull the textbox style on it? FYI I'm not a coder, I code enough to get myself in trouble 🙂
Total Comments by Kaos: 2
Is it possible to use these textboxes with the recent post calls? I keep trying to use it on my home page and it just breaks the site. I’m no coder, but I’m trying! Here’s what I have (not sure I was supposed to put the array/css after it but either way it doesn’t work for me:
<?php if( function_exists('stbHighlightText')) {
stbHighlightText( $content = , $id = ‘warning’, $caption = ‘Recent Posts’);?> $atts = array(
‘color’ => ‘#666666’,
‘ccolor’ => ‘#ffffff’,
‘bcolor’ => ‘#333333’,
‘bgcolor’ => ”,
‘cbgcolor’ => ‘#006A0’,
‘image’ => ”,
‘big’ => ” );
}
Total Comments by Kaos: 2