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/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:
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.
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' => "//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
Javascript mode
Special Text widget
Download
Tests
Video Lessons
Awards
© 2009 – 2024, minimus. All rights reserved.
Hi Minimus
Is there a way you can set the height of the text box? I have three in a row with varying text size, so my boxes all have a different height, but I want it all to look even. So for instance, I want to set the height of each box at 100 pixels. what code would i need to add inside the box to make this work?
Thanks
Joe
Total Comment by Joe: 1
There are no parameters for these purposes…
Dear minimus,
I have a problem with WordPress plugin Special Text Boxes. Few weeks ago the plugin was working fine, but now it isn’t. I’ve just noticed that it is not working. It does not collapse and expand the text. I don’t know what is the problem. I didn’t change or edit the website, maybe the plugin is updated.
System info:
Wordpress Version: 3.3.2
Plugin Version: 4.3.72
Plugin DB Version: 1.0
PHP Version: 5.3.3-7+squeeze15
MySQL Version: 5.0.51a-24+lenny5
Memory Limit: 128M
Usage:
….
Example:
//www.salgo.hu/?page_id=237
Can you help me, please? How can I solve this problem?
Thank you very much for your help.
Best regards,
ekrisztian
Total Comments by ekrisztian: 2
In addition…
Today, I’ve updated the WordPress to version 3.5.2. The special text boxes plugin’s behavior is changed. Now, it can expand the text, but can’t collapse that.
Total Comments by ekrisztian: 2
Dear, ekrisztian!
Collapsing/expanding is independent of the version of WordPress, it is javascript. Find uncompatible plugin…
Hi,
I have modified setting to java script mode, after save the option, i unable view my website…
Fatal error: Cannot redeclare class browser in /———-/plugins/Browser.php on line 135
Total Comment by Gopikrishna: 1
The
PHP Warning: Missing argument 2 for wpdb::prepare()
error message is thrown when selecting styles in 4.3.72 under WordPress 3.6
To fix this change lines 982 and 983 in wp-content/plugins/wp-special-textboxes/stb-admin-class.php
From:
$trash_num = $wpdb->get_var($wpdb->prepare(“SELECT COUNT(*) FROM $sTable WHERE trash = TRUE”));
$active_num = $wpdb->get_var($wpdb->prepare(“SELECT COUNT(*) FROM $sTable WHERE trash = FALSE”));
To:
$trash_num = $wpdb->get_var($wpdb->prepare(“SELECT COUNT(*) FROM $sTable WHERE trash = %s”, “TRUE”));
$active_num = $wpdb->get_var($wpdb->prepare(“SELECT COUNT(*) FROM $sTable WHERE trash = %s”, “FALSE”));
Enjoy!
Total Comments by Frank Bernhardt: 2
Thanks! Resolved…
Hello
Is there any way of increasing the line height? Sometimes the lines of text in an STB are very compressed together?
Many thanks
Mark
Total Comment by Mark Arnold: 1
Hi Mark.
I’ve had similar needs with this otherwise excellent plug-in and have found that by editing:
/wp-content/plugins/wp-special-textboxes/css/wp-special-textboxes.css.php
I could generally get what I wanted.
In your case try changing font-size or padding maybe around line 40 in the file.
If you want this in the side bar look around line 145.
One major downside with with editing this file is that when installing and update the file gets replaced and you have to make the changes again.
Cheers.
Total Comments by Frank Bernhardt: 2
Try 4.4.75 🙂
Hello,
that don´t works for me, what I want to paste the main code now for my current wordpress?
Thank you very much!
Total Comments by Enrico Wagner: 2
how change language in admin panel?!
Total Comment by amnhak: 1
Language of the plugin is selected automatically by WordPress if there is an appropriate language package. If the package isn’t present – WordPress selects English…
New to using STB plugin I’ve found I can’t change the colour in styles because there is no colour selector pop up. I’m sure there was when I first activated the plugin, suddenly it won’t let me. Any suggestions?
Total Comment by Ian Moore: 1
4.4.75 has a lot of probs with new version of wp (3.8) I get all these errors when I activate it:
Notice: unserialize(): Error at offset 115 of 359 bytes in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 131
Notice: unserialize(): Error at offset 265 of 365 bytes in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 132
Notice: unserialize(): Error at offset 115 of 359 bytes in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 131
Notice: unserialize(): Error at offset 265 of 365 bytes in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 132
Notice: unserialize(): Error at offset 118 of 362 bytes in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 131
Notice: unserialize(): Error at offset 268 of 371 bytes in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 132
Notice: unserialize(): Error at offset 114 of 358 bytes in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 131
Notice: unserialize(): Error at offset 264 of 363 bytes in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 132
Notice: unserialize(): Error at offset 119 of 363 bytes in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 131
Notice: unserialize(): Error at offset 267 of 369 bytes in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 132
Notice: unserialize(): Error at offset 115 of 359 bytes in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 131
Notice: unserialize(): Error at offset 265 of 365 bytes in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 132
Notice: unserialize(): Error at offset 115 of 359 bytes in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 131
Notice: unserialize(): Error at offset 265 of 365 bytes in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 132
Notice: Undefined offset: 1 in /home/donnadont/public_html/other_domains/w101/wp-content/plugins/wp-special-textboxes/stb-class.php on line 169
Total Comment by Donna: 1
Something went wrong during WordPress installation. Maybe you have a problem with the database. Check for exceeding the quota of DB volume specified by provider. Check the database for errors.
This update just overrode all of my previous work. I’m new to WP.org, so I just assumed it would update the plugin, not over-ride everything. It looks awful! Please instruct me on on how to undo this update and put it back. It’s completely wrong for our readership. Thank you.
Total Comment by Tamara: 1
Was working perfectly, but after I upgraded this plugin to 4.5.81, it overwrote settings and colors of all my custom text boxes.
It also added a left side caption box which I don’t want.
And how can I type in the hex color codes in the various boxes without spending all my time trying to get it right by dragging the selector with a mouse?
If I highlight the current color and hit delete, the whole screen changes, and I also cant even type the code there. Seems like mouse only.
Help please.
Total Comments by Merrill: 4
Read here
Thanks for the quick reply…
Where do I put the image=”null” code so all new and existing uses of the custom box will automatically work.
It’s certainly not practical to add it into every short code on every existing page, especially when it was working perfectly before this update.
Thanks!
Total Comments by Merrill: 4
Anybody?
Where do I put the image=”null” code so all new and existing uses of the custom box will automatically work so I dont have to add it into every short code on every existing page, especially when it was working perfectly before this update.
Help please. Thanks.
Total Comments by Merrill: 4
If you can wait, wait new version of plugin… Coming soon…
Hello Minimus,
very nice work, needs some tweaking though 😉
– editing a custom stb is not (yet ? ) possible
– because of this , a workaround could be to start with a COPY of one of the 8 existing styles
– setting the font (eg heigt) ( or even better let it default to the website font) in the caption box should be possible
– setting the colors is absolutely a pain i.t.n. on a new stb : make this color picker bigger or whatever (maybe from other plugin ?) .
Hope you find these remarks constructive 😉
best regards
Total Comment by Peter: 1
hi!
I’ve a problem with it. its deactivated and when i want to reactive it, I see this fatal error:
Class ‘DomDocument’ not found in /home/…../plugins/wp-special-textboxes/stb-themes.php on line 18
plz help me to repair use it!
Total Comment by hassan: 1
It means that you have not DOM library installed on your server. This library is included to PHP pack by DEFAULT. Why you have not this library? I don’t know. Ask your provider…
Have the same problem… its only on one web on my VPS, the other site worked with plugin without problems…
Total Comment by Elvis: 1
Hi, I upgraded my plugins today, and now the Special Text Box css isn’t working. I’d made bespoke boxes with images that I’d added myself – and they’ve been working fine until the upgrade today.
Any idea of what the issue is? Website and versions below. Any help much appreciated.
Thanks, Cormac
//www.connecttransmit.org.uk
Special Text Boxes: 5.0.85 | Wordpress: 3.8.1 | Theme: Custom Community
Total Comment by Cormac Lawler: 1
Go to the settings page of plugin and save settings, it force upgrading static CSS file…
Hi there,
thanks for this great Plug in. With the last update to version 5.0.85 i got following note:
Warning: mkdir() [function.mkdir]: Permission denied in /www/htdocs/w00f45c4/wp-content/plugins/wp-special-textboxes/stb-admin-class.php on line 84
Any idea?
Total Comment by Knudhanssen: 1
Hello, I like your plugin very much, but unfortunately it causes since the last update (do not know whether or WordPress plugin) errors in the backend.
Here are the error messages:
Warning: mkdir() [function.mkdir]: Permission denied in /www/htdocs/****/****/wp-content/plugins/wp-special-textboxes/stb-admin-class.php on line 84
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/****/****/wp-content/plugins/wp-special-textboxes/stb-admin-class.php:84) in /www/htdocs/****/****/wp-content/plugins/mingle-forum/wpf.class.php on line 1875
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/****/****/wp-content/plugins/wp-special-textboxes/stb-admin-class.php:84) in /www/htdocs/****/****/wp-includes/option.php on line 563
Warning: Cannot modify header information – headers already sent by (output started at /www/htdocs/****/****/wp-content/plugins/wp-special-textboxes/stb-admin-class.php:84) in /www/htdocs/w00bf97e/tanzforum/wp-includes/option.php on line 564
Can anyone help?
Total Comment by yoshi98: 1
Hi
Your great plug in was working fine. But now when I highlight the text and click on “Insert Special Text Box” icon I get “Error 403 – forbidden” page come up.
How do I solve this issue.
Kind Regards
Ravi
Total Comment by Ravi: 1
A recent update seems to have removed the ability to have no icon in the top corner of text box header. It doesn’t seem to matter whether an icon is set in the css settings or not, or if no image is selected in the style settings. Either an icon or an empty box is shown in the top corner, which is slightly annoying!
Total Comment by RichS: 1
Sorry! Forgot… Wait a patch…
Hi! Just downloaded the plug in and I’m having this same issue with a box around the icon and/or an empty box when I turn the icon off.
Do you know when the patch will be ready? (my use of it is time sensitive, unfortunately)
Thank you so much!
~Teresa~
Total Comment by Teresa Deak: 1
I am trying to create a Text box but want no (!) image to shod in the caption fiels. I type in Null for the url but stil get an empty picture frame with padding. How can I make this frame disappear along with the padding?
Thank you very much for your help. As you can tell I am an absolutely novice here – so please be gentle 🙂
Total Comment by Marc: 1
Looks like the latest version does not work with WordPress 3.9. Also, your support forum link on this post is broken. 🙁
Total Comment by Keith M.: 1
Word Press Compatible with V 3.9?, once my site automatically updated this plugin stopped working, I had to re-install a back up. Please advise
Total Comment by shon4234: 1
Sorry. Tell me how you can use your plugin only for emphasis. Without the use of the title. And the color of empty space on the right. I can only turn off the image. Yellow block from the end I can not hide. //gyazo.com/918db75b80a8522676d0f0b5c583243f
Total Comment by Marat: 1
With the latest few updates to STB on my site it has overwritten all my individual customizations via codes in the post to the main customized style and also forces a gradient. Is there any way change these settings so that it doesn’t overwrite? And is there any way to get rid of the gradient? Thanks.
Total Comment by Rachel: 1
Why do updates keep adding a blank image in my custom box, even though I dont use an image? Been happening since February. I understand I can insert image=”null” code, but I shouldnt have to add it into every short code on every existing page, especially when it was working perfectly before this update.
Frustrated by an otherwise great plugin…Merrill
Total Comments by Merrill: 4
When I try to add a text box to a page, the Insert Special Text Box Icon is greyed out.
Total Comment by Jane Fox: 1
Where is download link?
Total Comments by vayCZ: 2
Sorry, rights were not set properly. 🙁 Resolved!
I still do not see the download link. I see only this: //ctrlv.cz/shots/2014/10/14/rmtD.png. Sorry for my English
Total Comments by vayCZ: 2
Download link is here…
I’m sorry to tell you that there must be an security issue with this plugin. I had two hacks these days, both had to do with the plugin as my provider told me.
Total Comment by Heidi Schmitt: 1
Hi, i have to confirm this, someone cracked your plugin and here is the only clue i have for you to get on to this:
Normal
0
21
false
false
false
DE-AT
X-NONE
X-NONE
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:”Normale Tabelle”;
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:””;
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:”Times New Roman”,”serif”;}
— Scanning WEB: —/home/.sites/34/site3933571/web/wp-content/plugins/wp-special-textboxes/lib.zip: PHP.Trojan.WebShell-7 FOUND
/home/.sites/34/site3933571/web/wp-content/plugins/wp-special-textboxes/lib.zip: Removed.
/home/.sites/34/site3933571/web/wp-content/plugins/wp-special-textboxes/lib/404.php: PHP.Trojan.WebShell-7 FOUND
/home/.sites/34/site3933571/web/wp-content/plugins/wp-special-textboxes/lib/404.php: Removed.
———– SCAN SUMMARY ———–
Infected files: 2
Time: 22.361 sec (0 m 22 s)
Total Comment by Martin Daschner: 1
are still the virus in the 5.2.91 version? please…
asis
Total Comments by asis: 3
In the new version of the plugin the possibility of penetration of malicious software on the server is excluded. I hope…
background colors not working for me after upgrade, in mine or any of the examples I tried
Total Comments by tulanch: 2
Go to settings page of plugin and save settings…
thanks minimus but, sure????
it will be a problem to update and get the malicious software in my server….
it is any way to proof???
asis
Total Comments by asis: 3
Plugin is verified by specialists from wordpress repository.
ok then, thanks very much for your plugin and help.
asis
Total Comments by asis: 3
Just upgraded to latest stb & wp 4.1 – stb broken
Total Comment by Trevor Olsson: 1
Please, more specifically…
[…] Есть много способов. Для тех, кто работает с WordPress, можно просто скачать Special Text Boxes. Это очень маленький и очень полезный плагин для WordPress ( и, надеюсь, для вас). Он добавляет немного файлов в таблицы стилей и короткий код для блога, чтобы выделить какую-то часть текста в посте в виде цветных прямоугольников. С более подробным описанием и установкой можно познакомиться на сайте //www.simplelib.com/?p=11 […]
there are errors when i installed:
Something went wrong…Alert!: Table ‘mnsokuls_wordpress.wp_stb_styles’ doesn’t existBlack Quote: Table ‘mnsokuls_wordpress.wp_stb_styles’ doesn’t existİndir: Table ‘mnsokuls_wordpress.wp_stb_styles’ doesn’t existBilgi: Table ‘mnsokuls_wordpress.wp_stb_styles’ doesn’t existWarning!: Table ‘mnsokuls_wordpress.wp_stb_styles’ doesn’t existCodes: Table ‘mnsokuls_wordpress.wp_stb_styles’ doesn’t existCustom Style: Table ‘mnsokuls_wordpress.wp_stb_styles’ doesn’t exist
Total Comment by yasin: 1
Read here…
На версии 4.8 плагин перестал работать.
В редакторе всплывает пустое окно, и в отладчике много ошибок
Total Comments by Nikolay: 2
Опять что-то поменяли в tinyMCE… Разбираюсь…
Не получается?
Total Comments by Nikolay: 2
Уже получилось… Можно обновляться…