Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Contact Us System
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Contact Us System
Requirement: XThreads
Latest Update: 7 October 2012

We can use XThreads for Contact Us system. We will combine it with Quick Thread plugin.

Here is a simple example for it:

Custom Thread Fields Setting:
  1. Textbox for Name:
    Create a Custom Thread Fields with this settings:
    • Title: Name
    • Key: contus_name
    • Applicable Forums: 'select a forum that we will apply for this system'
    • Input Field Type: Textbox
    • Editable by / Required Field?: Everyone (required)
      Variable in template for displaying this field is: {$GLOBALS['threadfields']['contus_name']}.
  2. Textbox for E-Mail:
    Create a Custom Thread Fields with this settings:
    • Title: E-Mail
    • Key: contus_email
    • Applicable Forums: 'select a forum above'
    • Input Field Type: Textbox
    • Editable by / Required Field?: Everyone (required)
    • Display Order: 2
    • Text Mask Filter: Email address
      Variable in template for displaying this field is: {$GLOBALS['threadfields']['contus_email']}.
  3. Listbox for Category:
    Create a Custom Thread Fields with this settings:
    • Title: Category
    • Key: contus_cat
    • Applicable Forums: 'select the forum above'
    • Input Field Type: Listbox
    • Field Input Height: 1
    • Values List:

      Code:
      Account
      Support
      Other

      Modify it as our needs.

    • Editable by / Required Field?: Everyone (required)
    • Display Order: 3
    • Allow Filtering: Yes
      We put the filtering url manually in template:
      Template #4 - contus_forumdisplay_inlinemoderation_col - line #18 - #20
      So, if we want to modify the value lists, we need to modify those templates too.
  4. Multiline Textbox for Message:
    Create a Custom Thread Fields with this settings:
    • Title: Message
    • Key: contus_msg
    • Applicable Forums: 'select a forum above'
    • Input Field Type: Multiline Textbox
    • Field Input Width: 62
      Modify it as our needs. This is the width of the textarea.
    • Editable by / Required Field?: Everyone (required)
    • Display Parsing: Plain text with new lines
    • Display Order: 4
      Variable in template for displaying this field is: {$GLOBALS['threadfields']['contus_msg']}.
  5. Listbox for Status:
    Create a Custom Thread Fields with this settings:
    • Title: Status
    • Key: contus_status
    • Applicable Forums: 'select the forum above'
    • Input Field Type: Listbox
    • Field Input Height: 1
    • Values List:

      Code:
      New
      Confirmed
      Ignored

      Modify it as our needs.

    • Editable by / Required Field?: Everyone
    • Display Order: 5
    • Allow Filtering: Yes
      We put the filtering url manually in template:
      Template #4 - contus_forumdisplay_inlinemoderation_col - line #11 - #13
      So, if we want to modify the value lists, we need to modify those templates too.
    • Default Value: New
    • Display Format:

      HTML Code
      <a href="{$forumurl?}filtertf_contus_status={VALUE}">{VALUE}</a>

    • Hide Input Field: Yes
      We put this input field manually in our templates:
      Template #1 - contus_editpost_first - line#23


Edit the selected forum with this XThreads Options settings:
  1. Template Prefix:

    Code:
    <if $mybb->usergroup['cancp'] then>contus_admin_,</if>contus_

  2. Language File Prefix: contus_
  3. Show first post on every showthread page: Yes
  4. Hide Forum: Yes
    We need to put this forum url manually in our templates (e.g: header template). Or, we can put this forum url in Contact Us Link under Admin CP -> Configuration -> Settings -> General Configuration -> Contact Us Link.
  5. Allow Blank Post Message: Yes
  6. Settings Overrides:
    • Setting: Showthread Options -> Post Layout
      Value: horizontal

      Code:
      postlayout=horizontal

  7. Default Thread Filter:
    • Field: contus_status
    • Value: New

    Code:
    contus_status=New

  8. Custom WOL Text:
    • Forum Display: Contact Us
    • New Thread: Using Contact Us Form


