Customizing SMF > Graphics and Templates
Mirrortab Customization
Liam_michael:
How do I make it so that capture 2 looks like capture 1 in the attachments. I've tried everything and I am using tables, not lists. I want to keep it as a table.
I want it to look like this (where all links are nicely separated):
I'm working on 1.x and here's the index.template.php code that correlates to what's being produced:
--- Code: ---function template_button_strip($button_strip, $direction = 'top', $force_reset = false, $custom_td = '')
{
global $settings, $buttons, $context, $txt, $scripturl;
// 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 valign="top" class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td valign="top" class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td valign="top" class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
}
--- End code ---
Antechinus:
Why, in the name of all things semantically borked, do you want to have it as a table? You obviously have it working already without using a table. Why screw it up?
Liam_michael:
--- Quote from: Antechinus on July 15, 2012, 10:20:40 PM ---Why, in the name of all things semantically borked, do you want to have it as a table? You obviously have it working already without using a table. Why screw it up?
--- End quote ---
Because all my templates work around that (all 40 of them). Recall that tables were eliminated in 2.x, I'm using 1.x, so bare with me. I want this to be universal. I know you can make 5 pages worth of arguments against it, but I want to use tables and would like to know how it's done with tables :(
How do you play around with these:
--- Code: ---echo '
<td valign="top" class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'last' : 'first' , '"> </td>
<td valign="top" class="', $direction == 'top' ? 'main' : 'mirror', 'tab_back">', implode(' | ', $button_strip) , '</td>
<td valign="top" class="', $direction == 'top' ? 'main' : 'mirror', 'tab_' , $context['right_to_left'] ? 'first' : 'last' , '"> </td>';
--- End code ---
Antechinus:
Meh. Are you ok with using css3 for drop shadows and rounded corners, or you going to want fancy stuff for IE8 too?
Liam_michael:
--- Quote from: Antechinus on July 15, 2012, 10:53:01 PM ---Meh. Are you ok with using css3 for drop shadows and rounded corners, or you going to want fancy stuff for IE8 too?
--- End quote ---
Yeah I'm fine with that, but the shadow effects you see are due to a .gif, so I'd prefer to keep it that way.
Navigation
[0] Message Index
[#] Next page
Go to full version