Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Support Form
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Support Form
Requirement: XThreads
Last Update: 23 August 2011

We will try creating a simple Support Form with XThreads.
The form should depends on what our forum about.
In this example, we will create a form for plugins support.
If we want to make it a specific for our forum, just modify it.

Forum Settings:
Admin CP -> Forums & Posts -> Forum Management -> Add New Forum or Edit Forum
  • Template Prefix: xtsupport_
  • Language File Prefix: xtsupport_
  • Offset forumdisplay {$colspan}: 1
    To make it "compatible" with thread rating on/off.
  • Allow Blank Post Message: Yes
    If there is a simple issue only, probably the user only need to type it in the short description field. So, we set this to Yes.
Because we have a filter systems, maybe we can set the Default Sort By setting to Thread creation time. So, it is useless for user to bump their issue.

Create Custom Thread Fields:
Admin CP -> Configuration -> Custom Thread Fields
  1. Short Description
    • Title: Short Description
    • Key: sdc
    • Description: Short description about this issue
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Textbox
    • Editable by / Required Field?: Everyone (required)
    • Display Format:

      Code:
      <if THIS_SCRIPT == 'showthread.php' then><tr><td class="tcat" colspan="2"><strong>{$GLOBALS['threadfields_x']['sdc']['title']}</strong></td></tr><tr><td class="trow1" colspan="2">{VALUE}</td></tr><else><div class="smalltext">{VALUE}</div></if><setvar fuid>$filters_set['__xt_uid']['selected'][$mybb->user['uid']]</setvar>

  2. Forum URL
    • Title: Forum URL
    • Key: sur
    • Description: Your forum URL or URL for a specific area where your issue appear.
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Textbox
    • Editable by / Required Field?: Everyone (required)
    • Display Format:

      HTML Code
      <tr><td class="trow2" valign="top"><strong>{$GLOBALS['threadfields_x']['sur']['title']}</strong></td><td class="trow2" valign="top">{VALUE}</td></tr>

    • Text Mask Filter: URI (generic)
  3. Plugin Issue
    • Title: Plugin Issue
    • Key: spi
    • Description: For which plugin you report this issue?
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Listbox
    • Field Input Height: 1
    • Values List:

      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
      XThreads
      PHP in Templates / Complex Templates
      Template Conditionals
      Thread Tooltip Preview
      Cool Codes (Syntax Highlighter)
      Soft Delete
      Admin Can Login as Any User
      Moderated Usergroup(s)
      Hide Sigs of New Users
      Display Name / User Nickname Plugin
      Preparser Cache
      Admin Security
      vB Quote
      No Special Characters in Usernames
      Duplicate/Dissect Post
      Quick Thread
      PM to New Users
      Easy MyCodes
      Memberships in Profile
      Mod User Notes
      View New Subscribed Posts
      AdminCP Dropdown Menus
      Dynamic Board Stats
      Locked Thread Quick Reply Warning
      Visible Moderator Thread Notes
      Usergroup Lock
      Thread Starter Locking
      Search Auto-redirect
      No ALL-CAPS in Posts/PMs

      Modify it as our needs. In this example, we use plugins list in MyBB Hacks (please don't be angry to me, Yumi Biggrin)

    • Editable by / Required Field?: Everyone (required)
    • Allow Filtering: Yes
    • Display Format:

      Code:
      <if THIS_SCRIPT == 'forumdisplay.php' then><div class="smalltext"><strong><a href="{$forumurl_q}filtertf_spi={VALUE}" title="View all issues about {VALUE}">{VALUE}</a></strong></div><else>{VALUE}</if><setvar spil>'<div style="text-align: center;" class="largetext"><a href="'.$forumurl_q.'filtertf_spi='.{VALUE}.'">'.{VALUE}.' v '.$GLOBALS['threadfields']['spv'].'</a></div>'</setvar><setvar issue_title>'Issue Title'</setvar><setvar selspl1>$filters_set['spi']['selected']['PHP in Templates / Complex Templates']</setvar><setvar selspl2>$filters_set['spi']['selected']['Cool Codes (Syntax Highlighter)']</setvar><setvar selspl3>$filters_set['spi']['selected']['Moderated Usergroup(s)']</setvar><setvar selspl4>$filters_set['spi']['selected']['Display Name / User Nickname Plugin']</setvar><setvar selspl5>$filters_set['spi']['selected']['Duplicate/Dissect Post']</setvar><setvar selspl6>$filters_set['spi']['selected']['Search Auto-redirect']</setvar><setvar selspl7>$filters_set['spi']['selected']['No ALL-CAPS in Posts/PMs']</setvar>

  4. Plugin Version
    • Title: Plugin Version
    • Key: spv
    • Description: What is the plugin version you use?
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Textbox
    • Editable by / Required Field?: Everyone (required)
    • Text Mask Filter: Number (real)
      Modify it as our needs.
  5. Issue Category
    • Title: Issue Category
    • Key: sgc
    • Description: General category of your issue
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Listbox
    • Field Input Height: 1
    • Values List:

      Code:
      Installation
      Upgrading
      Usage
      Other

    • Editable by / Required Field?: Everyone (required)
    • Allow Filtering: Yes
    • Display Format:

      HTML Code
      <tr><td valign="top" class="trow1"><strong>{$GLOBALS['threadfields_x']['sgc']['title']}</strong></td><td valign="top" class="trow1"><a href="{$forumurl_q}filtertf_sgc={VALUE}&amp;filtertf_spi={$GLOBALS['threadfields']['spi']}">{VALUE} &ndash; {$GLOBALS['threadfields']['spi']}</a></td></tr>

  6. MyBB Version
    • Title: MyBB Version
    • Key: smv
    • Description: What MyBB version you use?
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Listbox
    • Field Input Height: 1
    • Values List:

      Code:
      1.4.14
      1.6.0
      1.6.1
      1.6.2

    • Editable by / Required Field?: Everyone (required)
    • Display Format:

      Code:
      <if THIS_SCRIPT == 'showthread.php' then><tr><td class="trow2" valign="top"><strong>{$GLOBALS['threadfields_x']['smv']['title']}</strong></td><td class="trow2" valign="top">{VALUE}</td></tr><else>{VALUE}</if>

  7. MyBB Knowledge
    • Title: MyBB Knowledge
    • Key: smk
    • Description: Your knowledge about the general usage of MyBB, including HTML and CSS.
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Listbox
    • Field Input Height: 1
    • Values List:

      Code:
      Beginner
      Novice
      Advance
      Guru

    • Editable by / Required Field?: Everyone (required)
    • Display Format:

      HTML Code
      <tr><td class="trow1" valign="top"><strong>{$GLOBALS['threadfields_x']['smk']['title']}</strong></td><td class="trow1" valign="top">{VALUE}</td></tr>

  8. Clean Installation
    • Title: Clean Installation
    • Key: sci
    • Description: Check this checkbox if you have tried it in a fresh MyBB installation.
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Checkboxes
    • Values List:

      Code:
      Yes, I have tried it in a fresh MyBB installation

    • Editable by / Required Field?: Everyone
    • Multiple Value Delimiter:

      Code:
      ,&nbsp;

    • Hide Input Field: Yes
  9. Plugin List
    • Title: Plugin List
    • Key: spl
    • Description: List other plugins you use in your forum, especially if you didn't try it in a clean installation yet.
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Multiline Textbox
    • Editable by / Required Field?: Everyone
    • Display Format:

      HTML Code
      <tr><td class="tcat" colspan="2"><strong>{$GLOBALS['threadfields_x']['spl']['title']}</strong></td></tr><tr><td class="trow1" colspan="2">{VALUE}</td></tr>

    • Hide Input Field: Yes
  10. What Have I Done Before
    • Title: What Have I Done Before
    • Key: swd
    • Description: If this worked before, what have you done before this issue appear?
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Multiline Textbox
    • Editable by / Required Field?: Everyone
    • Display Parsing: Use MyBB Parser (MyCode)
    • MyBB Parser Options: Check all except Allow HTML.
    • Display Format:

      HTML Code
      <tr><td class="tcat" colspan="2"><strong>{$GLOBALS['threadfields_x']['swd']['title']}</strong></td></tr><tr><td class="trow1" colspan="2">{VALUE}</td></tr>

    • Hide Input Field: Yes
  11. What I Have Tried To Solve It
    • Title: What I Have Tried To Solve It
    • Key: swt
    • Description: What did you do to solve this issue?
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Multiline Textbox
    • Editable by / Required Field?: Everyone
    • Display Parsing: Use MyBB Parser (MyCode)
    • MyBB Parser Options: Check all except Allow HTML.
    • Blank Replacement Value:

      Code:
      <if $GLOBALS['threadfields']['sci'] then><tr><td class="tcat" colspan="2"><strong>{$GLOBALS['threadfields_x']['swt']['title']}</strong></td></tr><tr><td class="trow1" colspan="2">{$GLOBALS['threadfields']['sci']}</td></tr></if>

    • Display Format:

      Code:
      <tr><td class="tcat" colspan="2"><strong>{$GLOBALS['threadfields_x']['swt']['title']}</strong></td></tr><tr><td class="trow1" colspan="2">{$GLOBALS['threadfields']['sci']}{VALUE}</td></tr>

    • Hide Input Field: Yes
  12. Private Info
    • Title: Private Info
    • Key: spo
    • Description: If you have any private info needed to include with this issue report, put it here. Only staff can view it. Use this only for private info.
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Multiline Textbox
    • Editable by / Required Field?: Everyone
    • Display Parsing: Use MyBB Parser (MyCode)
    • MyBB Parser Options: Check all except Allow HTML.
    • Display Format:

      HTML Code
      <br /><div class="pm_alert" style="text-align: left; font-size: 12px;"><strong>{$GLOBALS['threadfields_x']['spo']['title']}</strong><br />{VALUE}</div><br />

    • Viewable by Usergroups: Administrators, Super Moderators, Moderators.
      Modify it as our needs.
    • Unviewable Value:

      Code:
      &nbsp;

    • Hide Input Field: Yes
  13. Issue Status
    This is for mark a thread/issue as solved issue. We also have a custom moderator tools to mark thread(s) as solved (see Custom Moderator Tools section)
    • Title: Issue Status
    • Key: sis
    • Description: Please edit this status if your issue has been solved.
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Listbox
    • Field Input Height: 1
    • Values List:

      Code:
      Unsolved
      Solved

    • Editable by / Required Field?: Everyone (required)
    • Allow Filtering: Yes
    • Formatting Map List:
      • Value: Unsolved
        Displayed Output:

        Code:
        <if THIS_SCRIPT == 'showthread.php' then><tr><td class="trow2" valign="top"><strong>{$GLOBALS['threadfields_x']['sis']['title']}</strong></td><td class="trow2" valign="top"><a href="{$forumurl_q}filtertf_sis=Unsolved" style="color: red;"><strong>Unsolved</strong></a></td></tr><else> unsolved</if>

      • Value: Solved
        Displayed Output:

        Code:
        <if THIS_SCRIPT == 'showthread.php' then><tr><td class="trow2" valign="top"><strong>{$GLOBALS['threadfields_x']['sis']['title']}</strong></td><td class="trow2" valign="top"><a href="{$forumurl_q}filtertf_sis=Solved" style="color: green;"><strong>Solved</strong></a></td></tr><else> solved</if><setvar issue_status>'Solved'</setvar>

      Code:
      Unsolved{|}<if THIS_SCRIPT == 'showthread.php' then><tr><td class="trow2" valign="top"><strong>{$GLOBALS['threadfields_x']['sis']['title']}</strong></td><td class="trow2" valign="top"><a href="{$forumurl_q}filtertf_sis=Unsolved" style="color: red;"><strong>Unsolved</strong></a></td></tr><else> unsolved</if>
      Solved{|}<if THIS_SCRIPT == 'showthread.php' then><tr><td class="trow2" valign="top"><strong>{$GLOBALS['threadfields_x']['sis']['title']}</strong></td><td class="trow2" valign="top"><a href="{$forumurl_q}filtertf_sis=Solved" style="color: green;"><strong>Solved</strong></a></td></tr><else> solved</if><setvar issue_status>'Solved'</setvar>

  14. Additional Category
    This is an additional issue category, settable by staff only. Probably this is as high priority issue. We have a Custom Moderator Tool for this field.
    • Title: Additional Category
    • Key: sac
    • Description: Mark additional category for this issue.
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Listbox
    • Field Input Height: 1
    • Values List:

      Code:
      Security
      Plugin Conflict
      Bug

    • Editable by / Required Field?: Administrators
      Or we can select Custom (specify usergroups), then select which usergroups can set this setting in Editable by Usergroups setting.
    • Allow Filtering: Yes
    • Blank Replacement Value:

      Code:
      <?=' normthread'?>

      Because we need a space there.

    • Formatting Map List:
      • Value: Security
        Displayed Output: spacesecurity
      • Value: Plugin Conflict
        Displayed Output: spaceconflict
      • Value: Bug
        Displayed Output: spacextsbug

      Code:
      Security{|} security
      Plugin Conflict{|} conflict
      Bug{|} xtsbug

  15. Solution Post
    This is for a button used for marking a post as Solution Post (thank you very much, Yumi Smile).
    This button will mark the issue thread as Solved Issue automatically.
    • Title: Solution Post
    • Key: xtspt_solvepost
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Textbox
    • Maximum Text Length: 10
    • Field Input Width: 20
    • Capture Tab Key: No
    • Blank Replacement Value:

      Code:
      <setvar xtsviewable>($mybb->user['uid'] == $thread['uid'] || is_moderator($fid, '', $mybb->user['uid'])) && THIS_SCRIPT == 'showthread.php'</setvar>
      <setvar firstpost>$tplvars['xtsviewable'] ? get_post($thread['firstpost']) : ''</setvar>
      <setvar solvebutton1>$tplvars['xtsviewable'] ? ' --><form action="editpost.php" method="post"><input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /><input type="hidden" name="action" value="do_editpost" /><input type="hidden" name="pid" value="'.$thread['firstpost'].'" /><input type="hidden" name="xthreads_sis" value="Solved" /><input type="hidden" name="xthreads_xtspt_solvepost" value="' : ''</setvar>
      <setvar solvebutton2>$tplvars['xtsviewable'] ? '" /><input type="submit" value="Mark this post as solution" /></form><!-- ' : ''</setvar>

    • Display Format:

      Code:
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      <setvar xtsviewable>($mybb->user['uid'] == $thread['uid'] || is_moderator($fid, '', $mybb->user['uid'])) && THIS_SCRIPT == 'showthread.php'</setvar>
      <setvar firstpost>$tplvars['xtsviewable'] ? get_post($thread['firstpost']) : ''</setvar>
      <setvar solvebutton1>$tplvars['xtsviewable'] ? ' --><form action="editpost.php" method="post"><input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /><input type="hidden" name="action" value="do_editpost" /><input type="hidden" name="pid" value="'.$thread['firstpost'].'" /><input type="hidden" name="xthreads_xtspt_solvepost" value="' : ''</setvar>
      <setvar solvebutton2>$tplvars['xtsviewable'] ? '" /><input type="submit" value="Mark this post as solution" /></form><!-- ' : ''</setvar>
      <setvar solved>{VALUE} && $tplvars['issue_status'] == 'Solved' && THIS_SCRIPT == 'showthread.php'</setvar>
      <setvar post>$tplvars['solved'] ? get_post(intval({VALUE})) : ''</setvar>
      <if $tplvars['post']['pid'] && $tplvars['post']['tid'] == $thread['tid'] && $tplvars['post']['visible'] then>
      	<tr><td class="solved largetext" colspan="2"><a href="{$threadurl_q}pid={$tplvars['post']['pid']}#pid{$tplvars['post']['pid']}"><span style="color: green;"><strong>Solution Post</strong></span></a> by <a href="<?=get_profile_link(intval($tplvars['post']['uid']))?>"><strong><func htmlspecialchars_uni>{$tplvars['post']['username']}</func></strong></a></td></tr>
      	<setvar solvepostcss>array($tplvars['post']['pid'] => ' solved')</setvar>
      </if>

    • Underlying Data Type: Integer (unsigned)
    • Hide Input Field: Yes


Create Templates
Admin CP -> Templates & Style -> Templates -> Global Templates.

  1. xtsupport_editpost_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
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    <html>
    <head>
    <title>{$mybb->settings['bbname']} - {$lang->xtsupport_edit_post}</title>
    {$headerinclude}
    <script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
    </head>
    <body>
    {$header}
    {$preview}
    {$post_errors}
    {$attacherror}
    <form action="editpost.php?pid={$pid}&amp;processed=1" method="post" enctype="multipart/form-data" name="input">
    	<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
    	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    		<tr>
    			<td class="thead" colspan="2"><strong>{$lang->xtsupport_edit_post}</strong></td>
    		</tr>
    		<tr>
    			<td class="trow2" valign="top">
    				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%">
    					<tr>
    						<td>
    							<strong>{$lang->subject}</strong><br />
    							{$prefixselect}<input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" />
    						</td>
    					</tr>
    					{$extra_threadfields}
    				</table>
    			</td>
    			<td class="trow2" valign="top">
    				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%">
    					<tr>
    						<td>
    							<strong>{$lang->xtsupport_your_message}</strong><br />
    							<textarea name="message" id="message" rows="20" cols="70" tabindex="3">{$message}</textarea>
    							{$codebuttons}
    						</td>
    					</tr>
    					{$tfinputrow['sci']}
    				</table>
    			</td>
    		</tr>
    	</table>
    	<br />
    	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    		<tr>
    			<td class="thead" colspan="2"><strong>{$lang->xtsupport_edit_post2}</strong></td>
    		</tr>
    		<tr>
    			<td class="trow2" valign="top">
    				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%">
    					{$tfinputrow['spl']}
    					{$tfinputrow['spo']}
    				</table>
    			</td>
    			<td class="trow2" valign="top">
    				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%">
    					{$tfinputrow['swd']}
    					{$tfinputrow['swt']}
    					{$tfinputrow['sac']}
    				</table>
    			</td>
    		</tr>
    	</table>
    	<br />
    	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    		<tr>
    			<td class="thead" colspan="2"><strong>{$lang->xtsupport_edit_post3}</strong></td>
    		</tr>
    		{$loginbox}
    		<tr>
    			<td class="trow1" valign="top" width="20%"><strong>{$lang->post_options}</strong></td>
    			<td class="trow1"><span class="smalltext">
    				<label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1" tabindex="6"{$postoptionschecked['signature']} /> {$lang->options_sig}</label>
    				{$disablesmilies}</span>
    			</td>
    		</tr>
    		{$subscriptionmethod}
    		{$pollbox}
    	</table>
    	{$attachbox}
    	<br />
    	<div align="center"><input type="submit" class="button" name="submit" value="{$lang->xtsupport_update_post}" tabindex="3" accesskey="s" />  <input type="submit" class="button" name="previewpost" value="{$lang->xtsupport_preview_post}" tabindex="4" /></div>
    	<input type="hidden" name="action" value="do_editpost" />
    	<input type="hidden" name="posthash" value="{$posthash}" />
    	<input type="hidden" name="attachmentaid" value="" />
    	<input type="hidden" name="attachmentact" value="" />
    </form>
    <br />
    <form action="editpost.php" method="post" name="editpost">
    <input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    <tr>
    <td class="thead" colspan="3"><strong>{$lang->delete_post}</strong></td>
    </tr>
    <tr>
    <td class="trow1" style="white-space: nowrap"><input type="checkbox" class="checkbox" name="delete" value="1" tabindex="9" /> <strong>{$lang->delete_q}</strong></td>
    <td class="trow1" width="100%">{$lang->delete_1}<br /><span class="smalltext">{$lang->delete_2}</span></td>
    <td class="trow1"><input type="submit" class="button" name="submit" value="{$lang->delete_now}" tabindex="10" /></td>
    </tr>
    </table>
    <input type="hidden" name="action" value="deletepost" />
    <input type="hidden" name="pid" value="{$pid}" />
    </form>
    {$footer}
    </body>
    </html>

  2. xtsupport_forumdisplay_announcements_announcement

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    <tr>
    <td align="center" class="{$bgcolor}" width="2%">&nbsp;</td>
    <td align="center" class="{$bgcolor}" width="2%">&nbsp;</td>
    <td align="center" class="{$bgcolor}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt=""/></td>
    <td class="{$bgcolor}">
    	<a href="{$announcement['announcementlink']}"{$new_class}>{$announcement['subject']}</a>
    	<div class="author smalltext">{$announcement['profilelink']}</div>
    </td>
    <td align="center" class="{$bgcolor}">-</td>
    <td align="center" class="{$bgcolor}"><span class="smalltext">{$postdate} {$posttime}</span></td>
    {$modann}
    </tr>

  3. xtsupport_forumdisplay_thread

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    <tr>
    	<td align="center" class="{$bgcolor}{$thread_type_class}{$GLOBALS['threadfields']['sis']}" width="2%">&nbsp;</td>
    	<td align="center" class="{$bgcolor}{$thread_type_class}{$GLOBALS['threadfields']['sac']}" width="2%">&nbsp;</td>
    	<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td>
    	<td class="{$bgcolor}{$thread_type_class}">
    		{$attachment_count}
    		<div>
    			<span>{$prefix} {$gotounread}{$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>
    			{$GLOBALS['threadfields']['sdc']}
    			<div class="author smalltext"><a href="{$forumurl_q}filterxt_uid={$thread['uid']}" title="{$lang->xtsupport_find_threads_author}">{$lang->xtsupport_submitted_by}</a> {$thread['profilelink']}</div>
    		</div>
    	</td>
    	<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
    	<td class="{$bgcolor}{$thread_type_class}" style="text-align: right;">
    		{$GLOBALS['threadfields']['spi']}
    		<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
    		<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
    	</td>
    	{$modbit}
    </tr>

  4. xtsupport_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
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    <div class="float_left">
    	{$multipage}
    </div>
    <div class="float_right">
    	{$newthread}
    </div>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    	<tr>
    		<td class="thead" colspan="{$colspan}">
    			<div class="float_left">
    				<a href="{$forumurl}"><strong>{$foruminfo['name']}</strong></a>
    			</div>
    			<div class="float_right">
    				<form action="{$forumurl}" method="post">
    					<select name="filterxt_uid">
    						<option value="">{$lang->xtsupport_all_threads}</option>
    						<option value="{$mybb->user['uid']}"{$GLOBALS['tplvars']['fuid']}>{$lang->xtsupport_my_threads}</option>
    					</select>
    					<select name="filtertf_sis">
    						<option value="">{$lang->xtsupport_all_status}</option>
    						<option value="Unsolved"{$filters_set['sis']['selected']['Unsolved']}>Unsolved</option>
    						<option value="Solved"{$filters_set['sis']['selected']['Solved']}>Solved</option>
    					</select>
    					<select name="filtertf_spi">
    						<option value="">{$lang->xtsupport_all_plugins}</option>
    						<option value="XThreads"{$filters_set['spi']['selected']['XThreads']}>XThreads</option>
    						<option value="PHP in Templates / Complex Templates"{$GLOBALS['tplvars']['selspl1']}>PHP in Templates / Complex Templates</option>
    						<option value="Template Conditionals"{$filters_set['spi']['selected']['Template Conditionals']}>Template Conditionals</option>
    						<option value="Thread Tooltip Preview"{$filters_set['spi']['selected']['Thread Tooltip Preview']}>Thread Tooltip Preview</option>
    						<option value="Cool Codes (Syntax Highlighter)"{$GLOBALS['tplvars']['selspl2']}>Cool Codes (Syntax Highlighter)</option>
    						<option value="Soft Delete"{$filters_set['spi']['selected']['Soft Delete']}>Soft Delete</option>
    						<option value="Admin Can Login as Any User"{$filters_set['spi']['selected']['Admin Can Login as Any User']}>Admin Can Login as Any User</option>
    						<option value="Moderated Usergroup(s)"{$GLOBALS['tplvars']['selspl3']}>Moderated Usergroup(s)</option>
    						<option value="Hide Sigs of New Users"{$filters_set['spi']['selected']['Hide Sigs of New Users']}>Hide Sigs of New Users</option>
    						<option value="Display Name / User Nickname Plugin"{$GLOBALS['tplvars']['selspl4']}>Display Name / User Nickname Plugin</option>
    						<option value="Preparser Cache"{$filters_set['spi']['selected']['Preparser Cache']}>Preparser Cache</option>
    						<option value="Admin Security"{$filters_set['spi']['selected']['Admin Security']}>Admin Security</option>
    						<option value="vB Quote"{$filters_set['spi']['selected']['vB Quote']}>vB Quote</option>
    						<option value="No Special Characters in Usernames"{$filters_set['spi']['selected']['No Special Characters in Usernames']}>No Special Characters in Usernames</option>
    						<option value="Duplicate/Dissect Post"{$GLOBALS['tplvars']['selspl5']}>Duplicate/Dissect Post</option>
    						<option value="Quick Thread"{$filters_set['spi']['selected']['Quick Thread']}>Quick Thread</option>
    						<option value="PM to New Users"{$filters_set['spi']['selected']['PM to New Users']}>PM to New Users</option>
    						<option value="Easy MyCodes"{$filters_set['spi']['selected']['Easy MyCodes']}>Easy MyCodes</option>
    						<option value="Memberships in Profile"{$filters_set['spi']['selected']['Memberships in Profile']}>Memberships in Profile</option>
    						<option value="Mod User Notes"{$filters_set['spi']['selected']['Mod User Notes']}>Mod User Notes</option>
    						<option value="View New Subscribed Posts"{$filters_set['spi']['selected']['View New Subscribed Posts']}>View New Subscribed Posts</option>
    						<option value="AdminCP Dropdown Menus"{$filters_set['spi']['selected']['AdminCP Dropdown Menus']}>AdminCP Dropdown Menus</option>
    						<option value="Dynamic Board Stats"{$filters_set['spi']['selected']['Dynamic Board Stats']}>Dynamic Board Stats</option>
    						<option value="Locked Thread Quick Reply Warning"{$filters_set['spi']['selected']['Locked Thread Quick Reply Warning']}>Locked Thread Quick Reply Warning</option>
    						<option value="Visible Moderator Thread Notes"{$filters_set['spi']['selected']['Visible Moderator Thread Notes']}>Visible Moderator Thread Notes</option>
    						<option value="Usergroup Lock"{$filters_set['spi']['selected']['Usergroup Lock']}>Usergroup Lock</option>
    						<option value="Thread Starter Locking"{$filters_set['spi']['selected']['Thread Starter Locking']}>Thread Starter Locking</option>
    						<option value="Search Auto-redirect"{$GLOBALS['tplvars']['selspl6']}>Search Auto-redirect</option>
    						<option value="No ALL-CAPS in Posts/PMs"{$GLOBALS['tplvars']['selspl7']}>No ALL-CAPS in Posts/PMs</option>
    					</select>
    					<input type="submit" class="button" value="Filter Threads" />
    				</form>
    			</div>
    			<div class="float_right" style="margin-right: 9px; margin-top: 3px;">
    				<strong>{$lang->xtsupport_filter_issues}</strong>
    			</div>
    		</td>
    	</tr>
    	<tr>
    		<td class="tcat" colspan="4" width="70%">
    			<span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=subject&amp;order=asc">{$lang->thread}</a> {$orderarrow['subject']} / <a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong></span>
    		</td>
    		<td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=replies&amp;order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong></span></td>
    		<td class="tcat" align="right" width="25%" style="white-space: nowrap;"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=tf_spi&amp;order=asc">{$lang->xtsupport_plugins}</a> {$orderarrow['tf_spi']} / <a href="{$sorturl}&amp;sortby=lastpost&amp;order=desc">{$lang->lastpost}</a> {$orderarrow['lastpost']}</strong></span></td>
    		{$inlinemodcol}
    	</tr>
    	{$selectall}
    	{$announcementlist}
    	{$threads}{$nullthreads}
    	<tr>
    		<td class="tcat" colspan="{$colspan}">
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}">
    				<tr>
    					<td class="security" width="1">&nbsp;</td>
    					<td class="smalltext"><a href="{$forumurl_q}filtertf_sac=Security"><strong>Security Issue</strong></a></td>
    					<td class="conflict" width="1">&nbsp;</td>
    					<td class="smalltext"><a href="{$forumurl_q}filtertf_sac=Plugin Conflict"><strong>Plugin Conflict</strong></a></td>
    					<td class="xtsbug" width="1">&nbsp;</td>
    					<td class="smalltext"><a href="{$forumurl_q}filtertf_sac=Bug"><strong>Bug Issue</strong></a></td>
    					<td class="normthread" width="1">&nbsp;</td>
    					<td class="smalltext"><a href="{$forumurl_q}filtertf_sac="><strong>Normal Issue</strong></a></td>
    					<td class="solved" width="1">&nbsp;</td>
    					<td class="smalltext"><a href="{$forumurl_q}filtertf_sis=Solved"><strong>Solved Issue</strong></a></td>
    					<td class="unsolved" width="1">&nbsp;</td>
    					<td class="smalltext"><a href="{$forumurl_q}filtertf_sis=Unsolved"><strong>Unsolved Issue</strong></a></td>
    				</tr>
    			</table>
    		</td>
    	</tr>
    	<tr>
    		<td class="tfoot" align="right" colspan="{$colspan}">
    			<div style="float: left; margin: 4px;">
    				<span class="smalltext"><strong><a href="misc.php?action=markread&amp;fid={$fid}">{$lang->markforum_read}</a> | <a href="usercp2.php?action={$add_remove_subscription}subscription&amp;type=forum&amp;fid={$fid}&amp;my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a>{$clearstoredpass}</strong></span>
    			</div>
    			<form action="forumdisplay.php" method="get">
    				<input type="hidden" name="selectall" value="{$allselected}" />
    				<input type="hidden" name="fid" value="{$fid}" />
    				<select name="sortby">
    					{$sort_by_prefix}<option value="subject" {$sortsel['subject']}>{$lang->sort_by_subject}</option>
    					<option value="lastpost" {$sortsel['lastpost']}>{$lang->sort_by_lastpost}</option>
    					<option value="starter" {$sortsel['starter']}>{$lang->sort_by_starter}</option>
    					<option value="started" {$sortsel['started']}>{$lang->sort_by_started}</option>
    					{$ratingsort}
    					<option value="replies" {$sortsel['replies']}>{$lang->sort_by_replies}</option>
    					<option value="views" {$sortsel['views']}>{$lang->sort_by_views}</option>
    					<option value="icon" {$sortsel['icon']}>{$lang->sort_by_icon}</option>
    					<option value="lastposter" {$sortsel['lastposter']}>{$lang->sort_by_lastposter}</option>
    					<option value="attachmentcount" {$sortsel['attachmentcount']}>{$lang->sort_by_attachmentcount}</option>
    					<option value="tf_spi" {$sortsel['tf_spi']}>{$lang->xtsupport_sort_by_plugins}</option>
    					<option value="tf_sis" {$sortsel['tf_sis']}>{$lang->xtsupport_sort_by_status}</option>
    					{$xthreads_extra_sorting}
    				</select>
    				<select name="order">
    					<option value="asc" {$ordersel['asc']}>{$lang->sort_order_asc}</option>
    					<option value="desc" {$ordersel['desc']}>{$lang->sort_order_desc}</option>
    				</select>
    				<select name="datecut">
    					<option value="1" {$datecutsel['1']}>{$lang->datelimit_1day}</option>
    					<option value="5" {$datecutsel['5']}>{$lang->datelimit_5days}</option>
    					<option value="10" {$datecutsel['10']}>{$lang->datelimit_10days}</option>
    					<option value="20" {$datecutsel['20']}>{$lang->datelimit_20days}</option>
    					<option value="50" {$datecutsel['50']}>{$lang->datelimit_50days}</option>
    					<option value="75" {$datecutsel['75']}>{$lang->datelimit_75days}</option>
    					<option value="100" {$datecutsel['100']}>{$lang->datelimit_100days}</option>
    					<option value="365" {$datecutsel['365']}>{$lang->datelimit_lastyear}</option>
    					<option value="9999" {$datecutsel['9999']}>{$lang->datelimit_beginning}</option>
    				</select>
    				{$gobutton}
    			</form>
    		</td>
    	</tr>
    </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_left">
    	<div class="float_left">
    		<dl class="thread_legend smalltext">
    			<dd><img src="{$theme['imgdir']}/newfolder.gif" alt="{$lang->new_thread}" title="{$lang->new_thread}" /> {$lang->new_thread}</dd>
    			<dd><img src="{$theme['imgdir']}/newhotfolder.gif" alt="{$lang->new_hot_thread}" title="{$lang->new_hot_thread}" /> {$lang->new_hot_thread}</dd>
    			<dd><img src="{$theme['imgdir']}/hotfolder.gif" alt="{$lang->hot_thread}" title="{$lang->hot_thread}" /> {$lang->hot_thread}</dd>
    		</dl>
    	</div>
    
    	<div class="float_left">
    		<dl class="thread_legend smalltext">
    			<dd><img src="{$theme['imgdir']}/folder.gif" alt="{$lang->no_new_thread}" title="{$lang->no_new_thread}" /> {$lang->no_new_thread}</dd>
    			<dd><img src="{$theme['imgdir']}/dot_folder.gif" alt="{$lang->posts_by_you}" title="{$lang->posts_by_you}" /> {$lang->posts_by_you}</dd>
    			<dd><img src="{$theme['imgdir']}/lockfolder.gif" alt="{$lang->locked_thread}" title="{$lang->locked_thread}" /> {$lang->locked_thread}</dd>
    		</dl>
    	</div>
    	<br style="clear: both" />
    </div>
    
    <div class="float_right" style="text-align: right;">
    	{$inlinemod}
    	{$searchforum}
    	{$forumjump}
    </div>
    <br style="clear: both" />
    {$inline_edit_js}
    <div class="smalltext" style="text-align: center;">
    	{$foruminfo['name']}<br />
    	Powered by: <a href="http://mybbhacks.zingaburga.com/showthread.php?tid=288">XThreads</a> &ndash; <a href="http://mybbhacks.zingaburga.com">MyBB Hacks</a>
    </div>

  5. xtsupport_newthread

    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
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    <html>
    <head>
    <title>{$lang->newthread_in}</title>
    {$headerinclude}
    <script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
    </head>
    <body>
    {$header}
    {$preview}
    {$thread_errors}
    {$attacherror}
    <form action="newthread.php?fid={$fid}&amp;processed=1" method="post" enctype="multipart/form-data" name="input">
    	<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
    	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    		<tr>
    			<td class="thead" colspan="2"><strong>{$lang->post_new_thread}</strong></td>
    		</tr>
    		<tr>
    			<td class="trow2" valign="top">
    				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%">
    					<tr>
    						<td>
    							<strong>{$lang->thread_subject}</strong><br />
    							{$prefixselect}<input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" />
    						</td>
    					</tr>
    					{$extra_threadfields}
    				</table>
    			</td>
    			<td class="trow2" valign="top">
    				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%">
    					<tr>
    						<td>
    							<strong>{$lang->your_message}</strong><br />
    							<textarea name="message" id="message" rows="20" cols="70" tabindex="2">{$message}</textarea>
    							{$codebuttons}
    							{$multiquote_external}
    						</td>
    					</tr>
    					{$tfinputrow['sci']}
    				</table>
    			</td>
    		</tr>
    	</table>
    	<br />
    	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    		<tr>
    			<td class="thead" colspan="2"><strong>{$lang->post_new_thread2}</strong></td>
    		</tr>
    		<tr>
    			<td class="trow2" valign="top" width="50%">
    				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%">
    					{$tfinputrow['spl']}
    					{$tfinputrow['spo']}
    				</table>
    			</td>
    			<td class="trow2" valign="top">
    				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%">
    					{$tfinputrow['swd']}
    					{$tfinputrow['swt']}
    					{$tfinputrow['sac']}
    				</table>
    			</td>
    		</tr>
    	</table>
    	<br />
    	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    		<tr>
    			<td class="thead" colspan="2"><strong>{$lang->post_new_thread3}</strong></td>
    		</tr>
    		{$loginbox}
    		<tr>
    			<td class="trow1" valign="top" width="20%"><strong>{$lang->post_options}</strong></td>
    			<td class="trow1"><span class="smalltext">
    			<label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1" tabindex="7"{$postoptionschecked['signature']} /> {$lang->options_sig}</label>
    			{$disablesmilies}</span></td>
    		</tr>
    		{$modoptions}
    		{$subscriptionmethod}
    		{$pollbox}
    		{$captcha}
    	</table>
    	{$attachbox}
    	<br />
    	<div style="text-align:center"><input type="submit" class="button" name="submit" value="{$lang->post_thread}" tabindex="4" accesskey="s" />  <input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="5" />{$savedraftbutton}</div>
    	<input type="hidden" name="action" value="do_newthread" />
    	<input type="hidden" name="posthash" value="{$posthash}" />
    	<input type="hidden" name="attachmentaid" value="" />
    	<input type="hidden" name="attachmentact" value="" />
    	<input type="hidden" name="quoted_ids" value="{$quoted_ids}" />
    	<input type="hidden" name="tid" value="{$tid}" />
    	{$editdraftpid}
    </form>
    {$forumrules}
    {$footer}
    </body>
    </html>

  6. xtsupport_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
    59
    60
    61
    62
    63
    64
    {$ignore_bit}
    <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tbody>
    		<tr>
    			<td class="tcat">
    				<div class="float_left smalltext">
    					{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
    				</div>
    				{$post['posturl']}
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow1 {$unapproved_shade}{$GLOBALS['tplvars']['solvepostcss'][$id]}">
    				<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
    					<tr>
    						<td class="post_avatar" width="1" style="{$post['avatar_padding']}">
    							{$post['useravatar']}
    						</td>
    						<td class="post_author">
    							<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    							<span class="smalltext">
    								{$post['usertitle']}<br />
    								{$post['userstars']}
    								{$post['groupimage']}
    							</span>
    						</td>
    						<td class="smalltext post_author_info" width="165">
    							{$post['user_details']}
    						</td>
    					</tr>
    				</table>
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow2 post_content {$unapproved_shade}{$GLOBALS['tplvars']['solvepostcss'][$id]}">
    				<div class="float_right"><!--{$GLOBALS['tplvars']['solvebutton1']}{$post['pid']}{$GLOBALS['tplvars']['solvebutton2']}--></div>
    				<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
    
    				<div class="post_body clear" id="pid_{$post['pid']}">
    					{$post['message']}
    				</div>
    				{$post['attachments']}
    				{$post['signature']}
    
    				<div class="post_meta" id="post_meta_{$post['pid']}">
    				{$post['iplogged']}
    				</div>
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow1 post_buttons {$unapproved_shade}{$GLOBALS['tplvars']['solvepostcss'][$id]}">
    				<div class="author_buttons float_left">
    					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}
    				</div>
    				<div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
    				</div>
    			</td>
    		</tr>
    	</tbody>
    </table>

  7. xtsupport_postbit_classic

    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
    {$ignore_bit}
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tr>
    		<td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;{$GLOBALS['tplvars']['solvepostcss'][$id]}"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    		<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    		<span class="smalltext">
    			{$post['usertitle']}<br />
    			{$post['userstars']}
    			{$post['groupimage']}
    			{$post['useravatar']}<br />
    			{$post['user_details']}
    		</span>
    	</td>
    	<td class="{$altbg}{$GLOBALS['tplvars']['solvepostcss'][$id]}" valign="top">
    		<table width="100%">
    			<tr><td>{$post['posturl']}<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
    			<br />
    			<div class='float_right"><!--{$GLOBALS['tplvars']['solvebutton1']}{$post['pid']}{$GLOBALS['tplvars']['solvebutton2']}--></div>
    			<div id="pid_{$post['pid']} clear" style="padding: 5px 0 5px 0;">
    				{$post['message']}
    			</div>
    			{$post['attachments']}
    			{$post['signature']}
    			<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
    				<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
    				{$post['iplogged']}
    			</div>
    		</td></tr>
    	</table>
    </td>
    </tr>
    <tr>
    	<td class="{$altbg}{$GLOBALS['tplvars']['solvepostcss'][$id]}" style="white-space: nowrap; text-align: center; vertical-align: middle;"><span class="smalltext">{$post['postdate']} {$post['posttime']}</span></td>
    	<td class="{$altbg}{$GLOBALS['tplvars']['solvepostcss'][$id]}" style="vertical-align: middle;">
    		<table width="100%" border="0" cellpadding="0" cellspacing="0">
    			<tr valign="bottom">
    				<td align="left" ><span class="smalltext">{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}</span></td>
    				<td align="right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</td>
    			</tr>
    		</table>
    	</td>
    </tr>
    </table>

  8. xtsupport_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
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    {$ignore_bit}
    <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tbody>
    		<tr>
    			<td class="tcat">
    				<div class="float_left smalltext">
    					{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
    				</div>
    				{$post['posturl']}
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow1 {$unapproved_shade}{$GLOBALS['tplvars']['solvepostcss'][$id]}">
    				<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
    					<tr>
    						<td class="post_avatar" width="1" style="{$post['avatar_padding']}">
    							{$post['useravatar']}
    						</td>
    						<td class="post_author">
    							<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    							<span class="smalltext">
    								{$post['usertitle']}<br />
    								{$post['userstars']}
    								{$post['groupimage']}
    							</span>
    						</td>
    						<td class="smalltext post_author_info" width="165">
    							{$post['user_details']}
    						</td>
    					</tr>
    				</table>
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow2 post_content {$unapproved_shade}{$GLOBALS['tplvars']['solvepostcss'][$id]}">
    				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    					<tr>
    						<td class="thead" colspan="2">{$GLOBALS['tplvars']['spil']}</td>
    					</tr>
    					{$GLOBALS['threadfields']['xtspt_solvepost']}
    					<tr>
    						<td class="trow1" valign="top" width="20%"><strong>{$GLOBALS['tplvars']['issue_title']}</strong></td>
    						<td class="trow1" valign="top">
    							<span class="float_right"><!--{$GLOBALS['tplvars']['solvebutton1']}{$post['pid']}{$GLOBALS['tplvars']['solvebutton2']}--></span>
    							{$post['icon']}{$post['subject']} {$post['subject_extra']}
    						</td>
    					</tr>
    					{$GLOBALS['threadfields']['sis']}
    					{$GLOBALS['threadfields']['sgc']}
    					{$GLOBALS['threadfields']['smv']}
    					{$GLOBALS['threadfields']['smk']}
    					{$GLOBALS['threadfields']['sur']}
    					{$GLOBALS['threadfields']['sdc']}
    					{$GLOBALS['threadfields']['swd']}
    					{$GLOBALS['threadfields']['swt']}
    					{$GLOBALS['threadfields']['spl']}
    				</table>
    				{$GLOBALS['threadfields']['spo']}
    				<div class="post_body" id="pid_{$post['pid']}">
    					{$post['message']}
    				</div>
    				{$post['attachments']}
    				{$post['signature']}
    
    				<div class="post_meta" id="post_meta_{$post['pid']}">
    				{$post['iplogged']}
    				</div>
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow1 post_buttons {$unapproved_shade}{$GLOBALS['tplvars']['solvepostcss'][$id]}">
    				<div class="author_buttons float_left">
    					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}
    				</div>
    				<div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
    				</div>
    			</td>
    		</tr>
    	</tbody>
    </table>

  9. xtsupport_postbit_first_classic

    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
    59
    60
    61
    62
    63
    64
    65
    {$ignore_bit}
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tr>
    		<td class="{$altbg}{$GLOBALS['tplvars']['solvepostcss'][$id]}" width="15%" valign="top" style="white-space: nowrap; text-align: center;">
    			<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    			<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    			<span class="smalltext">
    				{$post['usertitle']}<br />
    				{$post['userstars']}
    				{$post['groupimage']}
    				{$post['useravatar']}<br />
    				{$post['user_details']}
    			</span>
    		</td>
    		<td class="{$altbg}{$GLOBALS['tplvars']['solvepostcss'][$id]}" valign="top">
    			<table width="100%">
    				<tr>
    					<td>
    						{$post['posturl']}
    						<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    							<tr>
    								<td class="thead" colspan="2">{$GLOBALS['tplvars']['spil']}</td>
    							</tr>
    							{$GLOBALS['threadfields']['xtspt_solvepost']}
    							<tr>
    								<td class="trow1" valign="top" width="20%"><strong>{$GLOBALS['tplvars']['issue_title']}</strong></td>
    								<td class="trow1" valign="top"><span style="float: right;"><!--{$GLOBALS['tplvars']['solvebutton1']}{$post['pid']}{$GLOBALS['tplvars']['solvebutton2']}--></span>{$post['icon']}{$post['subject']} {$post['subject_extra']}</td>
    							</tr>
    							{$GLOBALS['threadfields']['sis']}
    							{$GLOBALS['threadfields']['sgc']}
    							{$GLOBALS['threadfields']['smv']}
    							{$GLOBALS['threadfields']['smk']}
    							{$GLOBALS['threadfields']['sur']}
    							{$GLOBALS['threadfields']['sdc']}
    							{$GLOBALS['threadfields']['swd']}
    							{$GLOBALS['threadfields']['swt']}
    							{$GLOBALS['threadfields']['spl']}
    						</table>
    						{$GLOBALS['threadfields']['spo']}
    						<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
    							{$post['message']}
    						</div>
    						{$post['attachments']}
    						{$post['signature']}
    						<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
    							<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
    							{$post['iplogged']}
    						</div>
    					</td>
    				</tr>
    			</table>
    		</td>
    	</tr>
    	<tr>
    		<td class="{$altbg}{$GLOBALS['tplvars']['solvepostcss'][$id]}" style="white-space: nowrap; text-align: center; vertical-align: middle;"><span class="smalltext">{$post['postdate']} {$post['posttime']}</span></td>
    		<td class="{$altbg}{$GLOBALS['tplvars']['solvepostcss'][$id]}" style="vertical-align: middle;">
    			<table width="100%" border="0" cellpadding="0" cellspacing="0">
    				<tr valign="bottom">
    					<td align="left" ><span class="smalltext">{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}</span></td>
    					<td align="right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</td>
    				</tr>
    			</table>
    		</td>
    	</tr>
    </table>

  10. xtsupport_threadfields_inputrow

    HTML Code
    1
    2
    3
    4
    5
    6
    <tr>
    <td class="trow2">
    <strong>{$tf['desc']}</strong><br />
    {$inputfield}
    </td>
    </tr>



Additional CSS Class
Add this class into our global.css:

Code:
1
2
3
4
5
6
.security {background: #C0504D;}
.conflict {background: #8064A2;}
.xtsbug {background: #FFF6BF;}
.normthread {background: #4F81BD;}
.solved {background: #D6ECA6;}
.unsolved {background: #C1C1C1;}

Modify it as our needs.

Custom Moderator Tools
Admin CP -> Moderator Tools -> Add New Thread Tool

  1. Solved Issue
    With this custom moderator tools our forum staffs can mark threads as solved issue (if a user didn't update their threads status after their issue has been solved) and close the threads.
    • Name: Solved Issue
    • Short Description: Mark this thread as a Solved issue and close it.
    • Available in forums: Select forums -> Select our support forum.
    • Open/close thread?: Close
    • Modify Custom Thread Field(s):
        Field: sis
        Value: Solved

        Code:
        sis=Solved

  2. Security Issue
    With this custom moderator tools our forum staffs can mark threads as security issue and unapprove the threads.
    • Name: Security Issue
    • Short Description: Mark this issue as security issue and unapprove it.
    • Available in forums: Select forums -> Select our support forum.
    • Approve/Unapprove thread?: Unapprove
    • Modify Custom Thread Field(s):
        Field: sac
        Value: Security

        Code:
        sac=Security

  3. Plugin Conflict
    With this custom moderator tools our forum staffs can mark threads as plugin conflict issue.
    • Name: Plugin Conflict
    • Short Description: Mark this issue as plugin conflict
    • Available in forums: Select forums -> Select our support forum.
    • Modify Custom Thread Field(s):
        Field: sac
        Value: Plugin Conflict

        Code:
        sac=Plugin Conflict

  4. Bug
    With this custom moderator tools our forum staffs can mark threads as bug of the plugin.
    • Name: Bug
    • Short Description: Mark this issue as bug.
    • Available in forums: Select forums -> Select our support forum.
    • Modify Custom Thread Field(s):
        Field: sac
        Value: Bug

        Code:
        sac=Bug



That is our simple Support Form Biggrin
Please tell me if I make something wrong with it. I'm still learning Biggrin

Additional Info:
  • The Support Form should depends on what our forum about, or for what products the support form provided.
  • We use language prefix for this example application (attached).
  • Some variables in some Display Format come from other Display Format in other Custom Thread Fields.
  • The templates above based on MyBB 1.6 templates.

Screenshots:

1. Newthread:
That is our support form.
   

2. Showthread:
If user fill all info - Minimum Info
       

Solved issue - Unsolved Issue
       

3. Threadlist
We put filter and issue legend here.
   

Live Demo:
http://www.14.mynie.co.cc/forumdisplay.php?fid=23
Not many threads I've created there. But at least it can show how the filter, sorting and issue legend work (I hope).
Note: All "issue" in the live demo is for testing only. There is no real issue like that in the actual plugins.

Edited:
07 March 2011 - 11 March 2011 - 18 March 2011


Attached File(s)
.7z  xtsupport.7z (Size: 1,009 bytes / Downloads: 577)

(This post was last modified: 08-23-2011 05:36 AM by RateU.)
03-06-2011 09:50 AM
Find all posts by this user Quote this message in a reply
techu Offline
Member
***
Posts: 154
Joined: Sep 2010
Post: #2
RE: Support Form
Wow,looks great Rateu...
Thanks..

[Image: banner.png]
(This post was last modified: 03-06-2011 04:04 PM by techu.)
03-06-2011 12:48 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #3
RE: Support Form
Wow, nice.
Actually, I had a plan to do this myself but never got around to finishing it :/

If you're interested, I had a "best solution" thing with mine.  This is what I wrote a long long time ago - and untested, so I dunno if it works.  Looks ugly, so if you want to adapt it, you probably want to change it, but if interested, here's what I wrote:

  • Add custom thread field:
    Title: Solution Post
    Key: xtspt_solvepost
    Applicable Forums: select the forum that was just added
    Input Field Type: Textbox
    Maximum Text Length: 10
    Field Input Width: 20
    Display Order: 2 (or anything larger than the Issue Status' Display Order) (side note: this is actually rather critical, because it forces the Issue Status field to be evaluated first, so that we can use it in the conditional below)
    Capture Tab Key: No
    Blank Replacement Value:

    Code:
    <if $mybb->user['uid'] == $thread['uid'] || is_moderator($fid, '', $mybb->user['uid']) then>
    	<setvar firstpost>get_post($thread['firstpost'])</setvar>
    	<setvar solvebutton1>' --><form action="editpost.php" method="post"><input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /><input type="hidden" name="action" value="do_editpost" /><input type="hidden" name="prefix" value="'.$thread['prefix'].'" /><input type="hidden" name="subject" value="'.htmlspecialchars_uni($tplvars['firstpost']['subject']).'" /><input type="hidden" name="icon" value="'.$tplvars['firstpost']['icon'].'" /><input type="hidden" name="message" value="'.htmlspecialchars_uni($tplvars['firstpost']['message']).'" /><input type="hidden" name="options[signature]" value="'.$tplvars['firstpost']['includesig'].'" /><input type="hidden" name="options[disablesmilies]" value="'.$tplvars['firstpost']['smilieoff'].'" /><input type="hidden" name="pid" value="'.$thread['firstpost'].'" /><input type="hidden" name="sis" value="Solved" /><input type="hidden" name="xthreads_xtspt_solvepost" value="'</setvar>
    	<setvar solvebutton2>'" /><input type="submit" value="Mark this post as solution" /></form><!-- '</setvar>
    </if>

    Display Format:

    Code:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    <if $mybb->user['uid'] == $thread['uid'] || is_moderator($fid, '', $mybb->user['uid']) then>
    	<setvar firstpost>get_post($thread['firstpost'])</setvar>
    	<setvar solvebutton1>' --><form action="editpost.php" method="post"><input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /><input type="hidden" name="action" value="do_editpost" /><input type="hidden" name="prefix" value="'.$thread['prefix'].'" /><input type="hidden" name="subject" value="'.htmlspecialchars_uni($tplvars['firstpost']['subject']).'" /><input type="hidden" name="icon" value="'.$tplvars['firstpost']['icon'].'" /><input type="hidden" name="message" value="'.htmlspecialchars_uni($tplvars['firstpost']['message']).'" /><input type="hidden" name="options[signature]" value="'.$tplvars['firstpost']['includesig'].'" /><input type="hidden" name="options[disablesmilies]" value="'.$tplvars['firstpost']['smilieoff'].'" /><input type="hidden" name="pid" value="'.$thread['firstpost'].'" /><input type="hidden" name="sis" value="Solved" /><input type="hidden" name="xthreads_xtspt_solvepost" value="'</setvar>
    	<setvar solvebutton2>'" /><input type="submit" value="Mark this post as solution" /></form><!-- '</setvar>
    </if>
    <if {VALUE} && $threadfields['sis'] == 'Solved' then>
    	<setvar post>get_post(intval({VALUE}))</setvar>
    	<if $tplvars['post']['pid'] && $tplvars['post']['tid'] == $thread['tid'] && $tplvars['post']['visible'] then>
    		<br /><a href="{$threadurl_q}pid={$tplvars['post']['pid']}#pid{$tplvars['post']['pid']}">Jump to post which solved this problem</a>
    		<setvar solvepostcss>array($tplvars['post']['pid'] => 'background: #D0FFD0;')</setvar>
    	</if>
    </if>

    Underlying Data Type: Integer (unsigned)
    Hide Input Field: Yes

  • Create template xtsupport_showthread from showthread.
    Find:

    HTML Code
    {$pollbox}

    Add after:

    HTML Code
    {$threadfields['xtspt_solvepost']}

  • Create template xtsupport_postbit from postbit (also apply to xtsupport_postbit_first)
    Find:

    HTML Code
    <span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>

    Add before:

    HTML Code
    <span style="float: right;"><!--{$GLOBALS['tplvars']['solvebutton1']}{$post['pid']}{$GLOBALS['tplvars']['solvebutton2']}--></span>

    Find (all 3 instances of):

    HTML Code
    {$unapproved_shade}"

    Add after:

    HTML Code
     style="{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}"

  • Create template xtspt_postbit_classic from postbit_classic (also apply to xtsupport_postbit_first_classic)
    Find:

    HTML Code
    <div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">

    Add before:

    HTML Code
    <span style="float: right;"><!--{$GLOBALS['tplvars']['solvebutton1']}{$post['pid']}{$GLOBALS['tplvars']['solvebutton2']}--></span>

    Find:

    HTML Code
    <td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;">

    Replace with:

    HTML Code
    <td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}">

    Find:

    HTML Code
    <td class="{$altbg}" valign="top">

    Replace with:

    HTML Code
    <td class="{$altbg}" valign="top" style="{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}">

    Find:

    HTML Code
    <td class="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;">

    Replace with:

    HTML Code
    <td class="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}">

    Find:

    HTML Code
    <td class="{$altbg}" style="vertical-align: middle;">

    Replace with:

    HTML Code
    <td class="{$altbg}" style="vertical-align: middle;{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}">


Known issues
  • AJAX quick reply - the "mark best answer" thing won't show up when quick replying, but will after a page refresh (might possible workaround, though a bit "dirty")
  • unfortunately, the entire first post needs to be copied internally; this is somewhat due to MyBB's stupid editpost.php not accepting blank values >_>

My Blog
(This post was last modified: 03-06-2011 04:11 PM by ZiNgA BuRgA.)
03-06-2011 04:09 PM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: Support Form
Great! Thank you very much, Yumi Smile
I've tried to adapt it.
I've edited the first post for this change and add additional screenshot for this.

Create a Custom Thread Field:
  • Solution Post
    • Title: Solution Post
    • Key: xtspt_solvepost
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Textbox
    • Maximum Text Length: 10
    • Field Input Width: 20
    • Display Order: 15
    • Capture Tab Key: No
    • Editable by / Required Field?: Administrators
    • Blank Replacement Value:

      Code:
      <if $mybb->user['uid'] == $thread['uid'] || is_moderator($fid, '', $mybb->user['uid']) then>
      	<setvar firstpost>get_post($thread['firstpost'])</setvar>
      	<setvar solvebutton1>' --><form action="editpost.php" method="post"><input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /><input type="hidden" name="action" value="do_editpost" /><input type="hidden" name="prefix" value="'.$thread['prefix'].'" /><input type="hidden" name="subject" value="'.htmlspecialchars_uni($tplvars['firstpost']['subject']).'" /><input type="hidden" name="icon" value="'.$tplvars['firstpost']['icon'].'" /><input type="hidden" name="message" value="'.htmlspecialchars_uni($tplvars['firstpost']['message']).'" /><input type="hidden" name="options[signature]" value="'.$tplvars['firstpost']['includesig'].'" /><input type="hidden" name="options[disablesmilies]" value="'.$tplvars['firstpost']['smilieoff'].'" /><input type="hidden" name="pid" value="'.$thread['firstpost'].'" /><input type="hidden" name="xthreads_sis" value="Solved" /><input type="hidden" name="xthreads_xtspt_solvepost" value="'</setvar>
      	<setvar solvebutton2>'" /><input type="submit" value="Mark this post as solution" /></form><!-- '</setvar>
      </if>

    • Display Format:

      Code:
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      <if $mybb->user['uid'] == $thread['uid'] || is_moderator($fid, '', $mybb->user['uid']) then>
      	<setvar firstpost>get_post($thread['firstpost'])</setvar>
      	<setvar solvebutton1>'<form action="editpost.php" method="post"><input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /><input type="hidden" name="action" value="do_editpost" /><input type="hidden" name="prefix" value="'.$thread['prefix'].'" /><input type="hidden" name="subject" value="'.htmlspecialchars_uni($tplvars['firstpost']['subject']).'" /><input type="hidden" name="icon" value="'.$tplvars['firstpost']['icon'].'" /><input type="hidden" name="message" value="'.htmlspecialchars_uni($tplvars['firstpost']['message']).'" /><input type="hidden" name="options[signature]" value="'.$tplvars['firstpost']['includesig'].'" /><input type="hidden" name="options[disablesmilies]" value="'.$tplvars['firstpost']['smilieoff'].'" /><input type="hidden" name="pid" value="'.$thread['firstpost'].'" /><input type="hidden" name="xthreads_sis" value="Solved" /><input type="hidden" name="xthreads_xtspt_solvepost" value="'</setvar>
      	<setvar solvebutton2>'" /><input type="submit" value="Mark this post as solution" /></form>'</setvar>
      </if>
      <if {VALUE} && $tplvars['issue_status'] == 'Solved' then>
      	<setvar post>get_post(intval({VALUE}))</setvar>
      	<if $tplvars['post']['pid'] && $tplvars['post']['tid'] == $thread['tid'] && $tplvars['post']['visible'] then>
      		<tr><td class="solved largetext" colspan="2"><a href="{$threadurl_q}pid={$tplvars['post']['pid']}#pid{$tplvars['post']['pid']}"><span style="color: green;"><strong>Solution Post</strong></span></a> by <a href="<?=get_profile_link(intval($tplvars['post']['uid']))?>"><strong><func htmlspecialchars_uni>{$tplvars['post']['username']}</func></strong></a></td></tr>
      		<setvar solvepostcss>array($tplvars['post']['pid'] => ' solved')</setvar>
      	</if>
      </if>

    • Underlying Data Type: Integer (unsigned)

Edit A Custom Thread Field:
  • Issue Status
    • Title: Issue Status
    • Key: sis
    • Description: Please edit this status if your issue has been solved.
    • Applicable Forums: 'select our support forum.'
    • Input Field Type: Listbox
    • Field Input Height: 1
    • Values List:

      Code:
      Unsolved
      Solved

    • Editable by / Required Field?: Everyone (required)
    • Allow Filtering: Yes
    • Formatting Map List:
      • Value: Unsolved
        Displayed Output:

        Code:
        <if THIS_SCRIPT == 'showthread.php' then><tr><td class="trow2" valign="top"><strong>{$GLOBALS['threadfields_x']['sis']['title']}</strong></td><td class="trow2" valign="top"><a href="{$forumurl_q}filtertf_sis=Unsolved" style="color: red;"><strong>Unsolved</strong></a></td></tr><else> unsolved</if>

      • Value: Solved
        Displayed Output:

        Code:
        <if THIS_SCRIPT == 'showthread.php' then><tr><td class="trow2" valign="top"><strong>{$GLOBALS['threadfields_x']['sis']['title']}</strong></td><td class="trow2" valign="top"><a href="{$forumurl_q}filtertf_sis=Solved" style="color: green;"><strong>Solved</strong></a></td></tr><else> solved</if><setvar issue_status>'Solved'</setvar>

      Code:
      Unsolved{|}<if THIS_SCRIPT == 'showthread.php' then><tr><td class="trow2" valign="top"><strong>{$GLOBALS['threadfields_x']['sis']['title']}</strong></td><td class="trow2" valign="top"><a href="{$forumurl_q}filtertf_sis=Unsolved" style="color: red;"><strong>Unsolved</strong></a></td></tr><else> unsolved</if>
      <if THIS_SCRIPT == 'showthread.php' then><tr><td class="trow2" valign="top"><strong>{$GLOBALS['threadfields_x']['sis']['title']}</strong></td><td class="trow2" valign="top"><a href="{$forumurl_q}filtertf_sis=Solved" style="color: green;"><strong>Solved</strong></a></td></tr><else> solved</if><setvar issue_status>'Solved'</setvar>


Create new templates:
  1. xtsupport_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
    59
    60
    61
    62
    63
    64
    {$ignore_bit}
    <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tbody>
    		<tr>
    			<td class="tcat">
    				<div class="float_left smalltext">
    					{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
    				</div>
    				{$post['posturl']}
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow1 {$unapproved_shade}{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}">
    				<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
    					<tr>
    						<td class="post_avatar" width="1" style="{$post['avatar_padding']}">
    							{$post['useravatar']}
    						</td>
    						<td class="post_author">
    							<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    							<span class="smalltext">
    								{$post['usertitle']}<br />
    								{$post['userstars']}
    								{$post['groupimage']}
    							</span>
    						</td>
    						<td class="smalltext post_author_info" width="165">
    							{$post['user_details']}
    						</td>
    					</tr>
    				</table>
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow2 post_content {$unapproved_shade}{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}">
    				<div class="float_right"><!--{$GLOBALS['tplvars']['solvebutton1']}{$post['pid']}{$GLOBALS['tplvars']['solvebutton2']}--></div>
    				<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
    
    				<div class="post_body clear" id="pid_{$post['pid']}">
    					{$post['message']}
    				</div>
    				{$post['attachments']}
    				{$post['signature']}
    
    				<div class="post_meta" id="post_meta_{$post['pid']}">
    				{$post['iplogged']}
    				</div>
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow1 post_buttons {$unapproved_shade}{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}">
    				<div class="author_buttons float_left">
    					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}
    				</div>
    				<div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
    				</div>
    			</td>
    		</tr>
    	</tbody>
    </table>

  2. xtsupport_postbit_classic

    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
    {$ignore_bit}
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tr>
    		<td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    		<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    		<span class="smalltext">
    			{$post['usertitle']}<br />
    			{$post['userstars']}
    			{$post['groupimage']}
    			{$post['useravatar']}<br />
    			{$post['user_details']}
    		</span>
    	</td>
    	<td class="{$altbg}{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}" valign="top">
    		<table width="100%">
    			<tr><td>{$post['posturl']}<span class="smalltext"><strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong></span>
    			<br />
    			<div class='float_right"><!--{$GLOBALS['tplvars']['solvebutton1']}{$post['pid']}{$GLOBALS['tplvars']['solvebutton2']}--></div>
    			<div id="pid_{$post['pid']} clear" style="padding: 5px 0 5px 0;">
    				{$post['message']}
    			</div>
    			{$post['attachments']}
    			{$post['signature']}
    			<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
    				<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
    				{$post['iplogged']}
    			</div>
    		</td></tr>
    	</table>
    </td>
    </tr>
    <tr>
    	<td class="{$altbg}{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}" style="white-space: nowrap; text-align: center; vertical-align: middle;"><span class="smalltext">{$post['postdate']} {$post['posttime']}</span></td>
    	<td class="{$altbg}{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}" style="vertical-align: middle;">
    		<table width="100%" border="0" cellpadding="0" cellspacing="0">
    			<tr valign="bottom">
    				<td align="left" ><span class="smalltext">{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}</span></td>
    				<td align="right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</td>
    			</tr>
    		</table>
    	</td>
    </tr>
    </table>



Edit Templates:
  1. xtsupport_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
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    {$ignore_bit}
    <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tbody>
    		<tr>
    			<td class="tcat">
    				<div class="float_left smalltext">
    					{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
    				</div>
    				{$post['posturl']}
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow1 {$unapproved_shade}{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}">
    				<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
    					<tr>
    						<td class="post_avatar" width="1" style="{$post['avatar_padding']}">
    							{$post['useravatar']}
    						</td>
    						<td class="post_author">
    							<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    							<span class="smalltext">
    								{$post['usertitle']}<br />
    								{$post['userstars']}
    								{$post['groupimage']}
    							</span>
    						</td>
    						<td class="smalltext post_author_info" width="165">
    							{$post['user_details']}
    						</td>
    					</tr>
    				</table>
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow2 post_content {$unapproved_shade}{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}">
    				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    					<tr>
    						<td class="thead" colspan="2">{$GLOBALS['tplvars']['spil']}</td>
    					</tr>
    					{$GLOBALS['threadfields']['xtspt_solvepost']}
    					<tr>
    						<td class="trow1" valign="top" width="20%"><strong>{$GLOBALS['tplvars']['issue_title']}</strong></td>
    						<td class="trow1" valign="top">
    							<span class="float_right"><!--{$GLOBALS['tplvars']['solvebutton1']}{$post['pid']}{$GLOBALS['tplvars']['solvebutton2']}--></span>
    							{$post['icon']}{$post['subject']} {$post['subject_extra']}
    						</td>
    					</tr>
    					{$GLOBALS['threadfields']['sis']}
    					{$GLOBALS['threadfields']['sgc']}
    					{$GLOBALS['threadfields']['smv']}
    					{$GLOBALS['threadfields']['smk']}
    					{$GLOBALS['threadfields']['sur']}
    					{$GLOBALS['threadfields']['sdc']}
    					{$GLOBALS['threadfields']['swd']}
    					{$GLOBALS['threadfields']['swt']}
    					{$GLOBALS['threadfields']['spl']}
    				</table>
    				{$GLOBALS['threadfields']['spo']}
    				<div class="post_body" id="pid_{$post['pid']}">
    					{$post['message']}
    				</div>
    				{$post['attachments']}
    				{$post['signature']}
    
    				<div class="post_meta" id="post_meta_{$post['pid']}">
    				{$post['iplogged']}
    				</div>
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow1 post_buttons {$unapproved_shade}{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}">
    				<div class="author_buttons float_left">
    					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}
    				</div>
    				<div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
    				</div>
    			</td>
    		</tr>
    	</tbody>
    </table>

  2. xtsupport_postbit_first_classic

    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
    59
    60
    61
    62
    63
    64
    65
    {$ignore_bit}
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tr>
    		<td class="{$altbg}{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}" width="15%" valign="top" style="white-space: nowrap; text-align: center;">
    			<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    			<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    			<span class="smalltext">
    				{$post['usertitle']}<br />
    				{$post['userstars']}
    				{$post['groupimage']}
    				{$post['useravatar']}<br />
    				{$post['user_details']}
    			</span>
    		</td>
    		<td class="{$altbg}{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}" valign="top">
    			<table width="100%">
    				<tr>
    					<td>
    						{$post['posturl']}
    						<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    							<tr>
    								<td class="thead" colspan="2">{$GLOBALS['tplvars']['spil']}</td>
    							</tr>
    							{$GLOBALS['threadfields']['xtspt_solvepost']}
    							<tr>
    								<td class="trow1" valign="top" width="20%"><strong>{$GLOBALS['tplvars']['issue_title']}</strong></td>
    								<td class="trow1" valign="top"><span style="float: right;"><!--{$GLOBALS['tplvars']['solvebutton1']}{$post['pid']}{$GLOBALS['tplvars']['solvebutton2']}--></span>{$post['icon']}{$post['subject']} {$post['subject_extra']}</td>
    							</tr>
    							{$GLOBALS['threadfields']['sis']}
    							{$GLOBALS['threadfields']['sgc']}
    							{$GLOBALS['threadfields']['smv']}
    							{$GLOBALS['threadfields']['smk']}
    							{$GLOBALS['threadfields']['sur']}
    							{$GLOBALS['threadfields']['sdc']}
    							{$GLOBALS['threadfields']['swd']}
    							{$GLOBALS['threadfields']['swt']}
    							{$GLOBALS['threadfields']['spl']}
    						</table>
    						{$GLOBALS['threadfields']['spo']}
    						<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
    							{$post['message']}
    						</div>
    						{$post['attachments']}
    						{$post['signature']}
    						<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
    							<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
    							{$post['iplogged']}
    						</div>
    					</td>
    				</tr>
    			</table>
    		</td>
    	</tr>
    	<tr>
    		<td class="{$altbg}{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}" style="white-space: nowrap; text-align: center; vertical-align: middle;"><span class="smalltext">{$post['postdate']} {$post['posttime']}</span></td>
    		<td class="{$altbg}{$GLOBALS['tplvars']['solvepostcss'][$post['pid']]}" style="vertical-align: middle;">
    			<table width="100%" border="0" cellpadding="0" cellspacing="0">
    				<tr valign="bottom">
    					<td align="left" ><span class="smalltext">{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}</span></td>
    					<td align="right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</td>
    				</tr>
    			</table>
    		</td>
    	</tr>
    </table>


(This post was last modified: 03-07-2011 10:56 AM by RateU.)
03-07-2011 10:51 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #5
RE: Support Form
Looks pretty sweet - thanks RateU! Smile

My Blog
03-07-2011 05:45 PM
Find all posts by this user Quote this message in a reply
MattR Offline
Junior Member
**
Posts: 40
Joined: Jul 2010
Post: #6
RE: Support Form
That's very impressive.
03-08-2011 07:36 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #7
RE: Support Form
Biggrin Thanks Smile

03-08-2011 08:03 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #8
RE: Support Form
Updated:
Solution Post custom thread field:
  • Blank Replacement Value:

    Code:
    <setvar xtsviewable>($mybb->user['uid'] == $thread['uid'] || is_moderator($fid, '', $mybb->user['uid'])) && THIS_SCRIPT == 'showthread.php'</setvar>
    <setvar firstpost>$tplvars['xtsviewable'] ? get_post($thread['firstpost']) : ''</setvar>
    <setvar solvebutton1>$tplvars['xtsviewable'] ? ' --><form action="editpost.php" method="post"><input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /><input type="hidden" name="action" value="do_editpost" /><input type="hidden" name="prefix" value="'.$thread['prefix'].'" /><input type="hidden" name="subject" value="'.htmlspecialchars_uni($tplvars['firstpost']['subject']).'" /><input type="hidden" name="icon" value="'.$tplvars['firstpost']['icon'].'" /><input type="hidden" name="message" value="'.htmlspecialchars_uni($tplvars['firstpost']['message']).'" /><input type="hidden" name="options[signature]" value="'.$tplvars['firstpost']['includesig'].'" /><input type="hidden" name="options[disablesmilies]" value="'.$tplvars['firstpost']['smilieoff'].'" /><input type="hidden" name="pid" value="'.$thread['firstpost'].'" /><input type="hidden" name="xthreads_sis" value="Solved" /><input type="hidden" name="xthreads_xtspt_solvepost" value="' : ''</setvar>
    <setvar solvebutton2>$tplvars['xtsviewable'] ? '" /><input type="submit" value="Mark this post as solution" /></form><!-- ' : ''</setvar>

  • Display Format:

    Code:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    <setvar xtsviewable>($mybb->user['uid'] == $thread['uid'] || is_moderator($fid, '', $mybb->user['uid'])) && THIS_SCRIPT == 'showthread.php'</setvar>
    <setvar firstpost>$tplvars['xtsviewable'] ? get_post($thread['firstpost']) : ''</setvar>
    <setvar solvebutton1>$tplvars['xtsviewable'] ? ' --><form action="editpost.php" method="post"><input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /><input type="hidden" name="action" value="do_editpost" /><input type="hidden" name="prefix" value="'.$thread['prefix'].'" /><input type="hidden" name="subject" value="'.htmlspecialchars_uni($tplvars['firstpost']['subject']).'" /><input type="hidden" name="icon" value="'.$tplvars['firstpost']['icon'].'" /><input type="hidden" name="message" value="'.htmlspecialchars_uni($tplvars['firstpost']['message']).'" /><input type="hidden" name="options[signature]" value="'.$tplvars['firstpost']['includesig'].'" /><input type="hidden" name="options[disablesmilies]" value="'.$tplvars['firstpost']['smilieoff'].'" /><input type="hidden" name="pid" value="'.$thread['firstpost'].'" /><input type="hidden" name="xthreads_sis" value="Solved" /><input type="hidden" name="xthreads_xtspt_solvepost" value="' : ''</setvar>
    <setvar solvebutton2>$tplvars['xtsviewable'] ? '" /><input type="submit" value="Mark this post as solution" /></form><!-- ' : ''</setvar>
    <setvar solved>{VALUE} && $tplvars['issue_status'] == 'Solved' && THIS_SCRIPT == 'showthread.php'</setvar>
    <setvar post>$tplvars['solved'] ? get_post(intval({VALUE})) : ''</setvar>
    <if $tplvars['post']['pid'] && $tplvars['post']['tid'] == $thread['tid'] && $tplvars['post']['visible'] then>
    	<tr><td class="solved largetext" colspan="2"><a href="{$threadurl_q}pid={$tplvars['post']['pid']}#pid{$tplvars['post']['pid']}"><span style="color: green;"><strong>Solution Post</strong></span></a> by <a href="<?=get_profile_link(intval($tplvars['post']['uid']))?>"><strong><func htmlspecialchars_uni>{$tplvars['post']['username']}</func></strong></a></td></tr>
    	<setvar solvepostcss>array($tplvars['post']['pid'] => ' solved')</setvar>
    </if>


Thank you very much, Yumi Smile

03-11-2011 07:40 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #9
RE: Support Form
Updated (XThreads 1.43):
Solution Post custom thread field:
  • Blank Replacement Value:

    Code:
    <setvar xtsviewable>($mybb->user['uid'] == $thread['uid'] || is_moderator($fid, '', $mybb->user['uid'])) && THIS_SCRIPT == 'showthread.php'</setvar>
    <setvar firstpost>$tplvars['xtsviewable'] ? get_post($thread['firstpost']) : ''</setvar>
    <setvar solvebutton1>$tplvars['xtsviewable'] ? ' --><form action="editpost.php" method="post"><input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /><input type="hidden" name="action" value="do_editpost" /><input type="hidden" name="pid" value="'.$thread['firstpost'].'" /><input type="hidden" name="xthreads_sis" value="Solved" /><input type="hidden" name="xthreads_xtspt_solvepost" value="' : ''</setvar>
    <setvar solvebutton2>$tplvars['xtsviewable'] ? '" /><input type="submit" value="Mark this post as solution" /></form><!-- ' : ''</setvar>

  • Display Format:

    Code:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    <setvar xtsviewable>($mybb->user['uid'] == $thread['uid'] || is_moderator($fid, '', $mybb->user['uid'])) && THIS_SCRIPT == 'showthread.php'</setvar>
    <setvar firstpost>$tplvars['xtsviewable'] ? get_post($thread['firstpost']) : ''</setvar>
    <setvar solvebutton1>$tplvars['xtsviewable'] ? ' --><form action="editpost.php" method="post"><input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /><input type="hidden" name="action" value="do_editpost" /><input type="hidden" name="pid" value="'.$thread['firstpost'].'" /><input type="hidden" name="xthreads_xtspt_solvepost" value="' : ''</setvar>
    <setvar solvebutton2>$tplvars['xtsviewable'] ? '" /><input type="submit" value="Mark this post as solution" /></form><!-- ' : ''</setvar>
    <setvar solved>{VALUE} && $tplvars['issue_status'] == 'Solved' && THIS_SCRIPT == 'showthread.php'</setvar>
    <setvar post>$tplvars['solved'] ? get_post(intval({VALUE})) : ''</setvar>
    <if $tplvars['post']['pid'] && $tplvars['post']['tid'] == $thread['tid'] && $tplvars['post']['visible'] then>
    	<tr><td class="solved largetext" colspan="2"><a href="{$threadurl_q}pid={$tplvars['post']['pid']}#pid{$tplvars['post']['pid']}"><span style="color: green;"><strong>Solution Post</strong></span></a> by <a href="<?=get_profile_link(intval($tplvars['post']['uid']))?>"><strong><func htmlspecialchars_uni>{$tplvars['post']['username']}</func></strong></a></td></tr>
    	<setvar solvepostcss>array($tplvars['post']['pid'] => ' solved')</setvar>
    </if>


07-18-2011 03:19 AM
Find all posts by this user Quote this message in a reply
blakefire Offline
Junior Member
**
Posts: 24
Joined: May 2011
Post: #10
RE: Support Form
No matter what category I mark the thread under it comes out blue in the thread list.
08-10-2011 06:41 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: