Simple Machines Community Forum

SMF Support => Türkçe Bölümü (Turkish) => Language Specific Support => İpuçları ve Hileler => Topic started by: Hoochie Coochie Man on July 07, 2008, 06:59:52 AM

Title: Focus Slide Menu
Post by: Hoochie Coochie Man on July 07, 2008, 06:59:52 AM






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.
Title: Re: Focus Slide Menu
Post by: βluΣ ЯosΣ on July 08, 2008, 12:41:29 PM
tşk güzel bi uygulama göze hoş geliyor..
Title: Re: Focus Slide Menu
Post by: Sinan ANDIRMAN on July 11, 2008, 04:33:18 PM
üstad ellerin dert görmesin yeni yapacağım temada bunu kullanmama izin verirmisin acaba ??? :)
Title: Re: Focus Slide Menu
Post by: Hoochie Coochie Man on July 11, 2008, 04:37:07 PM
Benim değilki güzel arkadaşım, istediğin gibi kullan. Ben SMF'ye uyarladım sadece ;)
SMF'ye Yazan: Hoochie Coochie Man
Title: Re: Focus Slide Menu
Post by: Sinan ANDIRMAN on July 11, 2008, 04:38:44 PM
tmm üstadım ;)
Title: Re: Focus Slide Menu
Post by: Tanshaydar on July 11, 2008, 05:02:21 PM
Opera'da çalışmıyor :(
Title: Re: Focus Slide Menu
Post by: Sinan ANDIRMAN on July 11, 2008, 05:07:08 PM
üstadım bende Load.php hatası verdi neden acaba???
Title: Re: Focus Slide Menu
Post by: Hoochie Coochie Man on July 11, 2008, 05:12:19 PM
index.template.php'ni eke koyar mısın?
Title: Re: Focus Slide Menu
Post by: Sinan ANDIRMAN on July 11, 2008, 05:25:26 PM
buyur üstad
Title: Re: Focus Slide Menu
Post by: Hoochie Coochie Man on July 11, 2008, 05:43:43 PM
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.
Title: Re: Focus Slide Menu
Post by: Sinan ANDIRMAN on July 11, 2008, 06:06:03 PM
malesef üstad yine olmadı :(
Title: Re: Focus Slide Menu
Post by: UzM@N on July 11, 2008, 06:34:29 PM
hocam nerden aklınıza geliyor böyle şeyler güzel olmuş teşekkürler.
Title: Re: Focus Slide Menu
Post by: Hoochie Coochie Man on July 12, 2008, 02:05:26 AM
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. (http://smfthemes.890m.com/forum/index.php)

kesin birşeyi eksik yapıyorsun..
Title: Re: Focus Slide Menu
Post by: Sinan ANDIRMAN on July 12, 2008, 04:39:07 AM
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...
Title: Re: Focus Slide Menu
Post by: Hoochie Coochie Man on July 12, 2008, 05:00:14 AM
O zaman temanda yüklü herhangi bir tüyo ya da mod ile çakışıyordur.
Title: Re: Focus Slide Menu
Post by: Sinan ANDIRMAN on July 12, 2008, 06:14:24 AM
ü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...
Title: Re: Focus Slide Menu
Post by: Hoochie Coochie Man on July 12, 2008, 06:19:05 AM
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..
Title: Re: Focus Slide Menu
Post by: Sinan ANDIRMAN on July 12, 2008, 07:41:49 AM
ewt üstad öleydi ben sadece sizin kodları yerleştirmenizi istemiştim,nese üstad kolay gelsin...
Title: Re: Focus Slide Menu
Post by: Hoochie Coochie Man on July 12, 2008, 07:46:37 AM
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..
Title: Re: Focus Slide Menu
Post by: ~WannaBeDie on July 15, 2008, 01:26:25 PM
Hoş bir görünüm emeğine sağlık :)
Title: Re: Focus Slide Menu
Post by: Balaban on December 05, 2008, 06:46:06 PM
Hocam , uyguladım güzel de oldu fakat bir sorun var...
Ziyaretçiyken , menudeki yazılar ortalanmıyor.
Giriş yaptıktan sonrada iki tanesi alta kayıyor ve cok cırkın bır goruntu olusturuyor...

buyrun demo..
http://eyeless.byethost31.com/1/index.php (http://eyeless.byethost31.com/1/index.php)
user : demo
pass : 151515


edit : menu uzunlugunu degıstırdım fakat yazıları ortalamak gerek sanırım..
ama ortayalayamadım .
Title: Re: Focus Slide Menu
Post by: _ImmorTaL_ on August 01, 2010, 11:35:53 AM
teşekkürler