Callout

Summary: Present something within an iconic bubble or style.
Version: 2010-01-02
Prerequisites: pmwiki-2.1.0
Status: alpha
Maintainer: RandyB
License: GPL2 (or any later version)
Discussion: Callout-Talk
Users: +4 (View / Edit)
Categories: Markup Editing Images PHP55

Questions answered by this recipe

  • How do I break up long text, to make my page more appealing?
  • How do I visually separate elements of my page?

Description

Callouts are separately styled areas of a page, typically used to break up long text, or to visually separate elements of the page. Pm's Cookbook:WikiStylesPlus recipe provides callouts for tips, warnings, and important messages. This recipe gives you more choices.

Built-in callouts:

Activation

To install the recipe

  1. Download the builtincallouts.pngΔ image (which shows all the built-in callouts) and callout.zipΔ (which contains everything else) into the directory containing your pmwiki installation.
  2. Unpack the callout.zip file.
  3. Put the callout.php file into your cookbook directory. Put all the other files, including the builtincallouts.png image file, into pub/callout/.
  4. Add the following line to your local customization file:
include_once("$FarmD/cookbook/callout.php");

Usage

How to put a callout on your page

Once you've installed the recipe, you can create any of the built-in callouts with simple markup like this:

>>nutshell<<
This text will appear in a nutshell callout.
>><<

Or style it with wikistyles:

>>nutshell bgcolor=pink border="1px blue"<<
This will have a pink background and blue border...
>><<

Most callouts have left and right indentation. You can use this recipe's "fullwidth" style if you don't want indentation. Conversely, if a callout is normally full width, you can indent it with the "lrindent" style.

>>nutshell fullwidth<<
This callout will have no indentation...
>><<

Showing what callouts are available

You can see what callouts are available on your system by using a callout named "builtincallouts".

Tips and tricks

If your content doesn't quite match any of the built-in callouts, pick a name for the callout that you wish existed, define that name as the callout that currently comes closest, and include that definition in a group or site header that every page includes. On your wiki pages, use your preferred callout name. That will clarify your markup. Also, someday when a more appropriate callout is developed, you'll be able to switch to it globally simply by changing your definition line.

See Cookbook.CalloutCustomization for how to define your own names and styles for callouts using wikistyles, and for examples and instructions on creating entirely new built-in callouts.

Notes

This recipe is closely modeled on parts of Pm's WikiStylesPlus recipe.

The images in these callouts can be found on sites like http://www.clker.com/ and http://openclipart.org. They are all believed to be in the public domain.

Release notes

  • 2010-01-02 Initial release.

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

See also

Contributors

  • RandyB

Comments

See discussion at Callout-Talk

User notes +4: If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.