From Marty, 2 Years ago, written in PHP.
Embed
  1. function fma_indications($atts) {
  2. extract(shortcode_atts(array(
  3.     'thrust' => '',
  4.     'roll' => '',
  5.     'pitch' => '',
  6.     'bgcolor' => '#333333',
  7.     'bordercolor' => '#333333',
  8.     'borderwidth' => '2px',
  9.     'bordertype' => 'solid',
  10.     'fontcolor' => '#00ff00',
  11.   ), $atts));
  12.   if ( ($thrust) && ($roll) && ($pitch) ) {
  13.   return "<font style=\"padding: 1px 1px 1px 1px; color: $fontcolor; background-color: $bgcolor; border: $bordercolor $border $bordertype $borderwidth\">$thrust <font color=\"#cccccc\">|</font> $roll <font color=\"#cccccc\">|</font> $pitch</font>";
  14.   } else {
  15.   return "<font style=\"padding: 1px 1px 1px 1px; color: $fontcolor; background-color: $bgcolor; border: $bordercolor $border $bordertype $borderwidth\">$thrust$roll$pitch</font>";
  16.  }
  17. }
  18. add_shortcode('fma','fma_indications');