Üyeliğin hakkında sorunlar👨🏼‍🔧yaşıyorsanız bunu bizimle paylaşa bilirsiniz
Forum içeriğine ve tüm hizmetlerimize erişim sağlamak için foruma kayıt olmalı ya da giriş yapmalısınız.
  • Sitemiz Bir Webmaster forumu ve tartışma platformu dur webmaster forumu dışındaki konular yasaktır direkt silinecektir.
  • Our site is a Webmaster forum and discussion platform. Topics outside the webmaster forum are prohibited and will be deleted immediately.

Smf - Vbulletin Benzeri Yeni Konu Aç ve Cevapla Butonu Ekleme

Welcome to our site, Guest

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

KeReM @

Kayitli Üye
Joined
Jul 29, 2019
Messages
78
Reaction score
0
Points
6
Age
38
Website
www.forumsever.com
SMF forum sistemine vbulletin ve xenforoda görmeye alışık olduğumuz yeni konu aç ve cevapla butonlarını eklemek için aşağıdaki değişiklikleri yapabilirsiniz. Kullandığınız sürüme göre kodlarda farklılık gösterebilir.


Temanızın index.css dosyasında;

En sona ekleyin:
Code:
/* New buttons like Vb Style */
.newbuttons_up
{
    height: 28px;
    padding-top: 2px;
}
.newbuttons_down
{
    height: 28px;
    padding-top: 2px;
    padding-bottom: 2px;
}
.newbuttons_up a, .newbuttons_down a
{
    background: #06090a;
    -moz-border-radius: 5px;
    -webkit-border-radius: 5px;
    -moz-box-shadow: 0 3px 8px #dddddd;
    -webkit-box-shadow: 0 3px 8px #dddddd;
    font:   normal 14px Arial, sans-serif;
    color: #fff;
    padding: 4px 15px 4px 15px;
    border: 1px solid #000000;
    display:block;
    float: left;
    clear: right;
}
.newbuttons_up a span, .newbuttons_down a span
{
    font-size:15px;
    font-weight:bold;
    display:inline;
}
.newbuttons_up a:link, .newbuttons_up a:visited
.newbuttons_down a:link, .newbuttons_down a:visited
{
    color: #fff;
}
.newbuttons_up a:hover, .newbuttons_down a:hover
{
    background: #141415;
    color: #fff;
    text-decoration: none;
}



