Menüye giriş yap butonu nasıl eklerim?

Başlatan BöcekBaşı, 11 Oca 2019 09:19

« önceki - sonraki »

0 Üye ve 1 Ziyaretçi konuyu incelemekte.

BöcekBaşı

http://prntscr.com/m5orkd bu alana giriş yap butonunu nasıl eklerim acaba? ve http://prntscr.com/m5orv5 bu alanı tamamen nasıl kaldırabilirim?
Çok sorum olacak bu aralar sabırla cevaplıyorsunuz teşekkürler.

gecitli

1.soru

Subs.php dosyasında :

Bul :

Kod [Seç]
'mlist_search' => array(
'title' => $txt['mlist_search'],
'href' => $scripturl . '?action=mlist;sa=search',
'show' => true,
'is_last' => true,
),
),
),

sonrasina ekleyin

Kod [Seç]
'login' => array(
'title' => $txt['login'],
'href' => $scripturl . '?action=login',
'show' => $user_info['is_guest'],
'sub_buttons' => array(
),
),

2.soru

index.template.php de bulup silin

Kod [Seç]
<div id="top_section">
<div class="inner_wrap">';

// If the user is logged in, display some things that might be useful.
if ($context['user']['is_logged'])
{
// Firstly, the user's menu
echo '
<ul class="floatleft" id="top_info">
<li>
<a href="', $scripturl, '?action=profile"', !empty($context['self_profile']) ? ' class="active"' : '', ' id="profile_menu_top" onclick="return false;">';

if (!empty($context['user']['avatar']))
echo $context['user']['avatar']['image'];

echo $context['user']['name'], '</a>
<div id="profile_menu" class="top_menu"></div>
</li>';

// Secondly, PMs if we're doing them
if ($context['allow_pm'])
echo '
<li>
<a href="', $scripturl, '?action=pm"', !empty($context['self_pm']) ? ' class="active"' : '', ' id="pm_menu_top">', $txt['pm_short'], !empty($context['user']['unread_messages']) ? ' <span class="amt">' . $context['user']['unread_messages'] . '</span>' : '', '</a>
<div id="pm_menu" class="top_menu scrollable"></div>
</li>';

// Thirdly, alerts
echo '
<li>
<a href="', $scripturl, '?action=profile;area=showalerts;u=', $context['user']['id'], '"', !empty($context['self_alerts']) ? ' class="active"' : '', ' id="alerts_menu_top">', $txt['alerts'], !empty($context['user']['alerts']) ? ' <span class="amt">' . $context['user']['alerts'] . '</span>' : '', '</a>
<div id="alerts_menu" class="top_menu scrollable"></div>
</li>';

// And now we're done.
echo '
</ul>';
}
// Otherwise they're a guest. Ask them to either register or login.
elseif (empty($maintenance))
echo '
<ul class="floatleft welcome">
<li>', sprintf($txt[$context['can_register'] ? 'welcome_guest_register' : 'welcome_guest'], $txt['guest_title'], $context['forum_name_html_safe'], $scripturl . '?action=login', 'return reqOverlayDiv(this.href, ' . JavaScriptEscape($txt['login']) . ');', $scripturl . '?action=signup'), '</li>
</ul>';
else
// In maintenance mode, only login is allowed and don't show OverlayDiv
echo '
<ul class="floatleft welcome">
<li>', sprintf($txt['welcome_guest'], $txt['guest_title'], '', $scripturl . '?action=login', 'return true;'), '</li>
</ul>';

if (!empty($modSettings['userLanguage']) && !empty($context['languages']) && count($context['languages']) > 1)
{
echo '
<form id="languages_form" method="get" class="floatright">
<select id="language_select" name="language" onchange="this.form.submit()">';

foreach ($context['languages'] as $language)
echo '
<option value="', $language['filename'], '"', isset($context['user']['language']) && $context['user']['language'] == $language['filename'] ? ' selected="selected"' : '', '>', str_replace('-utf8', '', $language['name']), '</option>';

echo '
</select>
<noscript>
<input type="submit" value="', $txt['quick_mod_go'], '">
</noscript>
</form>';
}

if ($context['allow_search'])
{
echo '
<form id="search_form" class="floatright" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
<input type="search" name="search" value="">&nbsp;';

// Using the quick search dropdown?
$selected = !empty($context['current_topic']) ? 'current_topic' : (!empty($context['current_board']) ? 'current_board' : 'all');

echo '
<select name="search_selection">
<option value="all"', ($selected == 'all' ? ' selected' : ''), '>', $txt['search_entireforum'], ' </option>';

// Can't limit it to a specific topic if we are not in one
if (!empty($context['current_topic']))
echo '
<option value="topic"', ($selected == 'current_topic' ? ' selected' : ''), '>', $txt['search_thistopic'], '</option>';

// Can't limit it to a specific board if we are not in one
if (!empty($context['current_board']))
echo '
<option value="board"', ($selected == 'current_board' ? ' selected' : ''), '>', $txt['search_thisboard'], '</option>';

// Can't search for members if we can't see the memberlist
if (!empty($context['allow_memberlist']))
echo '
<option value="members"', ($selected == 'members' ? ' selected' : ''), '>', $txt['search_members'], ' </option>';

echo '
</select>';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="sd_topic" value="', $context['current_topic'], '">';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="sd_brd" value="', $context['current_board'], '">';

echo '
<input type="submit" name="search2" value="', $txt['search'], '" class="button">
<input type="hidden" name="advanced" value="0">
</form>';
}

echo '
</div><!-- .inner_wrap -->
</div><!-- #top_section -->';

echo '


BöcekBaşı

11 Oca 2019 14:08 #2 Son düzenlenme: 12 Oca 2019 10:25 BöcekBaşı
Alıntı yapılan: gecitli - 11 Oca 2019 12:021.soru

