Mootools Menu (Hareketli Forum Menusu)

Başlatan Maxi, 22 Tem 2014, 20:04

« önceki - sonraki »

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

Maxi

Anlatım Default 1.1.x içindir..

index.template.php
Bul:
Kod [Seç]
// 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 , '">&nbsp;</td>';

    // Show the [home] button.
    echo ($current_action=='home' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</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 . '">&nbsp;</td>' : '';

    // Show the [help] button.
    echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</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 . '">&nbsp;</td>' : '';

    // How about the [search] button?
    if ($context['allow_search'])
        echo ($current_action == 'search' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</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 . '">&nbsp;</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 . '">&nbsp;</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 . '">&nbsp;</td>' : '';

    // Edit Profile... [profile]
    if ($context['allow_edit_profile'])
        echo ($current_action == 'profile' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</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 . '">&nbsp;</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 . '">&nbsp;</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 . '">&nbsp;</td>' : '';

    // The [calendar]!
    if ($context['allow_calendar'])
        echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</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 . '">&nbsp;</td>' : '';

    // the [member] list button
    if ($context['allow_memberlist'])
        echo ($current_action == 'mlist' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</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 . '">&nbsp;</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 . '">&nbsp;</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 . '">&nbsp;</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 . '">&nbsp;</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 . '">&nbsp;</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 . '">&nbsp;</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 . '">&nbsp;</td>' : '';

    // The end of tab section.
    echo '
                <td class="maintab_' , $last , '">&nbsp;</td>
            </tr>
        </table>';

}


Değiştir:
Kod [Seç]
// Show the menu up top.  Something like [home] [help] [pm] [logout] [login] ...
function template_menu()
{
          global $context, $settings, $options, $scripturl, $txt;


    echo '
    <div id="kwick">
    <ul class="kwicks">';

          // Show the [home] button.
                       echo '<li><a href="', $scripturl, '" class="kwick opt1">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[103]), '</span></a></li>';

          // Show the [help] button.
                       echo '<li><a href="', $scripturl, '?action=help" class="kwick opt2" >', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[119]), '</span></a></li>';

          // How about the [search] button?
          if ($context['allow_search'])
                     echo '<li><a href="', $scripturl, '?action=search" class="kwick opt3">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="' . $txt[182] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[182]), '</span></a></li>';

          // Is the user allowed to administrate at all? ([admin])
          if ($context['allow_admin']){
                     echo '<li><a href="', $scripturl, '?action=admin" class="kwick opt4">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/admin.gif" alt="' . $txt[2] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[2]), '</span></a></li>';
            }
          // Edit Profile [profile] :x
          if ($context['allow_edit_profile'])
                     echo '<li><a href="', $scripturl, '?action=profile" class="kwick opt5">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/profile.gif" alt="' . $txt[79] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[467]), '</span></a></li>';

          // The Private Message [PM]!
          if ($context['allow_pm'])
                     echo '<li><a href="', $scripturl, '?action=pm" class="kwick opt6">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/pm.gif" alt="' . $txt[144] . '" style="margin: 0px 0;" border="0" /><span>' : $txt['smf199']), '</span></a></li>';

          // The [calendar]!
          if ($context['allow_calendar'])
                     echo '<li><a href="', $scripturl, '?action=calendar" class="kwick opt7">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/calendar.gif" alt="' . $txt['calendar24'] . '" style="margin: 0px 0;" border="0" /><span>' : $txt['calendar24']), '</span></a></li>';
         
          // The [member] list button
          if ($context['allow_memberlist'])
                     echo '<li><a href="', $scripturl, '?action=mlist" class="kwick opt8">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/memberlist.gif" alt="' . $txt[331] .'" style="margin: 0px 0;" border="0" /><span>' : $txt[331]), '</span></a></li>';
                 
          // If the user is a guest, show [login] button.
          if ($context['user']['is_guest'])         
                     echo '<li><a href="', $scripturl, '?action=login" class="kwick opt9">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.gif" alt="' . $txt[34] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[34]), '</span></a></li>';

          // If the user is a guest, show [register] button.
          if ($context['user']['is_guest'])   
                     echo '<li><a href="', $scripturl, '?action=register" class="kwick opt10">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.gif" alt="' . $txt[97] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[97]), '</span></a></li>';
         
          // Otherwise, they might want to [logout]...
          if ($context['user']['is_logged'])
                       echo '<li><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '" class="kwick opt11">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" style="margin: 0px 0;" border="0" /><span>' : $txt[108]), '</span></a></li>';
               

                  echo '</ul></div>';


}


Bul:
Kod [Seç]
</head>

Öncesine ekle:
Kod [Seç]
<script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/mootools.js"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/imageMenu.js"></script>
<script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/kwick.js"></script>


Style.css
En sona ekle:
Kod [Seç]
/*MooTools Menu */

#kwick {
    width: 100%;
}

#kwick .kwicks {
    background-color:transparent;
    display: block;
    height: 80px;
    margin: 0px;
    margin-top: 8px;
    padding: 0
   
}

#kwick li {
    float: left;
    margin: 0;
    padding: 0;
    list-style: none;
}

#kwick .kwick {
    display: block;
    cursor: pointer;
    overflow: hidden;
    height: 80px;
    width: 102px;
    background: #fff;
}

#kwick .kwick span {
    display: none;
}

#kwick .opt1 {
    background-color:transparent;
    outline: none
}

#kwick .opt2 {
    background-color:transparent;
    outline: none
}

#kwick .opt3 {
    background-color:transparent;
    outline: none
}

#kwick .opt4 {
    background-color:transparent;
    outline: none
}

#kwick .opt5 {
    background-color:transparent;
    outline: none
}

#kwick .opt6 {
    background-color:transparent;
    outline: none;
}

#kwick .opt7 {
    background-color:transparent;
    outline: none
}

#kwick .opt8 {
    background-color:transparent;
    outline: none
}

#kwick .opt9 {
    background-color:transparent;
    outline: none
}

#kwick .opt10 {
    background-color:transparent;
    outline: none
}

#kwick .opt11 {
    background-color:transparent;
    outline: none
    border-right: 0px none;
}


Son olarak ekteki turkish klasörünü, temanızın images klasörüne atın.
Ekteki diğer dosyaları da tema kalsörünüze atın.