Then, we need this additional settings for that forum:
  1. Moderation Options: Yes, moderate new threads
  2. Forum Permissions:
    Don't use these settings for Administrator or user group which can manage the submitted forms (Unapproved Threads).

    Basically, we need these settings for Guest user group, so they can use the form.
    If we want registered user group has an ability to use this form, we need to set their permission like this too.

    Use these forum permissions settings for each user group which is allowed to use the Contact Us form. Only thick these options:
    • Use custom permissions (below)
    • Can view forum?
    • Can post threads?


Now, we need to create new templates in Global Template.
Admin CP -> Templates & Style -> Templates -> Global Templates:
  1. Template Name: contus_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
    <html>
    <head>
    <title>{$mybb->settings['bbname']} - {$lang->edit_post}</title>
    {$headerinclude}
    <script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
    </head>
    <body>
    {$header}
    <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="0" cellpadding="{$theme['tablespace']}" width="100%">
    		<tr>
    			<td></td>
    			<td width="620">
    				{$preview}
    				{$post_errors}
    				<table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" class="tborder">
    					<tr>
    						<td colspan="2" class="thead">
    							<strong>{$lang->edit_post}</strong>
    						</td>
    					</tr>
    					{$tfinputrow['contus_status']}
    					<tr>
    						<td class="trow1" width="22%">
    							<strong>{$lang->subject}</strong>
    						</td>
    						<td class="trow1">
    							<input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" />
    						</td>
    					</tr>
    					{$extra_threadfields}
    					<tr style="display: none;">
    						<td class="trow2" valign="top">
    							<strong>{$lang->your_message}:</strong>
    						</td>
    						<td class="trow2">
    							<textarea name="message" id="message" rows="20" cols="70" tabindex="3">{$message}</textarea>
    						</td>
    					</tr>
    					<tr>
    						<td colspan="2" align="center" class="tfoot">
    							<input type="submit" class="button" name="submit" value="{$lang->update_post}" tabindex="3" />
    							<input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="4" />
    						</td>
    					</tr>
    				</table>
    			</td>
    			<td></td>
    		</tr>
    	</table>
    	<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 colspan="3" class="thead">
    				<strong>{$lang->delete_post}</strong>
    			</td>
    		</tr>
    		<tr>
    			<td class="trow1" style="white-space: nowrap; width: 15%;" align="center">
    				<input type="checkbox" class="checkbox" name="delete" value="1" tabindex="9" /><br />
    				<strong>{$lang->delete_q}</strong>
    			</td>
    			<td class="trow1" width="70%">
    				{$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. Template Name: contus_forumdisplay

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    <html>
    <head>
    <title>{$mybb->settings['bbname']} - {$foruminfo['name']} </title>
    {$headerinclude}
    {$rssdiscovery}
    <script type="text/javascript">
    <!--
    	lang.no_new_posts = "{$lang->no_new_posts}";
    	lang.click_mark_read = "{$lang->click_mark_read}";
    // -->
    </script>
    </head>
    <body>
    {$header}
    {$usersbrowsing}
    {$rules}
    {$quickthread}
    {$threadslist}
    {$footer}
    </body>
    </html>

  3. Template Name: contus_forumdisplay_inlinemoderation
    For 1.4:

    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
    </table>
    </td>
    </tr>
    <tr>
    	<td align="right">
    		<script type="text/javascript" src="jscripts/inline_moderation.js?ver=1400"></script>
    		<form action="moderation.php" method="post">
    			<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
    			<input type="hidden" name="fid" value="{$fid}" />
    			<input type="hidden" name="modtype" value="inlinethread" />
    			<span class="smalltext"><strong>{$lang->inline_thread_moderation}</strong></span>
    			<select name="action">
    				<optgroup label="{$lang->standard_mod_tools}">
    					<option value="multiclosethreads">{$lang->close_threads}</option>
    					<option value="multiopenthreads">{$lang->open_threads}</option>
    					<option value="multistickthreads">{$lang->stick_threads}</option>
    					<option value="multiunstickthreads">{$lang->unstick_threads}</option>
    					<option value="multideletethreads">{$lang->delete_threads}</option>
    					<option value="multimovethreads">{$lang->move_threads}</option>
    					<option value="multiunapprovethreads">{$lang->unapprove_threads}</option>
    				</optgroup>
    				{$customthreadtools}
    			</select>
    			<input type="submit" class="button" name="go" value="{$lang->inline_go} ({$inlinecount})" id="inline_go" />&nbsp;
    			<input type="button" onclick="javascript:inlineModeration.clearChecked();" value="{$lang->clear}" class="button" />
    		</form>
    		<script type="text/javascript">
    		<!--
    			var go_text = "{$lang->inline_go}";
    			var inlineType = "forum";
    			var inlineId = {$fid};
    		// -->
    		</script>
    	</td>
    </tr>


    For 1.6:

    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
    </table>
    </td>
    </tr>
    <tr>
    	<td align="right">
    		<script type="text/javascript" src="jscripts/inline_moderation.js?ver=1600"></script>
    		<form action="moderation.php" method="post">
    			<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
    			<input type="hidden" name="fid" value="{$fid}" />
    			<input type="hidden" name="modtype" value="inlinethread" />
    			<span class="smalltext"><strong>{$lang->inline_thread_moderation}</strong></span>
    			<select name="action">
    				<option value="delayedmoderation">{$lang->delayed_moderation}</option>
    				<optgroup label="{$lang->standard_mod_tools}">
    					<option value="multiclosethreads" selected="selected">{$lang->close_threads}</option>
    					<option value="multiopenthreads">{$lang->open_threads}</option>
    					<option value="multistickthreads">{$lang->stick_threads}</option>
    					<option value="multiunstickthreads">{$lang->unstick_threads}</option>
    					<option value="multideletethreads">{$lang->delete_threads}</option>
    					<option value="multimovethreads">{$lang->move_threads}</option>
    					<option value="multiunapprovethreads">{$lang->unapprove_threads}</option>
    				</optgroup>
    				{$customthreadtools}
    			</select>
    			<input type="submit" class="button" name="go" value="{$lang->inline_go} ({$inlinecount})" id="inline_go" />&nbsp;
    			<input type="button" onclick="javascript:inlineModeration.clearChecked();" value="{$lang->clear}" class="button" />
    		</form>
    		<script type="text/javascript">
    		<!--
    			var go_text = "{$lang->inline_go}";
    			var all_text = "{$threadcount}";
    			var inlineType = "forum";
    			var inlineId = {$fid};
    		// -->
    		</script>
    	</td>
    </tr>

  4. Template Name: contus_forumdisplay_inlinemoderation_col

    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
    <tr>
    	<td>&nbsp;</td>
    </tr>
    <tr>
    	<td>
    		<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    			<tr>
    				<td colspan="9" class="thead">
    					<div class="float_left smalltext">
    						<strong>Status Filter:
    							<a href="{$forumurl_q}filtertf_contus_status=New">New</a> |
    							<a href="{$forumurl_q}filtertf_contus_status=Confirmed">Confirmed</a> |
    							<a href="{$forumurl_q}filtertf_contus_status=Ignored">Ignored</a>
    						</strong>
    					</div>
    					<div class="float_right smalltext">
    						<strong>Category Filter:
    							<a href="{$forumurl_q}filtertf_contus_cat=Account">Account</a> |
    							<a href="{$forumurl_q}filtertf_contus_cat=Support">Support</a> |
    							<a href="{$forumurl_q}filtertf_contus_cat=Other">Other</a>
    						</strong>
    					</div>
    					<div align="center">
    						<a href="{$forumurl}"><strong>Submitted Forms</strong></a>
    					</div>
    				</td>
    			</tr>
    			<tr>
    				<td class="tcat" align="center" width="1">
    					<input type="checkbox" name="allbox" onclick="inlineModeration.checkAll(this)" />
    				</td>
    				<td class="tcat smalltext" align="center">
    					<strong>{$lang->thread}</strong>
    				</td>
    				<td class="tcat smalltext" align="center">
    					<strong>Status</strong>
    				</td>
    				<td class="tcat smalltext" align="center">
    					<strong>Category</strong>
    				</td>
    				<td class="tcat smalltext" align="center">
    					<strong>{$lang->replies}</strong>
    				</td>
    				<td class="tcat smalltext" align="center">
    					<strong>{$lang->views}</strong>
    				</td>
    				<td class="tcat smalltext" align="center">
    					<strong>{$lang->lastpost}</strong>
    				</td>
    			</tr>

  5. Template Name: contus_forumdisplay_nothreads

    HTML Code
    <tr><td></td></tr>

  6. Template Name: contus_forumdisplay_quick_thread

    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
    <form method="post" action="newthread.php?fid={$fid}&amp;processed=1" name="quick_thread_form" id="quick_thread_form">
    	<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
    	<input type="hidden" name="action" value="do_newthread" />
    	<input type="hidden" name="posthash" value="{$posthash}" id="posthash" />
    	<input type="hidden" name="xthreads_contus_status" value="New" />
    	<table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" width="100%">
    		<tr>
    			<td></td>
    			<td width="620">
    				<table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" class="tborder">
    					<thead>
    						<tr>
    							<td colspan="2" class="thead">
    								<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['quickthread']}.gif" id="quickthread_img" class="expander" alt="[-]" title="[-]" /></div>
    								<div><strong>Contact Us</strong></div>
    							</td>
    						</tr>
    					</thead>
    					<tbody style="{$collapsed['quickthread_e']}" id="quickthread_e">
    						<tr>
    							<td valign="top" width="22%" class="trow1">
    								<strong>{$lang->subject}</strong>
    							</td>
    							<td class="trow1">
    								<div style="width: 95%">
    									<input type="text" class="textbox" name="subject" size="40" maxlength="85" tabindex="1" />
    								</div>
    							</td>
    						</tr>
    						{$GLOBALS['extra_threadfields']}
    						{$captcha}
    						<tr>
    							<td colspan="2" align="center" class="tfoot">
    								<input type="submit" class="button" value="Submit" tabindex="2" accesskey="s" id="quick_thread_submit" />
    								<input type="submit" class="button" name="previewpost" value="Preview" tabindex="3" />
    							</td>
    						</tr>
    					</tbody>
    				</table>
    				<br />
    				<table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" width="100%">
    					<tr>
    						<td valign="middle" align="center" class="smalltext">
    							Contact Us
    							<div>
    								Powered By <a href="http://mybbhacks.zingaburga.com/showthread.php?tid=288">XThreads</a> - <a href="http://mybbhacks.zingaburga.com">MyBB Hacks</a>
    							</div>
    						</td>
    					</tr>
    				</table>
    			</td>
    			<td></td>
    		</tr>
    	</table>
    </form>

  7. Template Name: contus_admin_forumdisplay_quick_thread

    HTML Code
    <div></div>

  8. Template Name: contus_forumdisplay_thread

    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
    <tr>
    	{$modbit}
    	<td class="{$bgcolor}">
    		{$attachment_count}
    		<div>
    			<span>{$prefix} {$gotounread}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>
    			<div class="author smalltext">{$thread['threaddate']}, {$thread['threadtime']}</div>
    		</div>
    	</td>
    	<td align="center" class="{$bgcolor}">
    		{$GLOBALS['threadfields']['contus_status']}
    	</td>
    	<td align="center" class="{$bgcolor}">
    		<a href="{$forumurl_q}filtertf_contus_cat={$GLOBALS['threadfields']['contus_cat']}">{$GLOBALS['threadfields']['contus_cat']}</a>
    	</td>
    	<td align="center" class="{$bgcolor}">
    		<a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}
    	</td>
    	<td align="center" class="{$bgcolor}">
    		{$thread['views']}
    	</td>
    	<td class="{$bgcolor}" style="white-space: nowrap; text-align: right;" colspan="2">
    		<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
    		<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
    	</td>
    </tr>

  9. Template Name: contus_forumdisplay_threadlist

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    <table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" width="100%" style="clear: both;">
    	{$inlinemodcol}
    	{$threads}{$nullthreads}
    	{$inlinemod}
    </table>
    <div class="float_left">
    	{$multipage}
    </div>
    <br style="clear: both;" />
    <div class="float_right" style="text-align: right;">
    	{$searchforum}
    </div>
    <br style="clear: both" />
    {$inline_edit_js}

  10. Template Name: contus_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
    <html>
    <head>
    <title>Contact Us</title>
    {$headerinclude}
    <script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
    </head>
    <body>
    {$header}
    <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="0" cellpadding="{$theme['tablespace']}" width="100%">
    		<tr>
    			<td></td>
    			<td width="620">
    				{$thread_errors}
    				{$preview}
    				<table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" class="tborder">
    					<thead>
    						<tr>
    							<td colspan="2" class="thead">
    								<div class="expcolimage"><img src="{$theme['imgdir']}/collapse{$collapsedimg['quickthread']}.gif" id="quickthread_img" class="expander" alt="[-]" title="[-]" /></div>
    								<div><strong>Contact Us</strong></div>
    							</td>
    						</tr>
    					</thead>
    					<tbody style="{$collapsed['quickthread_e']}" id="quickthread_e">
    						<tr>
    							<td width="22%" class="trow1">
    								<strong>Subject</strong>
    							</td>
    							<td class="trow1">
    								<div style="width: 95%">
    									<input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" />
    								</div>
    							</td>
    						</tr>
    						{$extra_threadfields}
    						{$captcha}
    						<tr>
    							<td colspan="2" align="center" class="tfoot">
    								<input type="submit" class="button" name="submit" value="Submit" tabindex="4" accesskey="s" />
    								<input type="submit" class="button" name="previewpost" value="Preview" tabindex="5" />
    							</td>
    						</tr>
    					</tbody>
    				</table>
    				<br />
    				<table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" width="100%">
    					<tr>
    						<td valign="middle" align="center" class="smalltext">
    							Contact Us
    							<div>
    								Powered By <a href="http://mybbhacks.zingaburga.com/showthread.php?tid=288">XThreads</a> - <a href="http://mybbhacks.zingaburga.com">MyBB Hacks</a>
    							</div>
    						</td>
    					</tr>
    				</table>
    			</td>
    			<td></td>
    		</tr>
    	</table>
    	<br />
    	<input type="hidden" name="action" value="do_newthread" />
    	<input type="hidden" name="posthash" value="{$posthash}" />
    	<input type="hidden" name="xthreads_contus_status" value="New" />
    	<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>
    {$footer}
    </body>
    </html>

  11. Template Name: contus_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
    {$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 post_content {$unapproved_shade}" style="border-bottom: 2px solid #0F5C8E;" colspan="2">
    				<table border="0" width="100%">
    					<tr>
    						<td valign="top" colspan="3"><strong>{$GLOBALS['threadfields']['contus_status']}</strong></td>
    					</tr>
    					<tr>
    						<td width="75" valign="top">Subject</td>
    						<td width="1" valign="top">:</td>
    						<td valign="top">{$post['subject']} {$post['subject_extra']}</td>
    					</tr>
    					<tr>
    						<td width="75" valign="top">Name</td>
    						<td width="1" valign="top">:</td>
    						<td valign="top">{$GLOBALS['threadfields']['contus_name']}</td>
    					</tr>
    					<tr>
    						<td width="75" valign="top">E-Mail</td>
    						<td width="1" valign="top">:</td>
    						<td valign="top">{$GLOBALS['threadfields']['contus_email']}</td>
    					</tr>
    					<tr>
    						<td width="75" valign="top">Category</td>
    						<td width="1" valign="top">:</td>
    						<td valign="top">{$GLOBALS['threadfields']['contus_cat']}</td>
    					</tr>
    					<tr>
    						<td valign="top" colspan="3"><br />{$GLOBALS['threadfields']['contus_msg']}</td>
    					</tr>
    				</table>
    				<div class="post_meta" id="post_meta_{$post['pid']}">
    					{$post['iplogged']}
    				</div>
    				<br class="clear" />
    				<div class="author_buttons float_left">
    					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}
    				</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>

  12. Template Name: contus_post_captcha

    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
    <tr id="captcha_trow">
    	<td valign="top" colspan="2" class="tcat">
    		<strong>{$lang->image_verification}</strong>
    	</td>
    </tr>
    <tr>
    	<td colspan="2" class="trow1">
    		<script type="text/javascript" src="jscripts/captcha.js?ver=1400"></script>
    		<table style="width: 100%; padding: 4px;">
    			<tr>
    				<td width="40%" align="center">
    					<img src="captcha.php?imagehash={$imagehash}" alt="{$lang->image_verification}" title="{$lang->image_verification}" id="captcha_img" /><br />
    					<span style="color: red;" class="smalltext">{$lang->verification_subnote}</span>
    					<script type="text/javascript">
    					<!--
    						if(use_xmlhttprequest == "1")
    						{
    							document.write('<br \/><input type="button" class="button" name="refresh" value="{$lang->refresh}" onclick="return captcha.refresh();" \/>');
    						}
    					// -->
    					</script>
    				</td>
    				<td valign="top">
    					<div class="smalltext">{$lang->verification_note}</div>
    					<br />
    					<div align="center">
    						<input type="text" class="textbox" name="imagestring" value="" id="imagestring" /><input type="hidden" name="imagehash" value="{$imagehash}" id="imagehash" />
    					</div>
    				</td>
    			</tr>
    		</table>
    	</td>
    </tr>

  13. Template Name: contus_threadfields_inputrow

    HTML Code
    <tr>
    	<td class="trow1"><strong>{$tf['title']}</strong></td>
    	<td class="trow1">{$inputfield}<small style="display: block;">{$tf['desc']}</small></td>
    </tr>



We can do anything with the submitted form (unapproved thread) in this forum, like edit, delete, change their status, edit their category and etc. But please, don't ever to approve it. If we approve a thread in this forum id, the thread will be shown in the thread list, below the contact us form. And because XThreads tightly integrated to MyBB, we have a full control for it, like adding field to the form, removing some fields, editing some field in our contact us form, using MyBB forum permissions, managing the submitted form (the unapproved threads) and etc. Yeah, Yumi does a lot of magics to XThreads.

Edit Log:
15 September 2010 - 11 February 2011 - 19 March 2011 - 21 July 2011


Screenshoots:

1. Here is our contact us form. And this is how the thread list layout should be viewed by Guest or other user group which has access to the form.
   

2. XThreads and MyBB validation error. Of course.
   

3. We still have the built in MyBB preview thread function.
   

4. This is how the layout for Admin. With this way we have an ability to manage the submitted form (unapproved threads)
   

5. Editing the thread will give us an access to an hidden thread fields. In the example above, Status. The field can be accessed from editing page only. It will make us easier to track whether the submitted form already responded - Confirmed, or not responded yet - New, or even a spam - Ignored. We already have a filtering url for this in thread list.
       
Like said before, the only thing that we can't do in this forum is approving a thread.

6. Postbit. Yeah, standard postbit. We use it only to read the submitted form / thread contents.
   

