* * {icon name="go"} * * * {* one or more additional links within action tags as above *} * {/actions} * * @param $params array * title: string title of the dropdown * icon: string icon name for the icon that is clicked or hovered over to display the popup * @param $content string HTML within the {actions} block tags. Usually within {strip} tags * @param $smarty Smarty_Tiki * @param bool $repeat * @return mixed|string * @throws SmartyException */ function smarty_block_actions($params, $content, $smarty, $repeat = false) { global $prefs; $smarty->loadPlugin('smarty_function_popup'); $smarty->loadPlugin('smarty_function_icon'); if ($repeat) { return (''); } $return = ''; $num_actions = substr_count($content, ''); if ($num_actions == 0) { return (''); } elseif ($num_actions == 1) { $content = str_ireplace('', '', $content); $content = str_ireplace('', '', $content); return ($content); } if ($prefs['javascript_enabled'] !== 'y') { $js = 0; $libeg = '
  • '; $liend = '
  • '; } else { $js = 1; $libeg = ''; $liend = ''; } if (! $js) { $return .= ''; } $return = str_ireplace(['<action>', ''], $libeg, $return); $return = str_ireplace(['</action>', ''], $liend, $return); return ($return); }