Cze??. Stara?em si? stworzy? podobny baner jak ten ->
http://www.phpbb.com/styles/demo/3.0/?style_id=30 Niestety nie potrafi? u?o?y? w uporz?dkowanej kolejno?ci log. Kiedy u?ywam przybli?enia obrazki spychaj? si? i wychodz? poza forum.
W sumie to widzia?em skrypt podobnego banera, ale tam trzeba by?o przypisa? id do poszczególnych log a tego ju? nie potrafi?.
Dodam, ?e mój styl posiada tylko jedno logo wy?rodkowane. Chc? doda? dwa boczne na które na?o?one by?oby logo g?ówne.
Oto mój kod z index.template. W górnej cz??ci mo?na edytowa? baner.
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
echo '
<div class="content_wrap" id="mainframe"', !empty($settings['forum_width']) ? ' style="width: ' . $settings['forum_width'] . '"' : '', '>
<div id="ob1">
<div id="ib1">
<table width="100%" cellpadding="0" cellspacing="0" border="0" id="content" class="content_wrap">
<tr>
<td align="center"><a href="'.$scripturl.'" title="', $context['forum_name'], '"><img src="', $settings['images_url'], '/logo.png" style="margin: 2px;" alt="', $context['forum_name'], '" /></a>
</td>
</tr>
</table>
<div class="tborder">
<div class="content">
<div class="catbg">
<img class="floatright" id="smflogo" src="', $settings['images_url'], '/smflogo.gif" alt="Simple Machines Forum" />
<h1 id="forum_name">';
if (empty($context['header_logo_url_html_safe']))
echo $context['forum_name_html_safe'];
else
echo '
<img src="', $context['header_logo_url_html_safe'], '" alt="', $context['forum_name_html_safe'], '" />';
echo '
</h1>
</div>';
// Display user name and time.
echo '
<ul id="greeting_section" class="reset titlebg2">
<li id="time" class="smalltext floatright">
', $context['current_time'], '
<img id="upshrink" src="', $settings['images_url'], '/upshrink.gif" alt="*" title="', $txt['upshrink_description'], '" align="bottom" style="display: none;" />
</li>';
if ($context['user']['is_logged'])
echo '
<li id="name">', $txt['hello_member_ndt'], ' <em>', $context['user']['name'], '</em></li>';
else
echo '
<li id="name">', $txt['hello_guest'], ' <em>', $txt['guest'], '</em></li>';
echo '
</ul>';
if ($context['user']['is_logged'] || !empty($context['show_login_bar']))
echo '
<div id="user_section" class="bordercolor"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<div class="windowbg2 clearfix">';
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<ul class="reset">
<li><a href="', $scripturl, '?action=unread">', $txt['unread_since_visit'], '</a></li>
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';
// Is the forum in maintenance mode?
if ($context['in_maintenance'] && $context['user']['is_admin'])
echo '
<li class="notice">', $txt['maintain_mode_on'], '</li>';
// Are there any members waiting for approval?
if (!empty($context['unapproved_members']))
echo '
<li>', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=admin;area=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'], '</li>';
// Show the total time logged in?
if (!empty($context['user']['total_time_logged_in']))
{
echo '
<li>', $txt['totalTimeLogged1'];
// If days is just zero, don't bother to show it.
if ($context['user']['total_time_logged_in']['days'] > 0)
echo $context['user']['total_time_logged_in']['days'] . $txt['totalTimeLogged2'];
// Same with hours - only show it if it's above zero.
if ($context['user']['total_time_logged_in']['hours'] > 0)
echo $context['user']['total_time_logged_in']['hours'] . $txt['totalTimeLogged3'];
// But, let's always show minutes - Time wasted here: 0 minutes ;).
echo $context['user']['total_time_logged_in']['minutes'], $txt['totalTimeLogged4'], '
</li>';
}
if (!empty($context['open_mod_reports']) && $context['show_open_reports'])
echo '
<li><a href="', $scripturl, '?action=moderate;area=reports">', sprintf($txt['mod_reports_waiting'], $context['open_mod_reports']), '</a></li>';
echo '
</ul>';
}
// Otherwise they're a guest - this time ask them to either register or login - lazy bums...
elseif (!empty($context['show_login_bar']))
{
echo '
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form class="windowbg" id="guest_form" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, '' . $context['session_id'] . '');"' : '', '>
', $txt['login_or_register'], '<br />
<input type="text" name="user" size="10" class="input_text" />
<input type="password" name="passwrd" size="10" class="input_password" />
<select name="cookielength">
<option value="60">', $txt['one_hour'], '</option>
<option value="1440">', $txt['one_day'], '</option>
<option value="10080">', $txt['one_week'], '</option>
<option value="43200">', $txt['one_month'], '</option>
<option value="-1" selected="selected">', $txt['forever'], '</option>
</select>
<input type="submit" value="', $txt['login'], '" class="button_submit" /><br />
', $txt['quick_login_dec'];
if (!empty($modSettings['enableOpenID']))
echo '
<br />
<input type="text" name="openid_identifier" id="openid_url" size="25" class="input_text openid_login" />';
echo '
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}
if ($context['user']['is_logged'] || !empty($context['show_login_bar']))
echo '
</div>
</div>';
echo '
<div id="news_section" class="titlebg2 clearfix"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
<form class="floatright" id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<a href="', $scripturl, '?action=search;advanced" title="', $txt['search_advanced'], '"><img id="advsearch" src="'.$settings['images_url'].'/filter.png" align="middle" alt="', $txt['search_advanced'], '" /></a>
<input type="text" name="search" value="" style="width: 150px; border: 1px dotted #ceb54b; background: #242424; color: white;" class="input_text" />
<input type="submit" name="submit" value="', $txt['search'], '" style="width: 11ex; border: 1px dotted #ceb54b; background: #242424; color: white;" class="button_submit" />
<input type="hidden" name="advanced" value="0" />';
// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';
// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';
echo '
</form>';
// Show a random news item? (or you could pick one from news_lines...)
if (!empty($settings['enable_news']))
echo '
<div id="random_news"><h3>', $txt['news'], ':</h3><p>', $context['random_news_line'], '</p></div>';
echo '
</div>
</div>';
// Define the upper_section toggle in JavaScript.
echo '
<script type="text/javascript"><!-- // --><![CDATA[
var oMainHeaderToggle = new smc_Toggle({
bToggleEnabled: true,
bCurrentlyCollapsed: ', empty($options['collapse_header']) ? 'false' : 'true', ',
aSwappableContainers: [
'user_section',
'news_section'
],
aSwapImages: [
{
sId: 'upshrink',
srcExpanded: smf_images_url '/upshrink.gif',
altExpanded: ', JavaScriptEscape($txt['upshrink_description']), ',
srcCollapsed: smf_images_url '/upshrink2.gif',
altCollapsed: ', JavaScriptEscape($txt['upshrink_description']), '
}
],
oThemeOptions: {
bUseThemeSettings: ', $context['user']['is_guest'] ? 'false' : 'true', ',
sOptionName: 'collapse_header',
sSessionVar: ', JavaScriptEscape($context['session_var']), ',
sSessionId: ', JavaScriptEscape($context['session_id']), '
},
oCookieOptions: {
bUseCookie: ', $context['user']['is_guest'] ? 'true' : 'false', ',
sCookieName: 'upshrink'
}
});
// ]]></script>';
// Show the menu here, according to the menu sub template.
echo '
<div id="toolbar">
',template_menu(),'
</div>';
// Show the navigation tree.
theme_linktree();
// The main content should go here.
echo '
<div id="content_wrap">';
}
Mój styl:
http://custom.simplemachines.org/themes/index.php?lemma=2216U?ywam wersji 2.0 RC 4