Focus Slide Menu

Started by Hoochie Coochie Man, July 07, 2008, 06:59:52 AM

Previous topic - Next topic

Hoochie Coochie Man







Tüyo adı:Focus Slide Menu
Yazan:Hoochie Coochie Man
Açıklama:Fare ile buton üzerine geldiğinde arka plan flash gibi kayıyor.
Demo:http://slayeroffice.com/code/focus_slide/
Anlatım:Default temaya göredir

Style.css'de en sona ekle:
/* Focus Slide Menu by Hoochie Coochie Man | Powered by slayeroffice */
#mContainer {
position:relative;
margin:0 auto;
width:404px;
height:25px;
border-top:1px solid #638DA1;
border-bottom:1px solid #638DA1;
background-color:#F2F5F6;
padding:5px 0 0 0;
z-index:0;
}

#mContainer li {
position:relative;
display:inline;
margin:0 10px 0 12px;
font:0.8em arial,verdana;
padding:0;
z-index:20;
}

#mContainer li a {
text-decoration:none;
color:#638DA1;
}

#slider {
position:absolute;
background-color: #98B4C1;
border:1px solid #78919B;
width:74px;
height:20px;
padding:0;
z-index:1;
}

/* following styles are unrelated to the application */


#credits {
position:relative;
margin:25px auto 0px auto;
width:250px;
font:9px verdana;
border-top:1px solid #000;
border-bottom:1px solid #000;
height:90px;
}

#description {
position:relative;
margin:25px auto 0px auto;
width:250px;
font:9px verdana;
}

#credits img {
float:left;
margin:5px 10px 5px 0px;
border:1px solid #000000;
width:80px;
height:79px;
}
/* end unrelated */


index.template.php
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 id="mContainer">';

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

// Show the [help] button.
echo '<li><a href="', $scripturl, '?action=help">' , $txt[119] , '</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 [calendar]!
if ($context['allow_calendar'])
echo '<li><a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a></li>';

// the [member] list button
if ($context['allow_memberlist'])
echo '<li><a href="', $scripturl, '?action=mlist">' , $txt[331] , '</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> ';

}


Bul:
</head>

Öncesine ekle:
<script language="JavaScript" type="text/javascript" src="', $settings['theme_url'], '/focus_slide.js"></script>

Son olarak ekteki scripti tema dizininize atın.
İnadına SMF 1.1.X

βluΣ ЯosΣ

tşk güzel bi uygulama göze hoş geliyor..

Sinan ANDIRMAN

üstad ellerin dert görmesin yeni yapacağım temada bunu kullanmama izin verirmisin acaba ??? :)

Hoochie Coochie Man

Benim değilki güzel arkadaşım, istediğin gibi kullan. Ben SMF'ye uyarladım sadece ;)
SMF'ye Yazan: Hoochie Coochie Man
İnadına SMF 1.1.X

Sinan ANDIRMAN


Tanshaydar


Sinan ANDIRMAN

üstadım bende Load.php hatası verdi neden acaba???

Hoochie Coochie Man

index.template.php'ni eke koyar mısın?
İnadına SMF 1.1.X

Sinan ANDIRMAN

buyur üstad

Hoochie Coochie Man

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

// Show the [home] and [help] buttons.
echo '
<a href="', $scripturl, '">', $txt[103], '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=help">', $txt[119], '</a>', $context['menu_separator'];

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

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

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

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

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="', $scripturl, '?action=login">', $txt[34], '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=register">', $txt[97], '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', $txt[108], '</a>';
}


ve yukarıda verdiğim kod ile değiştir, aynı şekilde style.css yi ve scripti eklemeyi unutma.
İnadına SMF 1.1.X

Sinan ANDIRMAN

malesef üstad yine olmadı :(

UzM@N

hocam nerden aklınıza geliyor böyle şeyler güzel olmuş teşekkürler.
UzM@N

Hoochie Coochie Man

#12
Quote from: Sinan ANDIRMAN on July 11, 2008, 06:06:03 PM
malesef üstad yine olmadı :(
Olmadı derken ne olmadı yani? Ne hatası verdi?
Bak ben yaptım oldu.

kesin birşeyi eksik yapıyorsun..
İnadına SMF 1.1.X

Sinan ANDIRMAN

Fatal error: Call to undefined function template_menu() in C:\vhosts\bilgikervani.com\httpdocs\demo\Sources\Load.php(1726) : eval()'d code on line 326
hatası veriyor üstadım...

Hoochie Coochie Man

O zaman temanda yüklü herhangi bir tüyo ya da mod ile çakışıyordur.
İnadına SMF 1.1.X

Sinan ANDIRMAN

üstadım 0 tema hiç mod yüklemedim size zahmet olacak belki ama index.template dosyamda siz bi yaparmısınız veya demo sitenizin index.templateini yollarmısınız,saygılarımla...

Hoochie Coochie Man

#16
Birdaha bakmama gerek yok, dün baktım ya zaten, ne yapman gerektiğinide yazmıştım.

Edit: Bendeki index.template.php yok artık, yenisiyle değiştirdim..
İnadına SMF 1.1.X

Sinan ANDIRMAN

ewt üstad öleydi ben sadece sizin kodları yerleştirmenizi istemiştim,nese üstad kolay gelsin...

Hoochie Coochie Man

Ben dosyayı alıp, düzenleyip vererek yapılan desteğe karşıyım. Göstererek öğreterek ten yanayım.
Bende farklı birşey yapmayacaktım. Yapacağım kod değişikliğini zaten gösterdim sana.
Size de kolay gelsin..
İnadına SMF 1.1.X

~WannaBeDie

Hoş bir görünüm emeğine sağlık :)
Temmuz ayında yeni temalar tasarlamak istiyorum :) Var mı aklında hoş tasarımlar olan?Fikir verebilecek olan ? :)

Advertisement: