1 Sierpień 2010, 04:47
30269 Wiadomości - 5580 wątkach, - 3511 Użytkowników

Autor Wątek: Jak zrobić własne menu ?  (Przeczytany 155 razy)

0 Użytkowników i 1 Gość przegląda ten wątek.

Offline Heatbeat

  • Stały bywalec
  • ****
  • Wiadomości: 55
  • Pomógł: +0/-0
  • Płeć: Mężczyzna
  • Domyślny styl: default
  • Wersja SMF: 1.1.11
  • Użytkownik jest na liście obserwowanychObserwowany
Jak zrobić własne menu ?
« dnia: 27 Luty 2010, 15:23 »
Witam

zastanawiam się właśnie jak wykonać proste menu, a jako że cieniutko z moim kodowaniem to chciałbym was prosic o podpowiedź bo podmiana grafiki jest mało optymalnym rozwiązaniem w tym wypadku. Chciałbym utworzyć typową belke-menu , która korzystałaby tylko z jednej grafiki 'catbg' (posiadam styl defaultowy) i była tej samej szerokości co forum, szukałem w modach lecz znalazłem tylko BK-SMF Drop Down Menu które ma rozwijane menu a to mnie nie interesuje.

czy wszystkie informacje potrzebne mi do zmiany menu są zawarte tutaj ? czy również coś w style.css ?


// Show the start of the tab section.
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: px;">
<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>';



Czekam na odp.Pzdr.
« Ostatnia zmiana: 27 Luty 2010, 16:08 wysłana przez Heatbeat »

Offline Nolt

  • Administrator
  • *****
  • Wiadomości: 1473
  • Pomógł: +110/-17
  • Płeć: Mężczyzna
    • Wizzi
  • Domyślny styl: Argentum
  • Wersja SMF: 2.0 RC 3
Odp: Jak zrobić własne menu ?
« Odpowiedź #1 dnia: 27 Luty 2010, 16:39 »
W pliku .css także, miejsca zazwyczaj z komentarzami menu ;)
www.wizzi.pl - polskie wsparcie MaNGOS i TinyPortal

SMF.PL FAQ
nie odpowiadam na żadne PW, więc ich nie wysyłajcie chyba że zostaniecie o to poproszeni

 

Related Topics

  Temat / Zaczęty przez Odpowiedzi Ostatnia wiadomość
0 Odpowiedzi
953 Wyświetleń
Ostatnia wiadomość 22 Grudzień 2006, 12:57
wysłana przez Smugller
19 Odpowiedzi
3295 Wyświetleń
Ostatnia wiadomość 15 Kwiecień 2007, 17:24
wysłana przez ronin
1 Odpowiedzi
389 Wyświetleń
Ostatnia wiadomość 9 Listopad 2007, 10:03
wysłana przez ronin
6 Odpowiedzi
636 Wyświetleń
Ostatnia wiadomość 20 Listopad 2007, 08:31
wysłana przez Nolt
0 Odpowiedzi
581 Wyświetleń
Ostatnia wiadomość 27 Czerwiec 2008, 12:34
wysłana przez K0wal