Subs.php dosyasında :

Bul :

Kod [Seç]
'mlist_search' => array(
 'title' => $txt['mlist_search'],
 'href' => $scripturl . '?action=mlist;sa=search',
 'show' => true,
 'is_last' => true,
 ),
 ),
 ),

sonrasina ekleyin

Kod [Seç]
'login' => array(
 'title' => $txt['login'],
 'href' => $scripturl . '?action=login',
 'show' => $user_info['is_guest'],
 'sub_buttons' => array(
 ),
 ),

2.soru

index.template.php de bulup silin

Kod [Seç]
<div id="top_section">
 <div class="inner_wrap">';

 // If the user is logged in, display some things that might be useful.
 if ($context['user']['is_logged'])
 {
 // Firstly, the user's menu
 echo '
 <ul class="floatleft" id="top_info">
 <li>
 <a href="', $scripturl, '?action=profile"', !empty($context['self_profile']) ? ' class="active"' : '', ' id="profile_menu_top" onclick="return false;">';

 if (!empty($context['user']['avatar']))
 echo $context['user']['avatar']['image'];

 echo $context['user']['name'], '</a>
 <div id="profile_menu" class="top_menu"></div>
 </li>';

 // Secondly, PMs if we're doing them
 if ($context['allow_pm'])
 echo '
 <li>
 <a href="', $scripturl, '?action=pm"', !empty($context['self_pm']) ? ' class="active"' : '', ' id="pm_menu_top">', $txt['pm_short'], !empty($context['user']['unread_messages']) ? ' <span class="amt">' . $context['user']['unread_messages'] . '</span>' : '', '</a>
 <div id="pm_menu" class="top_menu scrollable"></div>
 </li>';

 // Thirdly, alerts
 echo '
 <li>
 <a href="', $scripturl, '?action=profile;area=showalerts;u=', $context['user']['id'], '"', !empty($context['self_alerts']) ? ' class="active"' : '', ' id="alerts_menu_top">', $txt['alerts'], !empty($context['user']['alerts']) ? ' <span class="amt">' . $context['user']['alerts'] . '</span>' : '', '</a>
 <div id="alerts_menu" class="top_menu scrollable"></div>
 </li>';

 // And now we're done.
 echo '
 </ul>';
 }
 // Otherwise they're a guest. Ask them to either register or login.
 elseif (empty($maintenance))
 echo '
 <ul class="floatleft welcome">
 <li>', sprintf($txt[$context['can_register'] ? 'welcome_guest_register' : 'welcome_guest'], $txt['guest_title'], $context['forum_name_html_safe'], $scripturl . '?action=login', 'return reqOverlayDiv(this.href, ' . JavaScriptEscape($txt['login']) . ');', $scripturl . '?action=signup'), '</li>
 </ul>';
 else
 // In maintenance mode, only login is allowed and don't show OverlayDiv
 echo '
 <ul class="floatleft welcome">
 <li>', sprintf($txt['welcome_guest'], $txt['guest_title'], '', $scripturl . '?action=login', 'return true;'), '</li>
 </ul>';

 if (!empty($modSettings['userLanguage']) && !empty($context['languages']) && count($context['languages']) > 1)
 {
 echo '
 <form id="languages_form" method="get" class="floatright">
 <select id="language_select" name="language" onchange="this.form.submit()">';

 foreach ($context['languages'] as $language)
 echo '
 <option value="', $language['filename'], '"', isset($context['user']['language']) && $context['user']['language'] == $language['filename'] ? ' selected="selected"' : '', '>', str_replace('-utf8', '', $language['name']), '</option>';

 echo '
 </select>
 <noscript>
 <input type="submit" value="', $txt['quick_mod_go'], '">
 </noscript>
 </form>';
 }

 if ($context['allow_search'])
 {
 echo '
 <form id="search_form" class="floatright" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">
 <input type="search" name="search" value="">&nbsp;';

 // Using the quick search dropdown?
 $selected = !empty($context['current_topic']) ? 'current_topic' : (!empty($context['current_board']) ? 'current_board' : 'all');

 echo '
 <select name="search_selection">
 <option value="all"', ($selected == 'all' ? ' selected' : ''), '>', $txt['search_entireforum'], ' </option>';

 // Can't limit it to a specific topic if we are not in one
 if (!empty($context['current_topic']))
 echo '
 <option value="topic"', ($selected == 'current_topic' ? ' selected' : ''), '>', $txt['search_thistopic'], '</option>';

 // Can't limit it to a specific board if we are not in one
 if (!empty($context['current_board']))
 echo '
 <option value="board"', ($selected == 'current_board' ? ' selected' : ''), '>', $txt['search_thisboard'], '</option>';

 // Can't search for members if we can't see the memberlist
 if (!empty($context['allow_memberlist']))
 echo '
 <option value="members"', ($selected == 'members' ? ' selected' : ''), '>', $txt['search_members'], ' </option>';

 echo '
 </select>';

 // Search within current topic?
 if (!empty($context['current_topic']))
 echo '
 <input type="hidden" name="sd_topic" value="', $context['current_topic'], '">';

 // If we're on a certain board, limit it to this board ;).
 elseif (!empty($context['current_board']))
 echo '
 <input type="hidden" name="sd_brd" value="', $context['current_board'], '">';

 echo '
 <input type="submit" name="search2" value="', $txt['search'], '" class="button">
 <input type="hidden" name="advanced" value="0">
 </form>';
 }

 echo '
 </div><!-- .inner_wrap -->
 </div><!-- #top_section -->';

 echo '


Teşekkürler hocam 2. saçma olacak sanırım profil falan giremeyecez ondan vazgeçtim :)