Help keep this project going by donating.
0 Members and 1 Guest are viewing this topic.
// Generate a strip of buttons.function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '', $newstrip = false){ global $settings, $buttons, $context, $txt, $scripturl; if($newstrip) echo '<table cellpadding="0" cellspacing="0"><tr>'; // Create the buttons... foreach ($button_strip as $key => $value) { if (isset($value['test']) && empty($context[$value['test']])) { unset($button_strip[$key]); continue; } elseif (!isset($buttons[$key]) || $force_reset) $buttons[$key] = '<a href="' . $value['url'] . '" ' .( isset($value['custom']) ? $value['custom'] : '') . '>' . $txt[$value['text']] . '</a>'; $button_strip[$key] = $buttons[$key]; } if (empty($button_strip)) return '<td> </td>'; echo ' <td class="maintab_back">', implode('</td><td class="maintab_back">', $button_strip) , '</td>'; if($newstrip) echo '</tr></table>';}?>