Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Suggestion Forum
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Suggestion Forum
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

      Code:
      postlayout=horizontal

  • Custom WOL Text:
    • Forum Display:

      HTML Code
      Viewing <a href="{1}">{2}</a>

    • New Thread:

      HTML Code
      Submitting a new suggestion

    • New Reply:

      HTML Code
      Commenting <a href="{1}">{2}</a> suggestion

    • Show Thread:

      HTML Code
      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:

    Code:
    Confirmed
    Implemented
    Rejected

  • Editable by / Required Field?: Administrators
  • Allow Filtering: Yes
  • Blank Replacement Value and Display Format:

    Code:
    <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

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    <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

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    <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

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

  4. xtsug_forumdisplay_thread_rating

    HTML Code
    <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

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    {$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

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    {$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

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

  8. xtsug_postbit_posturl

    HTML Code
    <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

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    <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

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    <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

    HTML Code
    <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 Smile

Change Logs: 05 February 2011

(This post was last modified: 10-08-2012 02:30 AM by RateU.)
01-27-2011 05:50 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Suggestion Forum - RateU - 01-27-2011 05:50 AM
RE: Suggestion Forum - x-Treme - 01-27-2011, 07:49 AM
RE: Suggestion Forum - RateU - 01-27-2011, 08:03 AM
RE: Suggestion Forum - x-Treme - 01-27-2011, 08:52 AM
RE: Suggestion Forum - RateU - 01-27-2011, 09:18 AM
RE: Suggestion Forum - ZiNgA BuRgA - 01-27-2011, 10:32 AM
RE: Suggestion Forum - RocketFoot - 01-27-2011, 11:14 AM
RE: Suggestion Forum - Skiilz - 01-27-2011, 12:43 PM
RE: Suggestion Forum - leefish - 01-27-2011, 01:02 PM
RE: Suggestion Forum - RateU - 02-05-2011, 12:00 PM
RE: Suggestion Forum - AglioEoliO - 02-07-2011, 11:06 PM
RE: Suggestion Forum - RocketFoot - 02-09-2011, 07:50 AM
RE: Suggestion Forum - RocketFoot - 02-10-2011, 03:55 AM
RE: Suggestion Forum - RateU - 02-10-2011, 04:02 AM
RE: Suggestion Forum - RocketFoot - 02-10-2011, 04:08 AM
RE: Suggestion Forum - RateU - 02-10-2011, 04:16 AM
RE: Suggestion Forum - RocketFoot - 02-10-2011, 04:20 AM
RE: Suggestion Forum - RateU - 02-10-2011, 04:26 AM
RE: Suggestion Forum - RocketFoot - 02-10-2011, 04:29 AM
RE: Suggestion Forum - RateU - 02-10-2011, 04:33 AM
RE: Suggestion Forum - RocketFoot - 02-10-2011, 05:20 AM
RE: Suggestion Forum - Gypaete - 04-02-2011, 07:54 PM
RE: Suggestion Forum - RateU - 04-03-2011, 04:00 AM
RE: Suggestion Forum - terzier - 02-24-2012, 08:47 PM
RE: Suggestion Forum - ZiNgA BuRgA - 02-24-2012, 10:05 PM
RE: Suggestion Forum - RateU - 02-25-2012, 01:59 AM
RE: Suggestion Forum - terzier - 02-25-2012, 02:39 AM
RE: Suggestion Forum - RateU - 10-08-2012, 02:29 AM
RE: Suggestion Forum - mat22 - 09-25-2013, 08:00 PM
RE: Suggestion Forum - RateU - 09-28-2013, 03:42 AM
RE: Suggestion Forum - rkrusty26 - 08-18-2014, 06:43 AM
RE: Suggestion Forum - RateU - 08-19-2014, 04:02 AM

 Standard Tools
Forum Jump: