Action: Colorbox

Compatible with: R5.x
Current version:
Credits: WikiAdmin

visualize color sets as boxes


{{colorbox}}


/action/colorbox.php
<?php
 
/*
 
visualize color sets as boxes
 
{{cobo bg="#FDFEB8" bd="#FFBB00"}}
    $bg - background color
    $bd - border color
    $ds - description
    $tc - text color
    $bw - border width
    $width - width
    $spec - show color values
*/
 
if (!isset($ds))        $ds        = NULL;
if (!isset($bw))        $bw        = 1;
if (!isset($bg))        $bg        = '#ffa';
if (!isset($bd))        $bd        = '#000000';
if (!isset($tc))        $tc        = '#000000';
if (!isset($width))        $width    = '200px';
if (!isset($spec))        $spec    = 1;
 
echo '<div style="
        background-color: ' . $bg . ';
        border: ' . (int) $bw . 'px solid ' . $bd . ';
        width: ' . (int) $width . ';
        clear: both;
        margin: 10px 0;
        padding: 10px;
        color: ' . $tc . ';
        float: left;">' .
        $this->format($ds) . ''.
        ($spec
            ? '<br>' .
              'background: ' . $bg . '<br>' .
              'border: ' . $bd . '<br>' .
              'color: ' . $tc . ''
            : ''
    ) . "</div>\n";
 
?>

Unknown action colorbox

Unknown action colorbox

Unknown action colorbox

Unknown action colorbox

Unknown action colorbox

Unknown action colorbox

Unknown action colorbox

Unknown action colorbox

Unknown action colorbox

Unknown action colorbox

Unknown action colorbox
Unknown action colorbox
Unknown action colorbox
Unknown action colorbox

Unknown action colorbox

Unknown action colorbox

Unknown action colorbox