"Menu Stilleri" Temanızın menu butonlarından sıkıldınız mı? Olaya renk katalım!

Started by Hoochie Coochie Man, December 16, 2007, 06:11:09 PM

Previous topic - Next topic

Hoochie Coochie Man

Rica ederim :)

[Konudışı]Bugün askerlik şubesinden geliyorum. Malesef Kasım celbine katılamadım. Dilekçe gönderdim bakalım. Olmadı 2009 artık. PM atıyorum devamı için :P[/Konudışı]
İnadına SMF 1.1.X

barbaros_8888

Kafana takma hayırlısıyla gider gelirsin ben ne zaman nasıl yaptığımı bile unuttum. Allah herkese gidip gelmek nasip etsin. Zaten sen birkere o yola çıkmayı kafana takmışsın gerisi gelir kardeşim sakın kendini sıkıntıya falan sokma.


sazan


barbaros_8888


Hoochie Coochie Man

İnadına SMF 1.1.X

barbaros_8888


Enoli


barbaros_8888



Hoochie Coochie Man

Quote from: grafitus on August 17, 2008, 01:19:10 PM
Rica etsem HCM abi http://www.dynamicdrive.com/style/csslibrary/item/glossy_horizontal_menu/ bunu çevirebilirmisin teşekkürler...


Bölüm 13 - Glossy Horizontal Menu




 
/*Credits: By Santosh Setty (http://webdesigninfo.wordpress.com) */
/*Posted to: Dynamic Drive CSS Library (http://www.dynamicdrive.com/style/) */

.glossymenu{
position: relative;
padding: 0 0 0 34px;
margin: 0 auto 0 auto;
background: url(images/menur_bg.gif) repeat-x; /*tab background image path*/
height: 46px;
list-style: none;
}

.glossymenu li{
float:left;
}

.glossymenu li a{
float: left;
display: block;
color:#000;
text-decoration: none;
font-family: sans-serif;
font-size: 13px;
font-weight: bold;
padding:0 0 0 16px; /*Padding to accomodate left tab image. Do not change*/
height: 46px;
line-height: 46px;
text-align: center;
cursor: pointer;
}

.glossymenu li a b{
float: left;
display: block;
padding: 0 24px 0 8px; /*Padding of menu items*/
}

.glossymenu li.current a, .glossymenu li a:hover{
color: #fff;
background: url(images/menur_hover_left.gif) no-repeat; /*left tab image path*/
background-position: left;
}

.glossymenu li.current a b, .glossymenu li a:hover b{
color: #fff;
background: url(images/menur_hover_right.gif) no-repeat right top; /*right tab image path*/
}




Temanızın index.template.php dosyasını açın..
Bul:
// 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:
// 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';
}

echo '<ul class="glossymenu">';

// Show the [home] button.
echo '<li', $current_action == 'home' ? ' class="current"' : '', '><a href="', $scripturl, '"><span>' , $txt[103] , '</span></a></li>';

// Show the [help] button.
echo '<li', $current_action == 'help' ? ' class="current"' : '', '> <a href="', $scripturl, '?action=help"><span>' , $txt[119] , '</span></a></li>';

// How about the [search] button?
if ($context['allow_search'])
echo '<li', $current_action == 'search' ? ' class="current"' : '', '><a href="', $scripturl, '?action=search"><span>' , $txt[182] , '</span></a></li>';

// Is the user allowed to administrate at all? ([admin])
if ($context['allow_admin'])
echo '<li', $current_action == 'admin' ? ' class="current"' : '', '><a href="', $scripturl, '?action=admin"><span>' , $txt[2] , '</span></a></li>';

// Edit Profile... [profile]
if ($context['allow_edit_profile'])
echo '<li', $current_action == 'profile' ? ' class="current"' : '', '><a href="', $scripturl, '?action=profile"><span>' , $txt[79] , '</span></a></li>';

// Go to PM center... [pm]
if ($context['user']['is_logged'] && $context['allow_pm'])
echo '<li', $current_action == 'pm' ? ' class="current"' : '', '><a href="', $scripturl, '?action=pm"><span>' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong>'. $context['user']['unread_messages'] . '</strong>]' : '' , '</span></a></li>';

// The [calendar]!
if ($context['allow_calendar'])
echo '<li', $current_action == 'calendar' ? ' class="current"' : '', '><a href="', $scripturl, '?action=calendar"><span>' , $txt['calendar24'] , '</span></a></li>';