Additional Info:
We use language file prefix for redirect message (attached). Upload it to our inc/languages/english/ folder or edit/modify it, and upload it to our language folder.

Live Demo:
http://www.14.mynie.co.cc/forumdisplay.php?fid=26
You can try the Contact Us form there. Just use a fake name and a fake e-mail address.
That is a forum in a free host and free domain. Please forgive me if the forum down for an hour, even all a day.


Attached File(s)
.7z  contus_newthread.lang.php.7z (Size: 397 bytes / Downloads: 895)

(This post was last modified: 10-08-2012 02:53 AM by RateU.)
07-11-2010 12:55 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Contact Us System - RateU - 07-11-2010 12:55 PM
RE: Contact Us System - ZiNgA BuRgA - 07-11-2010, 03:27 PM
RE: Contact Us System - leefish - 07-11-2010, 08:18 PM
RE: Contact Us System - ZiNgA BuRgA - 07-11-2010, 09:13 PM
RE: Contact Us System - RateU - 07-12-2010, 08:50 AM
RE: Contact Us System - ZiNgA BuRgA - 07-12-2010, 09:15 AM
RE: Contact Us System - Imran - 08-04-2010, 06:06 PM
RE: Contact Us System - leefish - 08-11-2010, 11:03 PM
RE: Contact Us System - RateU - 08-12-2010, 04:29 AM
RE: Contact Us System - leefish - 08-12-2010, 12:36 PM
RE: Contact Us System - RateU - 08-13-2010, 05:17 AM
RE: Contact Us System - Pirata Nervo - 08-14-2010, 09:14 AM
RE: Contact Us System - RateU - 08-15-2010, 03:28 AM
RE: Contact Us System - techu - 09-07-2010, 11:05 PM
RE: Contact Us System - RateU - 09-08-2010, 01:03 AM
RE: Contact Us System - techu - 09-08-2010, 01:08 AM
RE: Contact Us System - RateU - 09-08-2010, 01:22 AM
RE: Contact Us System - techu - 09-08-2010, 01:31 AM
RE: Contact Us System - RateU - 09-08-2010, 01:52 AM
RE: Contact Us System - techu - 09-08-2010, 02:00 AM
RE: Contact Us System - RateU - 09-08-2010, 02:28 AM
RE: Contact Us System - techu - 09-08-2010, 02:42 AM
RE: Contact Us System - ZiNgA BuRgA - 09-08-2010, 09:17 AM
RE: Contact Us System - techu - 09-08-2010, 12:15 PM
RE: Contact Us System - ZiNgA BuRgA - 09-08-2010, 12:35 PM
RE: Contact Us System - RateU - 09-16-2010, 02:12 AM
RE: Contact Us System - 1master1 - 10-25-2010, 01:54 PM
RE: Contact Us System - techu - 10-25-2010, 02:59 PM
RE: Contact Us System - leefish - 10-25-2010, 08:36 PM
RE: Contact Us System - 1master1 - 10-26-2010, 02:49 AM
RE: Contact Us System - leefish - 10-26-2010, 03:16 AM
RE: Contact Us System - 1master1 - 10-26-2010, 03:46 AM
RE: Contact Us System - leefish - 10-26-2010, 05:00 AM
RE: Contact Us System - 1master1 - 10-27-2010, 12:06 AM
RE: Contact Us System - techu - 10-27-2010, 02:39 AM
RE: Contact Us System - RateU - 11-09-2010, 04:53 AM
RE: Contact Us System - x-Treme - 11-13-2010, 03:49 AM
RE: Contact Us System - 1master1 - 11-13-2010, 05:26 AM
RE: Contact Us System - RateU - 11-14-2010, 07:35 AM
RE: Contact Us System - Vapor - 01-03-2011, 02:17 PM
RE: Contact Us System - Vapor - 01-04-2011, 02:38 AM
RE: Contact Us System - RateU - 01-04-2011, 02:45 AM
RE: Contact Us System - Vapor - 01-04-2011, 03:26 AM
RE: Contact Us System - RateU - 01-04-2011, 03:38 AM
RE: Contact Us System - Vapor - 01-04-2011, 04:23 AM
RE: Contact Us System - RateU - 01-04-2011, 04:28 AM
RE: Contact Us System - Vapor - 01-04-2011, 04:31 AM
RE: Contact Us System - RateU - 01-04-2011, 04:46 AM
RE: Contact Us System - Vapor - 01-04-2011, 04:56 AM
RE: Contact Us System - RateU - 01-04-2011, 05:01 AM
RE: Contact Us System - Vapor - 01-04-2011, 07:44 AM
RE: Contact Us System - RateU - 01-04-2011, 08:32 AM
RE: Contact Us System - Vapor - 01-04-2011, 10:52 AM
RE: Contact Us System - Vapor - 01-04-2011, 11:32 AM
RE: Contact Us System - RateU - 01-04-2011, 11:51 AM
RE: Contact Us System - Vapor - 01-04-2011, 04:09 PM
RE: Contact Us System - ZiNgA BuRgA - 01-04-2011, 05:43 PM
RE: Contact Us System - Vapor - 01-05-2011, 12:46 AM
RE: Contact Us System - RateU - 01-05-2011, 02:55 AM
RE: Contact Us System - Vapor - 01-05-2011, 03:07 AM
RE: Contact Us System - RateU - 01-05-2011, 03:31 AM
RE: Contact Us System - Vapor - 01-05-2011, 06:31 AM
RE: Contact Us System - ZiNgA BuRgA - 01-05-2011, 09:24 AM
RE: Contact Us System - Vapor - 01-05-2011, 09:58 AM
RE: Contact Us System - ZiNgA BuRgA - 01-05-2011, 10:16 AM
RE: Contact Us System - Vapor - 01-05-2011, 10:27 AM
RE: Contact Us System - Vapor - 01-06-2011, 05:39 AM
RE: Contact Us System - RateU - 01-06-2011, 06:09 AM
RE: Contact Us System - Vapor - 01-06-2011, 06:31 AM
RE: Contact Us System - RateU - 01-07-2011, 05:59 AM
RE: Contact Us System - ZiNgA BuRgA - 01-07-2011, 09:59 AM
RE: Contact Us System - RateU - 02-11-2011, 03:24 AM
RE: Contact Us System - RateU - 03-19-2011, 09:05 AM
RE: Contact Us System - RateU - 07-21-2011, 04:12 AM
RE: Contact Us System - Vapor - 01-06-2012, 03:12 AM
RE: Contact Us System - RateU - 01-06-2012, 05:51 AM
RE: Contact Us System - Vapor - 01-06-2012, 09:07 PM
RE: Contact Us System - nier3 - 08-16-2012, 01:03 AM
RE: Contact Us System - RateU - 08-16-2012, 01:47 AM
RE: Contact Us System - nier3 - 08-16-2012, 08:23 PM
RE: Contact Us System - RateU - 08-17-2012, 01:30 AM
RE: Contact Us System - nier3 - 08-18-2012, 11:01 PM
RE: Contact Us System - Vapor - 09-10-2012, 04:10 AM
RE: Contact Us System - RateU - 10-08-2012, 02:52 AM
RE: Contact Us System - Fring - 12-01-2013, 09:16 AM
RE: Contact Us System - RateU - 12-02-2013, 10:55 PM
RE: Contact Us System - hamidkag - 01-20-2014, 10:37 PM
RE: Contact Us System - Kylin - 12-29-2014, 03:32 AM
RE: Contact Us System - Marc A - 02-28-2015, 01:46 AM
RE: Contact Us System - ZiNgA BuRgA - 02-28-2015, 09:23 AM
RE: Contact Us System - Marc A - 03-02-2015, 02:15 PM
RE: Contact Us System - Vapor - 08-18-2015, 03:01 PM
RE: Contact Us System - Vapor - 08-19-2015, 04:40 AM
RE: Contact Us System - Vapor - 08-22-2015, 03:14 AM
RE: Contact Us System - ZiNgA BuRgA - 09-01-2015, 04:55 PM
RE: Contact Us System - xensor - 12-12-2015, 07:17 PM
RE: Contact Us System - RateU - 12-13-2015, 01:53 AM
RE: Contact Us System - xensor - 12-13-2015, 06:49 AM
RE: Contact Us System - RateU - 12-14-2015, 01:38 AM

 Standard Tools
Forum Jump: