"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

Bölüm 12 - 3D CSS buttons



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;

// 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, $modSettings;

echo '
';

// Show the default [home] button.
echo '<a href="', $scripturl, '" class="cssbutton">' , $txt[103] , '</a>';

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

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

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

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

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

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

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


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


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

echo '</div>

';

}


Style.css 'de en alta ekle.
.rssbutton{
background-color: #ff6600;
border: 1px #ff6600 outset;
padding: 0 2px;
color: white;
text-decoration: none;
font: bold 10px Verdana;
}

.rssbutton:visited, .rssbutton:hover, .rssbutton:active{
color: white;
}

.cssbutton{
background-color: #d1ec4c;
border: 2px #d1ec4c outset;
padding: 1px 4px;
color: black;
text-decoration: none;
font: bold 90% "Lucida Grande", "Trebuchet MS", Verdana, Helvetica, sans-serif;
}

.cssbutton:visited{
color: black;
}

.cssbutton:hover{
border-style: inset;
background-color: #e3f48e;
padding: 2px 3px 0 5px; /*shift text 1px to the right and down*/
}

.cssbutton:active{
color: black;
}



İnadına SMF 1.1.X

Hoochie Coochie Man

Ana index'ide yaptık, bitti sonunda :) Arada bir yeni versiyonları eklerim şimdilik böyle kalsın.. İyi eğlenceler..
İnadına SMF 1.1.X

Zature



CorluMaster

The_KorsaN07

hxxp:ww.korsan-gemisi.com [nonactive] hxxp:www.korsan-gemisi.org [nonactive] hxxp:www.sanalboard.org [nonactive]

CorluMaster

deejayss

hey gidi günler hey.

Hoochie Coochie Man

İnadına SMF 1.1.X

Sweet Rebel

solid menüde ssola kayıyodu.Yane forum bi yerde bannerla menü bi yerde style.css ile biraz oynadım normal oldu.ÇooOOook saol.DynamicDrive'ın başka menülerini smf'ye denemiştim daha önce becerememiştim ama sonunda istediimi buldum xD

CADTURKEY


Hoochie Coochie Man

Blues Temasını kullanın. Default temaya entegre edilmiş, aynı şey..
Temayı imzama tıklayarak edinebilirsiniz..
Hemde yakında multicolorı çıkacak!


İnadına SMF 1.1.X

husmen73 (Gulhin)

TARTIŞMA ORTAMI YARATMAK YERİNE, MODERATÖRLERE DURUMU BİLDİRİNİZ.
-Kurumsal Kimlik Web Tasarım Hizmeti.
Gülhin Portal Sistemi hakkında yorumlarınızı bekliyorum.
SMF
Referanslar --> http://www.gulhin.com/referanslar-portfoy/
-Web Tasarımı ve Tema Tasarımı Sitesi www.gulhin.com
-TOPLU MAİL GÖNDERİMİ --> http://www.toplumailsms.com
E-Ticaret Sistemi yaptırmak mı istiyorsunuz?

yassin92

Ya bunları ekliyeceğimiz yeri bulamadım nerede c  de flnmı :s yardım pls  örneğin; index.template.php dosyası nerede :s  c klasöründe flnmı???

Fussilet

başka versiyonları yok mu Hoochie Coochie Man   kardeşim... ;) 
varsa sevinirim

Hoochie Coochie Man

Quote from: Fussilet on March 16, 2008, 05:11:11 AM
başka versiyonları yok mu Hoochie Coochie Man   kardeşim... ;) 
varsa sevinirim
Var tabi, boş zamanımda koyarım kardeşim.
İnadına SMF 1.1.X

TURKWAREZ

hojam; su Bölüm 6  - Solid Block Menu adli menu stilini nasil ortalayabilirim 'center' yapmaya calistim ama hata aldim, yardimci olursan sevinirim

Hoochie Coochie Man

<ul class="solidblockmenu">
Bundan önce <div align="center"> koyabilirsin, aşağıyada </ul> bundan sorna </div> ile kapat.
style.css de de bunu sil float: left; menu küçlcek ama yinede ortalancak, aklıma şimdilik başka fikir gelmiyor, gelirse yazarım.
İnadına SMF 1.1.X

TURKWAREZ

menu ortalaniyor ama arkadaki resimler bozuluyor ve ortalananlar alt alta oluyor

Hoochie Coochie Man

Dediğim gibi, kendi sitelerinde bile çözüm yok! (Böyle gaza getireyimde belki bi cengaver çıkar..)
İnadına SMF 1.1.X

TURKWAREZ



Hoochie Coochie Man

İnadına SMF 1.1.X

Advertisement: