SMF Menü Stil

Asi Ruh

Kayıtlı Üye
[FONT=Verdana, Arial, Helvetica, sans-serif]SMF Menü Stil[/FONT]




Önemli: Anlatımlar Default içindir...

Bölüm 1 - CSS Indent Menu

Çok basit paint bilgisi ile forumunuzun kendi titlebg'si ile menu stili yapabilirsiniz.

index.template.php'de..
Bul:

PHP:
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
    global $context, $settings, $options, $scripturl, $txt;
 
    // Work out where we currently are.
    $current_action = 'home';
    if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
        $current_action = 'admin';
    if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
        $current_action = $context['current_action'];
    if ($context['current_action'] == 'search2')
        $current_action = 'search';
    if ($context['current_action'] == 'theme')
        $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
 
    // Are we using right-to-left orientation?
    if ($context['right_to_left'])
    {
        $first = 'last';
        $last = 'first';
    }
    else
    {
        $first = 'first';
        $last = 'last';
    }
 
    // Show the start of the tab section.
    echo '
            <table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
                <tr>
                    <td class="maintab_' , $first , '"> </td>';
 
    // Show the [home] button.
    echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
                <td valign="top" class="maintab_' , $current_action == 'home' ? 'active_back' : 'back' , '">
                    <a href="', $scripturl, '">' , $txt[103] , '</a>
                </td>' , $current_action == 'home' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
 
    // Show the [help] button.
    echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
                <td valign="top" class="maintab_' , $current_action == 'help' ? 'active_back' : 'back' , '">
                    <a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
                </td>' , $current_action == 'help' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
 
    // How about the [search] button?
    if ($context['allow_search'])
        echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
                <td valign="top" class="maintab_' , $current_action == 'search' ? 'active_back' : 'back' , '">
                    <a href="', $scripturl, '?action=search">' , $txt[182] , '</a>
                </td>' , $current_action == 'search' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
 
    // Is the user allowed to administrate at all? ([admin])
    if ($context['allow_admin'])
        echo ($current_action == 'admin' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
                <td valign="top" class="maintab_' , $current_action == 'admin' ? 'active_back' : 'back' , '">
                    <a href="', $scripturl, '?action=admin">' , $txt[2] , '</a>
                </td>' , $current_action == 'admin' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
 
    // Edit Profile... [profile]
    if ($context['allow_edit_profile'])
        echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
                <td valign="top" class="maintab_' , $current_action == 'profile' ? 'active_back' : 'back' , '">
                    <a href="', $scripturl, '?action=profile">' , $txt[79] , '</a>
                </td>' , $current_action == 'profile' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
 
    // Go to PM center... [pm]
    if ($context['user']['is_logged'] && $context['allow_pm'])
        echo ($current_action == 'pm' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
                <td valign="top" class="maintab_' , $current_action == 'pm' ? 'active_back' : 'back' , '">
                    <a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a>
                </td>' , $current_action == 'pm' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
 
    // The [calendar]!
    if ($context['allow_calendar'])
        echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
                <td valign="top" class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'back' , '">
                    <a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
                </td>' , $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
 
    // the [member] list button
    if ($context['allow_memberlist'])
        echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
                <td valign="top" class="maintab_' , $current_action == 'mlist' ? 'active_back' : 'back' , '">
                    <a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a>
                </td>' , $current_action == 'mlist' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
 
 
    // If the user is a guest, show [login] button.
    if ($context['user']['is_guest'])
        echo ($current_action == 'login' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
                <td valign="top" class="maintab_' , $current_action == 'login' ? 'active_back' : 'back' , '">
                    <a href="', $scripturl, '?action=login">' , $txt[34] , '</a>
                </td>' , $current_action == 'login' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
 
 
    // If the user is a guest, also show [register] button.
    if ($context['user']['is_guest'])
        echo ($current_action == 'register' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
                <td valign="top" class="maintab_' , $current_action == 'register' ? 'active_back' : 'back' , '">
                    <a href="', $scripturl, '?action=register">' , $txt[97] , '</a>
                </td>' , $current_action == 'register' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
 
 
    // Otherwise, they might want to [logout]...
    if ($context['user']['is_logged'])
        echo ($current_action == 'logout' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </td>' : '' , '
                <td valign="top" class="maintab_' , $current_action == 'logout' ? 'active_back' : 'back' , '">
                    <a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a>
                </td>' , $current_action == 'logout' ? '<td class="maintab_active_' . $last . '"> </td>' : '';
 
    // The end of tab section.
    echo '
                <td class="maintab_' , $last , '"> </td>
            </tr>
        </table>';
 
}

Değiştir:

PHP:
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
    global $context, $settings, $options, $scripturl, $txt, $modSettings;
 
    echo '
    <div class="indentmenu">
        <ul>';
 
    // Show the default [home] button.
    echo    '<li><a href="', $scripturl, '">' , $txt[103] , '</a></li>';
 
    // How about the [search] button?
    if ($context['allow_search'])
        echo '<li><a href="', $scripturl, '?action=search">' , $txt[182] , '</a></li>';
 
    // Is the user allowed to administrate at all? ([admin])
    if ($context['allow_admin'])
        echo    '<li><a href="', $scripturl, '?action=admin">' , $txt[2] , '</a></li>';
 
    // Edit Profile... [profile]
    if ($context['allow_edit_profile'])
        echo '<li><a href="', $scripturl, '?action=profile">' , $txt[79] , '</a></li>';
 
    // Go to PM center... [pm]
    if ($context['user']['is_logged'] && $context['allow_pm'])
        echo '<li><a href="', $scripturl, '?action=pm">' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</a></li>';
 
    // the [member] list button
    if ($context['allow_memberlist'])
        echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</a></li>';
 
    // The [calendar]!
    if ($context['allow_calendar'])
        echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';
 
    // If the user is a guest, show [login] button.
    if ($context['user']['is_guest'])
        echo '<li><a href="', $scripturl, '?action=login">' , $txt[34] , '</a></li>';
 
 
    // If the user is a guest, also show [register] button.
    if ($context['user']['is_guest'])
        echo '<li><a href="', $scripturl, '?action=register">' , $txt[97] , '</a></li>';
 
 
    // Otherwise, they might want to [logout]...
    if ($context['user']['is_logged'])
        echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">' , $txt[108] , '</a></li>';
 
    echo '</ul></div>
 
<br style="clear: left" />';
 
}

Style.css'de en alta ekle..

PHP:
.indentmenu{
font: bold 13px Arial;
width: 100%; /*leave this value as is in most cases*/
}
 
.indentmenu ul{
border-left:0px solid #000000; border-right:0px solid #000000; border-top:1px solid #000000; border-bottom:1px solid #000000; margin:0; padding:0; float: left;
width: 100%; /*width of menu*/
/*dark purple border*/
background: black url('images/indentbg.gif') repeat-x center;
}
 
.indentmenu ul li{
display: inline;
}
 
.indentmenu ul li a{
float: left;
color: white; /*text color*/
padding: 5px 10px;
text-decoration: none;
border-right: 1px solid #000000; /*dark purple divider between menu items*/
}
 
.indentmenu ul li a:visited{
color: white;
}
 
.indentmenu ul li a:hover, .indentmenu ul li .current{
color: white !important; /*text color of selected and active item*/
padding-top: 6px; /*shift text down 1px for selected and active item*/
padding-bottom: 4px; /*shift text down 1px for selected and active item*/
background: black url('images/indentbg2.gif') repeat-x center;
}

Ve son olarak ekteki resimleri temanızın images klasörüne atıyorsunuz..
Sizde kendi titlebg'nizi ekteki resimleri örnek alarak editleyin. (boyutu ve tersi-düzü)

http://www.upshare.net/download.php?id=DA0ACF779&setlang=en
 
bayigram takipçi satın al instagram beğeni satın al instagram takipçi satın al tiktok takipçi satın al Buy Followers bugün haber
vozol
Geri
Üst