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

This is example of alert special textbox. This short code inserted with id “alert”. Highlighted text may be any length you need.
This is example of download special textbox. This short code inserted with id “download”.
Info Example
This is example of info special textbox. This short code inserted with id “info”.
جوجل
لإنشاء حساب جوجل ، انتقل إلى صفحة إنشاء حساب ، أدخل عنوان البريد الالكتروني الحالي واختيار كلمة مرور. بعد الانتهاء من التسجيل سوف تتلقى رسالة تأكيد بالبريد الإلكتروني. فقط انقر على الوصلة في أن البريد الإلكتروني لاستكمال عملية التحقق. [غوغل] حساب يتيح الوصول إلى مجموعة متنوعة من صور ، بما في ذلك تسجيل الدخول ، وسجل الويب ، بيكاسا ، وكثير غيرها.
لإنشاء حساب جوجل ، انتقل إلى صفحة إنشاء حساب ، أدخل عنوان البريد الالكتروني الحالي واختيار كلمة مرور. بعد الانتهاء من التسجيل سوف تتلقى رسالة تأكيد بالبريد الإلكتروني. فقط انقر على الوصلة في أن البريد الإلكتروني لاستكمال عملية التحقق. [غوغل] حساب يتيح الوصول إلى مجموعة متنوعة من صور ، بما في ذلك تسجيل الدخول ، وسجل الويب ، بيكاسا ، وكثير غيرها.

Javascript mode

This is example of warning special textbox. This short code inserted with id “warning”. Inserting short code without ID will have same effect. 😉
This is example of Black box. This short code inserted with id “black”.
Info Caption
This is example of Info box. This short code inserted with id “info”.
 
جوجل
لإنشاء حساب جوجل ، انتقل إلى صفحة إنشاء حساب ، أدخل عنوان البريد الالكتروني الحالي واختيار كلمة مرور. بعد الانتهاء من التسجيل سوف تتلقى رسالة تأكيد بالبريد الإلكتروني. فقط انقر على الوصلة في أن البريد الإلكتروني لاستكمال عملية التحقق. [غوغل] حساب يتيح الوصول إلى مجموعة متنوعة من صور ، بما في ذلك تسجيل الدخول ، وسجل الويب ، بيكاسا ، وكثير غيرها.
لإنشاء حساب جوجل ، انتقل إلى صفحة إنشاء حساب ، أدخل عنوان البريد الالكتروني الحالي واختيار كلمة مرور. بعد الانتهاء من التسجيل سوف تتلقى رسالة تأكيد بالبريد الإلكتروني. فقط انقر على الوصلة في أن البريد الإلكتروني لاستكمال عملية التحقق. [غوغل] حساب يتيح الوصول إلى مجموعة متنوعة من صور ، بما في ذلك تسجيل الدخول ، وسجل الويب ، بيكاسا ، وكثير غيرها.

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:

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:

[stextbox id="defined_id"]Highlighted text and/or short code(s)[/stextbox]
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:

[stextbox id="download" caption="Download"][download id="4"][/stextbox]

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.

Warning
Use Grey Box (id=”grey”) only for highlighting short codes of another plugins. Text Box with this id not parsing any short codes.

Customising “On The Fly”

This is example of customised alert special textbox. This short code inserted with id “alert”. This short code inserted with id “alert” and customised with short code options.
This is example of Customising on the Fly
This is example of customised alert special textbox. This short code inserted with id “alert” and customised with short code options.

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)
Short Code of Example Above
[stextbox id="alert" caption="This is example of Customising on the Fly" color="000000" ccolor="ffffff" bgcolor="f7cdf5" cbgcolor="f844ee" bcolor="f844ee" image="//www.simplelib.com/wp-content/plugins/wp-special-textboxes/images/heart.png"]This is example of customised alert special textbox. This short code inserted with id “alert” and customised with short code options.[/stextbox]

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

  • $content – text in the Box (string)
  • $id – ID of Box (string)
  • $caption – caption of Box if needed (string)
  • $atts – extended attributes of Box (array)

  • 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:

or

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:

[stextbox id="info" defcaption="true"]Some text[stb id="download" defcaption="true" collapsing="false"]Some text in the indoor box[/stb][/stextbox]

CSS mode

Info
Some text
Download
Some text in the indoor box

Javascript mode

Info
Some text
Download
Some text in the indoor box

Special Text widget

Special Text widget wrote with using WordPress Widget Factory technology and this one can work only under WordPress 2.8 and higher
Special Text widget

Special Text widget. Admin Page

Use PHP tags for inserting PHP codes in PHP evaluation mode.

Download

Special Text Boxes
Highlights any portion of text as text in the colored boxes.

Author: minimus, version: 6.2.5, updated: November 14, 2024,
Requires WP version: 5.6 or higher, tested up to: 6.7.1.
Download ( hits) (20 votes)

Tests

Tested under Windows
1. Internet Explorer 7..9
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

5 starsFamous Software Download

© 2009 – 2024, minimus. All rights reserved.