English EN Closed Thread Reason
 
#1
user avatar
Hasan
Kurucu Offline
tarih Dün, 01:01 PM
Requirement: The latest XThreads Version (at least v1.32).

Now, XThreads has a fantastic conditional feature. Amazing. Really really amazing!

This is a simple example application that use that feature.

Adding a reason for closed thread.
  • Create a custom thread fields with this settings:
  • Title: Closed Thread Reason
  • Key: ctr
  • Applicable Forums : Select forum that we want to appliy it
  • Input Field Type : Textbox
  • Editable by / Required Field?: Administrators
    Modify it as our needs. Basically, we should give this power to usergroups which has an ability to closed a thread.
    We can choose Custom (specify usergroups) from the list, then select those usergroup in the Editable by Usergroups list.
  • Blank Replacement Value :
    Kod:

    <if $thread['closed'] == 1 then>
    <div class="smalltext"><strong>Closed Thread Reason:</strong></div>
    <div class="smalltext" style="color: red;"><em>Not specified</em></div>
    </if>
    Modify it as our needs. This layout will be displayed if the thread closed without any reason (the Closed Thread Reason textbox not filled).
  • Display Format :
    Kod:

    <if $thread['closed'] == 1 then>
    <div class="smalltext"><strong>Closed Thread Reason:</strong></div>
    <div class="smalltext" style="color: red;"><em>{VALUE}</em></div>
    </if>

Now, we need to put {$GLOBALS['threadfields']['ctr']} variable in our forumdisplay_thread template or template_prefix_forumdisplay_thread template if we use template prefix for the forum.

Find this code:
Kod:

<div class="author smalltext">{$thread['profilelink']}</div>

Add this variable before the code above:
Kod:
{$GLOBALS['threadfields']['ctr']}

So, the code will be like this:
Kod:

{$GLOBALS['threadfields']['tcr']}<div class="author smalltext">{$thread['profilelink']}</div>

Do that with search_results_threads_thread template too if we want the reason displayed in search result.


Live Demo:
http://mynie.6te.net/demo/forumdisplay.php?fid=33

imza çizgisi
[Resim: dimza.gif]





Konuyu Okuyanlar: 1 Ziyaretçi

 
Dikkat Edelim
Kurallar


Reklam
Reklam


Yasal Uyarı
Gidenler.Me, hukuka, yasalara, telif haklarına ve kişilik haklarına saygılı olmayı amaç edinmiştir. Gidenler.Me, 5651 Sayılı İnternet Ortamında Yapılan Yayınların Düzenlenmesi ve Bu Yayınlar Yoluyla İşlenen Suçlara Mücadele Edilmesi Hakkında Kanunda tanımlanan -Yer Sağlayıcı- olarak hizmet vermektedir. İlgili yasaya göre, Gidenler.Me yönetiminin hukuka aykırı içerikleri kontrol etme yükümlülüğü yoktur. Bu sebeple, Gidenler.Me -Uyar ve Kaldır- prensibini benimsemiştir. Telif hakkına konu olan eserlerin yasal olmayan bir biçimde paylaşıldığını ve yasal haklarının çiğnendiğini düşünen hak sahipleri veya meslek birlikleri, hgidenler@gmail.com mail adresinden bize ulaşabilirler. Buraya ulaşan talep ve şikayetler incelenerek ihlal olduğu belirlenen içerikler Gidenler.Me 'den kaldırılacaktır. Ayrıca, mahkemelerden talep gelmesi halinde hukuka aykırı içerik üreten ve hukuka aykırı paylaşımda bulunan üyelerin tespiti için gerekli teknik veriler sağlanacaktır.



Türkçe Çeviri: MyBB, Yazılım: MyBB 1.6.x, © 2002-2025 MyBB Group.
Copyright ©2024 - 2025 Gidenler®. All rights reserved.
GM v1.0.20 theme designed for MyBB
Basit Sürüm