/concrete5-block-fortune

Block plugin for concrete5 that emulates the Unix fortune(6) command and prints a random line of text.

Primary LanguagePHPMIT LicenseMIT

concrete5-block-fortune

Block plugin for concrete5 that emulates the Unix fortune(6) command and prints a random line of text.

Further information

This plugin gives you a basic HTML textarea to type in a series of lines. The plugin will then display one random non-blank line from that series every time a page is loaded. This is useful for displaying random sayings in, for example, the footer of your templates.

Requirements

  • concrete5.7.4 or greater (uses the help functionality)

Installation

git clone git@github.com:manminusone/concrete5-block-fortune.git /concrete-5-install-dir/application/blocks/fortune

Usage

After installing the block you can simply drag a Fortune from the "Other" section in the Blocks sidebar. Type in your series of lines and save. You're done!

The random line will be wrapped in a <div> with the class name "text-fortune" so you can style the line in your custom CSS section of the Design settings.