English EN Suggestion Forum
? Okuma Hesaplanıyor... Okuma: %0
Hasan Kurucu
tarih 11-14-2025, 07:14 PM
#1
Requirement: XThreads
Last Updated: 7 October 2012

This idea based on the MyBB Ideas section. When viewing the section, I think we can use XThreads to create a similar system for our forum. But we will try to make it for more general purpose.

Here is a simple example to do that:

Create or edit a forum with these settings:
  • Template Prefix: xtsug_
  • Show first post on every showthread page: Yes
  • Settings Overrides:
    • Setting: Showthread Options -> Post Layout
      Value: horizontal
      Kod:
      postlayout=horizontal
  • Custom WOL Text:
    • Forum Display:
      Kod:
      Viewing <a href="{1}">{2}</a>
    • New Thread:
      Kod:
      Submitting a new suggestion
    • New Reply:
      Kod:
      Commenting <a href="{1}">{2}</a> suggestion
    • Show Thread:
      Kod:
      Reading <a href="{1}">{2}</a> suggestion
    Maybe we can disable the img and video tag and the post icons here (optional).

Create a Custom Thread Fields with these settings:
AdminCP -> Configuration -> Custom Thread Fields
  • Title: Status
  • Key: xtsug_status
  • Applicable Forums: 'select our suggestion forum.'
  • Input Field Type: Option Buttons
  • Values List:
    Kod:
    Confirmed
    Implemented
    Rejected
  • Editable by / Required Field?: Administrators
  • Allow Filtering: Yes
  • Blank Replacement Value and Display Format:
    Kod:
    <if $thread['replies'] > 0 then><div style="padding-top: 9px;"><a href="{$threadurl}#posts"><img src="images/comment.jpg" alt="" title="" /> {$thread['replies']}<if $thread['replies'] == 1 then> Comment<else> Comments</if></a></div></if>
    This status can be used to set whether a suggestion already implemented, or already confirmed and in progress to be implemented, or rejected (we don't want to implement it). This status can be used for a very simple bug report.

Create new templates in Global Template:
AdminCP -> Templates & Style -> Templates -> Global Templates
  1. xtsug_forumdisplay_thread
    Kod:

    <tr>
    {$rating}
    <td class="trow1{$thread_type_class}">
    <div>
    <strong><a href="{$thread['threadlink']}" class="{$inline_edit_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a></strong>
    </div>
    <div class="author smalltext" style="padding-top: 3px;">
    Submitted by: {$thread['profilelink']}, {$thread['threaddate']}, {$thread['threadtime']}
    </div>
    <div style="padding-top: 7px;">{$thread['postpreview']}</div>
    {$GLOBALS['threadfields']['xtsug_status']}
    </td>
    {$modbit}
    </tr>

  2. xtsug_forumdisplay_threadlist
    Kod:

    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    <tr>
    <td class="thead" colspan="{$colspan}">
    <div class="largetext" style="text-align: center;"><strong>{$foruminfo['name']}</strong></div>
    </td>
    </tr>
    <tr>
    <td class="tcat" colspan="2">
    <div class="float_right">
    <strong>Filter:</strong>
    <strong><a href="{$forumurl_q}filtertf_xtsug_status=Confirmed">Confirmed</a></strong> |
    <strong><a href="{$forumurl_q}filtertf_xtsug_status=Implemented">Implemented</a></strong> |
    <strong><a href="{$forumurl_q}filtertf_xtsug_status=Rejected">Rejected</a></strong>
    </div>
    <div class="float_left">
    <strong>Sort:</strong>
    <strong><a href="{$sorturl}&amp;sortby=started&amp;order=asc">Recent Suggested</a></strong> |
    <strong><a href="{$sorturl}&amp;sortby=replies&amp;order=desc">Most Comments</a></strong>
    {$ratingcol}
    </div>
    </td>
    {$inlinemodcol}
    </tr>
    {$selectall}
    {$announcementlist}
    {$threads}{$nullthreads}
    </table>
    <div class="float_left">
    {$multipage}
    </div>
    <div class="float_right" style="margin-top: 4px;">
    {$newthread}
    </div>
    <br style="clear: both;" />
    <br />
    <div class="float_right" style="text-align: right;">
    {$inlinemod}
    {$searchforum}
    {$forumjump}
    </div>
    <br style="clear: both" />
    <div class="smalltext" align="center">
    {$foruminfo['name']}<br />Powered By <a href="http://mybbhacks.zingaburga.com">XThreads</a> - <a href="http://mybbhacks.zingaburga.com">MyBB Hacks</a>
    </div>
    {$inline_edit_js}

  3. xtsug_forumdisplay_threadlist_rating
    Kod:

    &nbsp;| <strong><a href="{$sorturl}&amp;sortby=numratings&amp;order=desc">Votes</a></strong>

  4. xtsug_forumdisplay_thread_rating
    Kod:

    <td align="center" class="{$bgcolor}{$thread_type_class}" id="rating_table_{$thread['tid']}" width="1" valign="top">
    <a href="ratethread.php?tid={$thread['tid']}&amp;rating=1&amp;my_post_key={$mybb->post_code}"><img src="images/rate.jpg" alt="Vote" title="Vote" /></a>
    <div><strong>{$thread['numratings']}</strong> Votes</div>
    </td>

  5. xtsug_postbit
    Kod:

    {$ignore_bit}
    <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}" class="tborder">
    <tbody>
    <tr>
    <td class="trow1 {$unapproved_shade}">
    <div class="float_left smalltext">
    by: <a href="{$post['profilelink_plain']}" id="profile_{$post['pid']}">{$post['username_formatted']}</a>
    <br />{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
    </div>
    {$post['posturl']}
    <div class="post_body clear" id="pid_{$post['pid']}">{$post['message']}</div>
    <div class="post_meta" id="post_meta_{$post['pid']}">{$post['iplogged']}</div>
    <div id="profile_{$post['pid']}_popup" class="popup_menu" style="display: none;">
    <div class="popup_item_container">
    <table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" class="tborder">
    <tr>
    <td class="trow1" valign="top" align="center">
    <div><strong>{$post['profilelink']}</strong></div>
    <div class="smalltext">{$post['useravatar']}</div>
    <div class="smalltext">{$post['usertitle']}</div>
    <div class="smalltext">{$post['userstars']}</div>
    <div class="smalltext">{$post['groupimage']}</div>
    <div class="smalltext">{$post['user_details']}</div>
    </td>
    </tr>
    <tr>
    <td class="tcat" align="center">
    {$post['button_email']}
    {$post['button_pm']}
    {$post['button_www']}
    {$post['button_find']}
    {$post['button_rep']}
    </td>
    </tr>
    </table>
    </div>
    </div>
    <div class="post_management_buttons float_right clear">
    {$post['button_edit']}
    {$post['button_quickdelete']}
    {$post['button_quote']}
    {$post['button_multiquote']}
    {$post['button_report']}
    {$post['button_warn']}
    </div>
    </td>
    </tr>
    </tbody>
    </table>
    <script type="text/javascript">
    // <!--
    if(use_xmlhttprequest == "1")
    {
    new PopupMenu("profile_{$post['pid']}");
    }
    // -->
    </script>

  6. xtsug_postbit_first
    Kod:

    {$ignore_bit}
    <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}" width="100%">
    <tbody>
    <tr>
    <td class="trow1 {$unapproved_shade}">
    <div class="float_left smalltext">
    Submitted by: <a href="{$post['profilelink_plain']}" id="profile_{$post['pid']}">{$post['username_formatted']}</a>, {$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
    </div>
    {$post['posturl']}
    <div class="post_body clear" id="pid_{$post['pid']}">{$post['message']}</div>
    <div class="post_meta" id="post_meta_{$post['pid']}">{$post['iplogged']}</div>
    <div id="profile_{$post['pid']}_popup" class="popup_menu" style="display: none;">
    <div class="popup_item_container">
    <table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" class="tborder">
    <tr>
    <td class="trow1" valign="top" align="center">
    <div><strong>{$post['profilelink']}</strong></div>
    <div class="smalltext">{$post['useravatar']}</div>
    <div class="smalltext">{$post['usertitle']}</div>
    <div class="smalltext">{$post['userstars']}</div>
    <div class="smalltext">{$post['groupimage']}</div>
    <div class="smalltext">{$post['user_details']}</div>
    </td>
    </tr>
    <tr>
    <td class="tcat" align="center">
    {$post['button_email']}
    {$post['button_pm']}
    {$post['button_www']}
    {$post['button_find']}
    {$post['button_rep']}
    </td>
    </tr>
    </table>
    </div>
    </div>
    <div class="post_management_buttons float_right clear">
    {$post['button_edit']}
    {$post['button_quickdelete']}
    {$post['button_quote']}
    {$post['button_multiquote']}
    {$post['button_report']}
    {$post['button_warn']}
    </div>
    </td>
    </tr>
    </tbody>
    </table>
    <script type="text/javascript">
    // <!--
    if(use_xmlhttprequest == "1")
    {
    new PopupMenu("profile_{$post['pid']}");
    }
    // -->
    </script>

  7. xtsug_postbit_first_posturl
    Kod:

    <div style="float: right; width: auto; vertical-align: top">{$post['inlinecheck']}</div>

  8. xtsug_postbit_posturl
    Kod:

    <div style="float: right; width: auto; vertical-align: top"><span class="smalltext"><strong><a href="{$post['postlink']}#pid{$post['pid']}">#{$postcounter}</a></strong>{$post['inlinecheck']}</span></div>

  9. xtsug_showthread
    Kod:

    <html>
    <head>
    <title>{$thread['subject']}</title>
    {$headerinclude}
    <script type="text/javascript">
    <!--
    var quickdelete_confirm = "{$lang->quickdelete_confirm}";
    // -->
    </script>
    <script type="text/javascript" src="jscripts/thread.js?ver=1600"></script>
    </head>
    <body>
    {$header}
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    <tr>
    <td class="thead" colspan="2">
    <div>
    <strong>{$thread['subject']}</strong>
    </div>
    </td>
    </tr>
    <tr>
    {$ratethread}
    <td class="trow1">
    {$first_post}
    </td>
    </tr>
    </table>
    <br class="clear" />
    <div class="largetext float_right clear">Comments</div>
    <div id="posts" class="clear">
    {$posts}
    </div>
    <div class="float_left">
    {$multipage}
    </div>
    <div style="padding-top: 4px;" class="float_right">
    {$newreply}
    </div>
    <br style="clear: both;" />
    {$quickreply}
    {$threadexbox}
    {$similarthreads}
    <br />
    <div class="float_right" style="text-align: right;">
    {$moderationoptions}
    {$forumjump}
    </div>
    <br style="clear: both;" />
    {$usersbrowsing}
    <div class="smalltext" align="center">
    {$forum['name']}<br />Powered By <a href="http://mybbhacks.zingaburga.com">XThreads</a> - <a href="http://mybbhacks.zingaburga.com">MyBB Hacks</a>
    </div>
    {$footer}
    </body>
    </html>

  10. xtsug_showthread_noreplies
    Kod:

    <table border="0" cellspacing="{$GLOBALS['theme']['borderwidth']}" cellpadding="{$GLOBALS['theme']['tablespace']}" id="xthreads_noreplies" class="tborder">
    <tbody>
    <tr>
    <td class="trow1">
    <div style="text-align: center;" class="post_body">There are no comments in this suggestion</div>
    </td>
    </tr>
    </tbody>
    </table>

  11. xtsug_showthread_ratethread
    Kod:

    <td align="center" class="trow1" valign="top">
    <a href="ratethread.php?tid={$thread['tid']}&amp;rating=1&amp;my_post_key={$mybb->post_code}"><img src="images/rate.jpg" alt="Vote" title="Vote" /></a>
    <div><strong>{$thread['numratings']}</strong> Votes</div>
    </td>

Additional Info:
  • For displaying the suggestion preview in threadlist, like the screenshot, we need to install the Thread Tooltip Preview plugin.
  • There are two optional images needed: images/rate.jpg and images/comment.jpg.
  • I don't have many idea, so, I just use a similar layout there. But it is depends on our themes though. So, just modify it as our needs.
  • The templates above based on MyBB 1.6 template.

Screenshots:
Threadlist - Showthread


Live Demo: http://www.14.mynie.co.cc/forumdisplay.php?fid=18

Please tell me if I do something wrong. I'm still learning :)

Change Logs: 05 February 2011

» Son Düzenleme: 11-14-2025, 07:15 PM, Düzenleyen: Hasan.

imza çizgisi
Çekirge 1 Sıçrar... 2 Sıçrar... 3 Sıçrar... 4 Sıçrar... 5 Sıçrar...
Sıçrar Yani Çekirge Sonuçta Bu aferin
Gidenler.Me · Forum





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, gidenlerme@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-2026 MyBB Group.
Copyright ©2024 - 2026 Gidenler®. All rights reserved.
GM v3.0.0.8 Beta theme designed for MyBB
Basit Sürüm
Mobil Sürüme Geç!