Temanızın/MessageIndex.template.php 'de bul:
Code:
 if (!$context['no_topic_listing'])
    {
        echo '
    <div class="pagesection">

Altına Ekle:
Code:
        <div class="newbuttons_up"><a href="', $scripturl . '?action=post;board=' . $context['current_board'] . '.0','"><span>+</span> ', $txt['post_new_thread'], '</a></div>


Bul:
Code:
        <div class="pagelinks">', $txt['pages'], ': ', $context['page_index'], !empty($modSettings['topbottomEnable']) ? $context['menu_separator'] . '  <a href="#top"><strong>' . $txt['go_up'] . '</strong></a>' : '', '</div>

Altına Ekle:
Code:
        <div class="newbuttons_down"><a href="', $scripturl . '?action=post;board=' . $context['current_board'] . '.0','"><span>+</span> ', $txt['post_new_thread'], '</a></div>


Temanızın/Display.template.php 'de

Bulun:
Code:
                <div class="nextlinks">', $context['previous_next'], '</div>', template_button_strip($normal_buttons, 'right'), '

Üstüne Ekle:
Code:
                <div class="newbuttons_up"><a href="',  $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'],'"><span>+</span> ', $txt['reply_to_thread'] , '</a></div>

Bul:
Code:
                <div class="nextlinks_bottom">', $context['previous_next'], '</div>


Altına Ekle:
Code:
                <div class="newbuttons_down"><a href="',  $scripturl . '?action=post;topic=' . $context['current_topic'] . '.' . $context['start'] . ';last_msg=' . $context['topic_last_message'],'"><span>+</span> ', $txt['reply_to_thread'], '</a></div>


Default temanızın dil klösöründe

index.turkish.php 'de

Bulun:
Code:
?>

Üstüne Ekleyin:
Code:
$txt['post_new_thread'] = 'Yeni Konu Aç';
$txt['reply_to_thread'] = 'Cevapla';



Sadece MessageIndex.template.php uygulamak icin.
Temanızın/MessageIndex.template.php 'de bul:

Code:
<div class="pagelinks floatleft">
			<a href="#bot" class="button">', $txt['go_down'], '</a>
			', $context['page_index'], '
		</div>

Değiştir
Code:
<div class="pagelinks floatleft">
			<a href="#bot" class="button">', $txt['go_down'], '</a>
			', $context['page_index'], '
		</div>';
		if ($context['user']['is_guest'])
		{
        echo'
		<div class="newbuttons_up floatright">
		<a href="', $scripturl . '?action=post;board=' . $context['current_board'] . '.0','" class="rbtn rblue"><span><i class="fa fa-edit"></i></span><span> ', $txt['post_new_thread'], '</span></a>
		</div>';
		}
		echo'

Bul
Code:
<div class="pagelinks floatleft">
			<a href="#main_content_section" class="button" id="bot">', $txt['go_up'], '</a>
			', $context['page_index'], '
		</div>

Değiştir

Code:
<div class="pagelinks floatleft">
			<a href="#main_content_section" class="button" id="bot">', $txt['go_up'], '</a>
			', $context['page_index'], '
		</div>';
		if ($context['user']['is_guest'])
		{
        echo'
		<div class="newbuttons_up floatright">
		<a href="', $scripturl . '?action=post;board=' . $context['current_board'] . '.0','" class="rbtn rblue"><span><i class="fa fa-edit"></i></span><span> ', $txt['post_new_thread'], '</span></a>
		</div>';
		}
		echo'

Temanızın index.css dosyasında;

En sona ekleyin:
Code:
.newbuttons_up {
    width: auto!important;
    padding: 5px 0 5px 0;
    display: table-cell;
    vertical-align: middle;
}
.newbuttons_up .rbtn:last-child {
    margin-right: 0;
}

.newbuttons_up .rbtn {
    margin-right: 20px;
}
.rbtn {
    display: inline-block;
    height: 35px;
    line-height: 35px;
    border-radius: 2px;
    background: var(--main-menu);
    font-weight: 600;
    text-transform: uppercase;
    position: relative;
}
.rbtn.rblue:before {
    background: #38a9ff;
}
.rbtn:before {
    content: "";
    width: 40px;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: #3f4257;
    border-top-left-radius: 2px;
    border-bottom-left-radius: 2px;
    transition: all .3s ease;
}
.rbtn span:first-child {
    display: block;
    float: left;
    z-index: 999;
    position: relative;
    width: 40px;
    color: #fff!important;
    text-align: center;
    font-size: 18px;
}
.rbtn span:last-child {
    padding: 0 20px;
    z-index: 999;
    position: relative;
}
.rbtn:hover:before {
    width: 100%;
    border-top-right-radius: 2px;
    border-bottom-right-radius: 2px;
}
.rbtn:hover {
    color: #fff!important;
}

Mobilde düzgün görünsün
responsive.css de alta ekleyin

Code:
@media (max-width: 1030px) {
.pagelinks, .newbuttons_up {
    width: 100%;
    display: block;
    float: none;
}
.pagelinks .rbtn, .newbuttons_up .rbtn {
    margin-right: 0;
    display: block;
    margin-bottom: 20px;
}
}
 
Güzel paylaşım hocam eline sağlık.
 
Bana ait değil hocam ama kaynağını da hatırlamıyorum. Eski forum yedeklerinde bir temaya uygulamışım. Temize çekince paylaşayım dedim.
 
KeReM @ said:
Bana ait değil hocam ama kaynağını da hatırlamıyorum. Eski forum yedeklerinde bir temaya uygulamışım. Temize çekince paylaşayım dedim.

Merhaba ben bunu biraz düzenledim üye giriş yaptıktan sonra bu butonlar saten var smf de ben bunu sadece ziyaretçilere görünür şekilde yaptım vede yalnızca MessageIndex.template.php ye ekledim Display.template.php ye gerek yok diye düşündüm demosu bu sitede var istek olursuda paylaşırım.
 
KeReM @ said:
Eline sağlık hocam. Görsel olarak çok daha güzel olmuş. Paylaşırsan onu kullanalım.

Konuyu güncelledim.
 
Back
Top Bottom