// the [member] list button
if ($context['allow_memberlist'])
echo '<li', $current_action == 'mlist' ? ' class="current"' : '', '><a href="', $scripturl, '?action=mlist"><span>' , $txt[331] , '</span></a></li>';

// If the user is a guest, show [login] button.
if ($context['user']['is_guest'])
echo '<li', $current_action == 'login' ? ' class="current"' : '', '><a href="', $scripturl, '?action=login"><span>' , $txt[34] , '</span></a></li>';


// If the user is a guest, also show [register] button.
if ($context['user']['is_guest'])
echo '<li', $current_action == 'register' ? ' class="current"' : '', '><a href="', $scripturl, '?action=register"><span>' , $txt[97] , '</span></a></li>';


// Otherwise, they might want to [logout]...
if ($context['user']['is_logged'])
echo '<li', $current_action == 'logout' ? ' class="current"' : '', '><a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><span>' , $txt[108] , '</span></a></li>';


echo '</ul> ';

}


Son olarak mesajın en başındaki linkteki resimleri temanızın images klasörüne atın.
İnadına SMF 1.1.X

grafitus

HCm abi bi sorun oldu.Ama smf 2.0 diye bakıp kaçma çünki bu cssden kaynaklanıyor!



menünün sağ resmi çıkmıyor çıkmıyor :S Deli olacağım bi bakarmsın ...

Hoochie Coochie Man

@grafitus, en rahatsız olduğum konu (destek konusunda) özel mesaj ile rahatsız edilmektir. İkidir mesaj atıyorsunuz ancak bu benim şevkimi kırmaktan başka bir işe yaramıyor.

Benim hiçbiryere kaçtığım yok, ilgi alanım ne ise, onda yardım ediyorum. 2.0'da sizi yanlış yönlendirebilirim. İyi günler..
İnadına SMF 1.1.X

BuЯЯЯЯaK

', $current_action == 'home' ? ' class="current"' : '', '

Action değerlerinden kaynaklanıyor olabilir grafitus .

[SiNaN]

2.0'ın menü yapısı tamamen farklı. O yüzden sorun yaşıyorsunuz. HCM verdiği kodlar 1.1.5 için.
Former SMF Core Developer | My Mods | SimplePortal

grafitus

Quote from: [SiNaN] on August 18, 2008, 07:33:25 AM
2.0'ın menü yapısı tamamen farklı. O yüzden sorun yaşıyorsunuz. HCM verdiği kodlar 1.1.5 için.

Evet farklı ve ben HCm abinin verdiği kodları smf 2.0 için editledim...Ancak styles.cssden kaynaklanan bi sorun var :S

Yağız...

style.css'dekileri aynen uygula. index.template.php'de bul:
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
    global $context, $settings, $options, $scripturl, $txt;

    // 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>';

    foreach ($context['menu_buttons'] as $act => $button)
        echo ($button['active_button'] || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '                <td valign="top" class="maintab_', $button['active_button'] ? 'active_back' : 'back', '">
                    <a href="', $button['href'], '">', $button['title'], '</a>
                </td>', $button['active_button'] ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

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

}

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

    foreach ($context['menu_buttons'] as $act => $button)
        echo '

            <li', $button['active_button'] ? ' class="current"' : '', '><a href="', $button['href'], '"><span>', $button['title'], '</span></a></li>';

}


Resimleride aynı şekilde images klasörüne atın. Denemedim hata olabilir.

grafitus

Yaptım olmadı.Ama kodlamada
1.glossymenu diye bişey yok
2.Kırmızı olarak gösterdiğim yerdde fazladan bi tane <span> var

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
    global $context, $settings, $options, $scripturl, $txt;

    foreach ($context['menu_buttons'] as $act => $button)
        echo '

            <li', $button['active_button'] ? ' class="current"' : '', '><span><a href="', $button['href'], '"><span>', $button['title'], '</span></a></li>';

}

Yağız...

Evde olmadığımdan bakamıyorum. En yakın zamanda bakmaya çalışacağım.

Yağız...

Tamam sorunu buldum. Hata bende :)
Çok özür dilerim.
Şu kodları dener misin:

function template_menu()
{
        global $context, $settings, $options, $scripturl, $txt;

        echo '<ul class="glossymenu">';

        foreach ($context['menu_buttons'] as $act => $button)

        echo '<li', $button['active_button'] ? ' class="current"' : '', '><a href="', $button['href'], '"><span>', $button['title'], '</span></a></li>';

        echo '</ul>';

}

Advertisement: