Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Trading Forum
RateU Offline
Administrator
*******
Posts: 2,325
Joined: Mar 2010
Post: #1
Trading Forum
Requirement: XThreads
Updated: 7 October 2012

We will try to create a simple trading forum with XThreads.

Here is an example for it:

Edit/create a forum. XThreads settings:
  1. Template Prefix: trdf_
  2. Thread Grouping: 2
  3. Show first post on every showthread page: Yes
  4. Enable XThreads' Inline Forum Search: Yes
  5. Settings Overrides:
    • Setting: Show Thread Options -> Post Layout
    • Value: horizontal

      Code:
      postlayout=horizontal

  6. Allow Blank Post Message: Yes
  7. Hide Forum: Yes
    We need to put this forum url manually in our templates (e.g: header template).
  8. Custom WOL Text:
    • Forum Display: Viewing Trading Forum
    • New Thread: Create A New Trade
    • New Reply: Responding <a href="{1}">{2}</a> Trade
    • Show Thread: Viewing <a href="{1}">{2}</a> Trade


Forum settings:
We will use the forum rules as our Trading Forum "Index" page. Because we can use HTML in the forum rules, so, we can style it with HTML. Just use our creativity for it.
Additional Forum Settings:
  1. Forum Rules: Display rules for this forum on the thread listing
  2. Title: Welcome To Our Trading Forum
  3. Rules: Type whatever we want here.


Custom Thread Fields Setting:
  1. Listbox for Buy / Sell:
    Create a Custom Thread Fields with this settings:
    • Title: Need To
    • Key: trdftnt
    • Applicable Forums: 'select our trading forum'
    • Input Field Type: Listbox
    • Field Input Width: 10
    • Field Input Height: 1
    • Values List:

      Code:
      Buy
      Sell

    • Editable by / Required Field?: Everyone (required)
    • Display Order: 1
    • Allow Filtering: Yes
    • Hide Input Field: Yes
  2. Listbox for Minimum Or Maximum Value For Price:
    Create a Custom Thread Fields with this settings:
    • Title: Minimum Or Maximum Value
    • Key: trdfminmax
    • Applicable Forums: 'select our trading forum'
    • Input Field Type: Listbox
    • Field Input Width: 15
    • Field Input Height: 1
    • Values List:

      Code:
      Minimum
      Maximum

    • Editable by / Required Field?: Everyone (required)
    • Display Order: 2
    • Hide Input Field: Yes
  3. Textbox for Price:
    Create a Custom Thread Fields with this settings:
    • Title: Price
    • Key: trdfprice
    • Applicable Forums: 'select our trading forum'
    • Field Input Width: 10
    • Editable by / Required Field?: Everyone (required)
    • Display Order: 3
    • Display Format:

      Code:
      <?=number_format({VALUE},2)?>

    • Text Mask Filter:

      Code:
      ^\d+(\.\d{2})?$

    • Hide Input Field: Yes
      Variable in template for displaying this field is: {$GLOBALS['threadfields']['trdfprice']}.
  4. Listbox for Product Condition:
    Create a Custom Thread Fields with this settings:
    • Title: Condition
    • Key: trdfcond
    • Applicable Forums: 'select our trading forum'
    • Input Field Type: Listbox
    • Field Input Width: 10
    • Field Input Height: 1
    • Values List:

      Code:
      New
      Used

    • Editable by / Required Field?: Everyone (required)
    • Display Order: 4
    • Allow Filtering: Yes
    • Hide Input Field: Yes
  5. Listbox for Trading Status:
    Create a Custom Thread Fields with this settings:
    • Title: Status
    • Key: trdfstatus
    • Applicable Forums: 'select our trading forum'
    • Input Field Type: Listbox
    • Field Input Width: 15
    • Field Input Height: 1
    • Values List:

      Code:
      Open
      Closed

    • Editable by / Required Field?: Everyone (required)
    • Display Order: 5
    • Allow Filtering: Yes
    • Hide Input Field: Yes
  6. Textbox for quantity of product user wants to sell/buy:
    Create a Custom Thread Fields with this settings:
    • Title: Quantity
    • Key: trdfquantity
    • Applicable Forums: 'select our trading forum'
    • Maximum Text Length: 3
      Max quantity: 999
    • Field Input Width: 3
    • Editable by / Required Field?: Everyone (required)
    • Display Order: 6
    • Default Value: 1
    • Text Mask Filter:

      Code:
      ^([1-9]|[1-9][0-9]|[1-9][0-9][0-9])$

    • Hide Input Field: Yes
      Variable in template for displaying this field is: {$GLOBALS['threadfields']['trdfquantity']}.
  7. Listbox for choosing whether the min/max price is for total or for each, related to the product quantity:
    Create a Custom Thread Fields with this settings:
    • Title: Each Or Total
    • Key: trdfet
    • Applicable Forums: 'select our trading forum'
    • Input Field Type: Listbox
    • Field Input Width: 10
    • Field Input Height: 1
    • Values List:

      Code:
      Total
      Each

    • Editable by / Required Field?: Everyone (required)
    • Display Order: 7
    • Hide Input Field: Yes
  8. Listbox for product category:
    Create a Custom Thread Fields with this settings:
    • Title: Category
    • Key: trdfcat
    • Applicable Forums: 'select our trading forum'
    • Input Field Type: Listbox
    • Field Input Width: 15
      Modify it as our needs. Depends on the long of the line in value list.
    • Field Input Height: 1
    • Values List:

      Code:
      Hardware
      Software
      Other

      Modify it as our needs.

    • Editable by / Required Field?: Everyone (required)
    • Display Order: 8
    • Allow Filtering: Yes
    • Hide Input Field: Yes
  9. File Input for Product Image:
    Create a Custom Thread Fields with this settings:
    • Title: Product Image
    • Key: trdfimg
    • Applicable Forums: 'select our trading forum'
    • Input Field Type: File
    • Valid File Extensions: gif|png|jpg|jpeg
      Modify it as our needs. It is the extensions of image that can be uploaded.
    • Maximum File Size: 102400
      Modify it as our needs. It is a maximum file size (in bytes) that can be uploaded.
    • Editable by / Required Field?: Everyone
    • Display Order: 9
    • Only accept uploaded images: Yes
    • Minimum Image Dimensions: 160x120
      Modify it as our needs. It is the minimum images dimension that user can upload.
    • Maximum Image Dimensions: 1024x768
      Modify it as our needs. It is the maximum images dimension that user can upload.
    • Image Thumbnail Generation: 80x60|120x90|160x120|320x240
      Modify it as our needs. Depends on what thumbnails dimension we want to display for the image.
    • Blank Replacement Value:

      HTML Code
      <img src="images/no_image.gif" alt="" title="" />

      Because this field is not required, so we need to use a "default" image. Modify it as our needs, depends on which image we want to use.

    • Display Format:

      HTML Code
      <img src="{URL}/thumb160x120" alt="" title="" />

    • Hide Input Field: Yes
      Please remember that we put the description manually in newthread and edit_post_first template. So, if we change the settings, maybe we need to change the template too.
  10. Checkboxes for Payment Method:
    Create a Custom Thread Fields with this settings:
    • Title: Payment Method
    • Key: trdfpayment
    • Applicable Forums: 'select our trading forum'
    • Input Field Type: Checkboxes
    • Values List:

      Code:
      PayPal
      AlertPay
      Wire Transfer

      Modify it as our needs.

    • Editable by / Required Field?: Everyone (required)
    • Display Order: 10
    • Allow Filtering: Yes
    • Multiple Value Delimiter:

      Code:
      ,&nbsp;

    • Hide Input Field: Yes
      Maybe it is better if we use images....



Now, we need to create new templates in Global Template.
Admin CP -> Templates & Style -> Templates -> Global Templates:
  1. Template Name: trdf_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
    <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}
    {$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>Edit Trade</strong></td></tr>
    		<tr><td class="tcat" colspan="2"><strong>Required Information</strong></td></tr>
    		<tr>
    			<td class="trow_sep" colspan="2">
    				<div class="float_left">Need To:</div>
    				<div class="float_left" style="margin-left: 9px;">{$tfinput['trdftnt']}</div>
    				<div class="float_left" style="margin-left: 19px;">Category:</div>
    				<div class="float_left" style="margin-left: 9px;">{$tfinput['trdfcat']}</div>
    				<div class="float_left" style="margin-left: 19px;">Product Name:</div>
    				<div class="float_left" style="margin-left: 9px;"><input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" /></div>
    			</td>
    		</tr>
    		<tr>
    			<td class="trow1 smalltext" colspan="2">
    				Please set whether you want to buy or sell a product. Choose a category of the product, and type the name of the product.
    			</td>
    		</tr>
    		<tr>
    			<td class="trow_sep" colspan="2">
    				<div class="float_left">Quantity:</div>
    				<div class="float_left" style="margin-left: 9px;">{$tfinput['trdfquantity']}</div>
    				<div class="float_left" style="margin-left: 19px;">Price:</div>
    				<div class="float_left" style="margin-left: 9px;">{$tfinput['trdfminmax']} USD {$tfinput['trdfprice']} for  {$tfinput['trdfet']}</div>
    				<div class="float_left" style="margin-left: 19px;">Condition:</div>
    				<div class="float_left" style="margin-left: 9px;">{$tfinput['trdfcond']}</div>
    				<div class="float_left" style="margin-left: 19px;">Status:</div>
    				<div class="float_left" style="margin-left: 9px;">{$tfinput['trdfstatus']}</div>
    			</td>
    		</tr>
    		<tr>
    			<td class="trow1 smalltext" colspan="2">
    				You need to set the quantity of the product you want to buy/sell. You can set the minimum or maximum price for it. You need to set whether the price is for each product or it is a total price related to the quantity. Price format: x or x.xx You need to set whether the product you want to buy/sell is a new product or a used product. You can set whether the trading still available or not by set the status setting.
    			</td>
    		</tr>
    		<tr><td class="tcat" colspan="2"><strong>Additional Information</strong></td></tr>
    		<tr>
    			<td class="trow2" width="1">
    				<textarea name="message" id="message" rows="7" cols="60" tabindex="3">{$message}</textarea>
    			</td>
    			<td class="trow2 smalltext" valign="top">
    				If you have additional info about this trading, you can type it in the text area on the left.
    				<br class="clear" /><br />
    				If you have an image related to the product, you can upload it via the image uploader bellow. File format: jpeg or jpg or gif or png. Maximum file size: 100 kb. Maximum dimension: 1024 x 768 pixel. Minimum dimension: 320 x 240 pixel.
    				<br class="clear" />
    				<div align="center">{$tfinput['trdfimg']}</div>
    			</td>
    		</tr>
    		{$extra_threadfields}
    		<tr><td class="tcat" colspan="2"><strong>Miscellaneous</strong></td></tr>
    		<tr><td class="trow_sep" colspan="2"><strong>Payment Method</strong></td></tr>
    		<tr>
    			<td class="trow2 smalltext" valign="top" colspan="2">
    				You need to set what payment method you want to use for this trade. You can choose more than one payment method.
    				<br class="clear" />
    				<div>{$tfinput['trdfpayment']}</div>
    			</td>
    		</tr>
    		{$subscriptionmethod}
    	</table>
    	{$attachbox}
    	<br />
    	<div align="center"><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" /></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>

    Well, we can see that the title and description for our custom thread fields typed manually in this template. Modify it as our needs.

  2. Template Name: trdf_forumdisplay

    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
    <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>
    <style type="text/css">
    .filtertf_active {
    	background: #FFF6BF;
    }
    </style>
    </head>
    <body>
    {$header}
    {$moderatedby}
    {$usersbrowsing}
    {$subforums}
    {$threadslist}
    {$footer}
    </body>
    </html>

    Just removing the rules from this template.

  3. Template Name: trdf_forumdisplay_group_sep

    HTML Code
    </tr><tr>

  4. Template Name: trdf_forumdisplay_nothreads

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    <td>
    	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    		<tr>
    			<td class="tcat">
    				<strong>No Trade</strong>
    			</td>
    		</tr>
    		<tr>
    			<td align="center" class="trow1">
    				{$lang->nothreads}
    			</td>
    		</tr>
    	</table>
    </td>

  5. Template Name: trdf_forumdisplay_rules

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$filters_set['__all']['hiddencss']}">
    <tr>
    <td class="thead"><strong>{$foruminfo['rulestitle']}</strong></td>
    </tr>
    <tr>
    <td class="trow1">{$foruminfo['rules']}</td>
    </tr>
    </table>

  6. Template Name: trdf_forumdisplay_searchforum_inline

    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
    <table border="0" cellspacing="{$GLOBALS['theme']['borderwidth']}" cellpadding="{$GLOBALS['theme']['tablespace']}" class="tborder" style="clear: both;">
    	<tr><td class="thead"><strong>Filter &amp; Search Trade</strong></td></tr>
    	<tr>
    		<td class="trow1" align="center">
    			<form action="forumdisplay.php" method="get">
    				<select name="filtertf_trdfcat">
    					<option value="">All</option>
    					<option value="Hardware"{$GLOBALS['filters_set']['trdfcat']['selected']['Hardware']}>Hardware</option>
    					<option value="Software"{$GLOBALS['filters_set']['trdfcat']['selected']['Software']}>Software</option>
    					<option value="Other"{$GLOBALS['filters_set']['trdfcat']['selected']['Other']}>Other</option>
    				</select>
    				<select name="filtertf_trdftnt">
    					<option value="">All</option>
    					<option value="Buy"{$GLOBALS['filters_set']['trdftnt']['selected']['Buy']}>Buy</option>
    					<option value="Sell"{$GLOBALS['filters_set']['trdftnt']['selected']['Sell']}>Sale</option>
    				</select>
    				<select name="filtertf_trdfcond">
    					<option value="">All</option>
    					<option value="New"{$GLOBALS['filters_set']['trdfcond']['selected']['New']}>New</option>
    					<option value="Used"{$GLOBALS['filters_set']['trdfcond']['selected']['Used']}>Used</option>
    				</select>
    				<select name="filtertf_trdfpayment">
    					<option value="">All</option>
    					<option value="PayPal"{$GLOBALS['filters_set']['trdfpayment']['selected']['PayPal']}>PayPal</option>
    					<option value="AlertPay"{$GLOBALS['filters_set']['trdfpayment']['selected']['AlertPay']}>AlertPay</option>
    					<option value="Wire Transfer"{$GLOBALS['filters_set']['trdfpayment']['selected']['Wire Transfer']}>Wire Transfer</option>
    				</select>
    				<select name="filtertf_trdfstatus">
    					<option value="">All</option>
    					<option value="Open"{$GLOBALS['filters_set']['trdfstatus']['selected']['Open']}>Open</option>
    					<option value="Closed"{$GLOBALS['filters_set']['trdfstatus']['selected']['Closed']}>Closed</option>
    				</select>
    				<input type="text" class="textbox" name="search" size="35" value="{$searchval}" /> {$gobutton}
    				<input type="hidden" name="fid" value="{$fid}" />
    				<input type="hidden" name="sortby" value="{$sortby}" />
    				<input type="hidden" name="order" value="{$sortordernow}" />
    				<input type="hidden" name="datecut" value="{$datecut}" />
    			</form>
    		</td>
    	</tr>
    </table>
    <br />

    I'm not quite sure....

  7. Template Name: trdf_forumdisplay_sticky_sep

    HTML Code
    <td colspan="{$colspan}" style="display: none;"></td>
    </tr>
    <tr>

    We need that td to bypass the validator Biggrin

  8. Template Name: trdf_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
    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
    <td width="50%" valign="top">
    	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    		<tr>
    			<td class="thead" colspan="{$colspan}" align="center">
    				<strong><a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a></strong>
    			</td>
    		</tr>
    		<tr>
    			<td class="tcat smalltext" align="center">
    				<strong>{$thread['profilelink']}, {$thread['threaddate']} at {$thread['threadtime']}</strong>
    			</td>
    			{$modbit}
    		</tr>
    		<tr>
    			<td class="trow1" align="center" valign="middle" colspan="{$colspan}">
    				<table width="100%" border="0" style="height: 189px;">
    					<tr>
    						<td width="1" align="center" valign="middle">
    							<a href="{$thread['threadlink']}">{$GLOBALS['threadfields']['trdfimg']['value']}</a>
    							{$rating}
    						</td>
    						<td valign="top" align="center">
    							<div align="center"><strong>Quantity:</strong></div>
    							<div align="center" style="color: green; font-size: 16px;">
    								<strong>{$GLOBALS['threadfields']['trdfquantity']}</strong>
    							</div>
    							<br />
    							<div align="center">
    								<strong>{$GLOBALS['threadfields']['trdfminmax']}<br />$ {$GLOBALS['threadfields']['trdfprice']} For {$GLOBALS['threadfields']['trdfet']}!</strong>
    							</div>
    							<br />
    							<img src="{$theme['imgdir']}/{$GLOBALS['threadfields']['trdftnt']}.png" alt="Need To {$GLOBALS['threadfields']['trdftnt']}" title="Need To {$GLOBALS['threadfields']['trdftnt']}" />
    							<img src="{$theme['imgdir']}/{$GLOBALS['threadfields']['trdfstatus']}.png" alt="{$GLOBALS['threadfields']['trdfstatus']}" title="{$GLOBALS['threadfields']['trdfstatus']}" />
    							<img src="{$theme['imgdir']}/{$GLOBALS['threadfields']['trdfcond']}.png" alt="{$GLOBALS['threadfields']['trdfcond']}" title="{$GLOBALS['threadfields']['trdfcond']}" />
    							<br />
    						</td>
    					</tr>
    				</table>
    			</td>
    		</tr>
    		<tr>
    			<td class="tcat" colspan="{$colspan}" align="center">
    				<strong>Payment: {$GLOBALS['threadfields']['trdfpayment']}</strong>
    			</td>
    		</tr>
    		<tr>
    			<td class="tfoot" align="center" colspan="{$colspan}">
    				<strong>{$thread['views']} Views,
    				<a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts} Responds</strong>
    			</td>
    		</tr>
    	</table>
    </td>

    Well, we are using image for the Buy/Sell, Status and Condition (line #32 - #34). Modify it as our needs.

  9. Template Name: trdf_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
    <table border="0" width="100%" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}">
    	<tr>
    		<td width="200" valign="top">
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    				<tr>
    					<td class="thead" colspan="2">
    						<div align="center"><strong><a href="{$forumurl}">{$foruminfo['name']}</a></strong></div>
    					</td>
    				</tr>
    				<tr><td class="tcat"><strong>Product Category</strong></td>{$inlinemodcol}</tr>
    				<tr>
    					<td class="trow1 {$filters_set['trdfcat']['active']['Hardware']}" colspan="2">
    						<a href="{$forumurl_q}filtertf_trdfcat=Hardware"><span><strong>Hardware</strong></span></a>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1 {$filters_set['trdfcat']['active']['Software']}" colspan="2">
    						<a href="{$forumurl_q}filtertf_trdfcat=Software"><span><strong>Software</strong></span></a>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1 {$filters_set['trdfcat']['active']['Other']}" colspan="2">
    						<a href="{$forumurl_q}filtertf_trdfcat=Other"><span><strong>Other</strong></span></a>
    					</td>
    				</tr>
    				<tr><td class="tcat" colspan="2"><strong>Need To</strong></td></tr>
    				<tr>
    					<td class="trow1 {$filters_set['trdftnt']['active']['Buy']}" colspan="2">
    						<a href="{$forumurl_q}filtertf_trdftnt=Buy"><span><strong>Buy</strong></span></a>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1 {$filters_set['trdftnt']['active']['Sell']}" colspan="2">
    						<a href="{$forumurl_q}filtertf_trdftnt=Sell"><span><strong>Sell</strong></span></a>
    					</td>
    				</tr>
    				<tr><td class="tcat" colspan="2"><strong>Condition</strong></td></tr>
    				<tr>
    					<td class="trow1 {$filters_set['trdfcond']['active']['New']}" colspan="2">
    						<a href="{$forumurl_q}filtertf_trdfcond=New"><span><strong>New</strong></span></a>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1 {$filters_set['trdfcond']['active']['Used']}" colspan="2">
    						<a href="{$forumurl_q}filtertf_trdfcond=Used"><span><strong>Used</strong></span></a>
    					</td>
    				</tr>
    				<tr><td class="tcat" colspan="2"><strong>Payment Method</strong></td></tr>
    				<tr>
    					<td class="trow1 {$filters_set['trdfpayment']['active']['PayPal']}" colspan="2">
    						<a href="{$forumurl_q}filtertf_trdfpayment=PayPal"><span><strong>PayPal</strong></span></a>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1 {$filters_set['trdfpayment']['active']['AlertPay']}" colspan="2">
    						<a href="{$forumurl_q}filtertf_trdfpayment=AlertPay"><span><strong>AlertPay</strong></span></a>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1 {$filters_set['trdfpayment']['active']['Wire Transfer']}" colspan="2">
    						<a href="{$forumurl_q}filtertf_trdfpayment=Wire Transfer"><span><strong>Wire Transfer</strong></span></a>
    					</td>
    				</tr>
    				<tr><td class="tcat" colspan="2"><strong>Status</strong></td></tr>
    				<tr>
    					<td class="trow1 {$filters_set['trdfstatus']['active']['Open']}" colspan="2">
    						<a href="{$forumurl_q}filtertf_trdfstatus=Open"><span><strong>Open</strong></span></a>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1 {$filters_set['trdfstatus']['active']['Closed']}" colspan="2">
    						<a href="{$forumurl_q}filtertf_trdfstatus=Closed"><span><strong>Closed</strong></span></a>
    					</td>
    				</tr>
    			</table>
    			<br />
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$filters_set['__all']['visiblecss']}">
    				<tr><td class="thead"><strong>Trade Sorter</strong></td></tr>
    				<tr><td class="tcat"><strong>Sort By</strong></td></tr>
    				<tr>
    					<td class="trow1">
    						<strong><a href="{$sorturl}&amp;sortby=subject&amp;order=asc">{$lang->thread}</a> {$orderarrow['subject']}</strong>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1">
    						<strong><a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1">
    						<strong><a href="{$sorturl}&amp;sortby=replies&amp;order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1">
    						<strong><a href="{$sorturl}&amp;sortby=views&amp;order=desc">{$lang->views}</a> {$orderarrow['views']}</strong>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1">
    						<strong><a href="{$sorturl}&amp;sortby=lastpost&amp;order=desc">{$lang->lastpost}</a> {$orderarrow['lastpost']}</strong>
    					</td>
    				</tr>
    				{$ratingcol}
    			</table>
    			<br />
    			<div>
    				{$newthread}
    			</div>
    		</td>
    		<td valign="top">
    			{$searchforum}
    			{$rules}
    			<table border="0" width="100%" style="{$filters_set['__all']['visiblecss']}">
    				<tr>
    					{$threads}{$nullthreads}
    				</tr>
    			</table>
    			<div class="float_left">
    				{$multipage}
    			</div>
    		</td>
    	</tr>
    </table>
    <br style="clear: both;" />
    <br />
    <div class="float_right" style="text-align: right;">
    	{$inlinemod}
    </div>
    <br style="clear: both" />
    <div class="smalltext" align="center">
    	{$foruminfo['name']}<br />Powered By <a href="http://mybbhacks.zingaburga.com">XThreads</a> - <a href="http://mybbhacks.zingaburga.com">MyBB Hacks</a>
    </div>
    {$inline_edit_js}

    All filtering URL laid here. If we changed the value list, maybe we need to change this template too. And we put the forum rule variable in this template.

  10. Template Name: trdf_forumdisplay_threadlist_rating

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    <tr>
    	<td class="trow1">
    		<strong><a href="{$sorturl}&amp;sortby=rating&amp;order=desc">{$lang->rating}</a> {$orderarrow['rating']}</strong>
    		<script type="text/javascript" src="jscripts/rating.js?ver=1400"></script>
    		<script type="text/javascript">
    		<!--
    			lang.stars = new Array();
    			lang.stars[1] = "{$lang->one_star}";
    			lang.stars[2] = "{$lang->two_stars}";
    			lang.stars[3] = "{$lang->three_stars}";
    			lang.stars[4] = "{$lang->four_stars}";
    			lang.stars[5] = "{$lang->five_stars}";
    		// -->
    		</script>
    	</td>
    </tr>

  11. Template Name: trdf_forumdisplay_threads_sep

    HTML Code
    <td colspan="{$colspan}" style="display: none;"></td>
    </tr>
    <tr>

    We need the td to bypass the validator if there is a global announcement and there is no sticky thread in this forum Biggrin

  12. Template Name: trdf_forumdisplay_thread_modbit

    HTML Code
    <td width="1" class="tcat" align="center" style="white-space: nowrap"><input type="checkbox" class="checkbox" name="inlinemod_{$multitid}" id="inlinemod_{$multitid}" value="1" {$inlinecheck}  /></td>

  13. Template Name: trdf_forumdisplay_thread_null

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    <td width="50%" valign="top">
    	<table border="0" cellspacing="{$GLOBALS['theme']['borderwidth']}" cellpadding="{$GLOBALS['theme']['tablespace']}" class="tborder">
    		<tr>
    			<td class="thead" align="center">
    				<strong>{$GLOBALS['mybb']->settings['bbname']} Trading Forum</strong>
    			</td>
    		</tr>
    		<tr>
    			<td class="tcat smalltext" align="center">
    				<strong>Buy Or Sell A Product In Our Trading Forum</strong>
    			</td>
    		</tr>
    		<tr>
    			<td class="trow1" align="center">
    				<strong>Curently, we have {$GLOBALS['threadcount']} Transactions!</strong>
    			</td>
    		</tr>
    	</table>
    </td>

  14. Template Name: trdf_forumdisplay_thread_rating

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    <div align="center" class="{$bgcolor}" id="rating_table_{$thread['tid']}">
    	<table>
    		<tr>
    			<td>
    				<ul class="star_rating{$not_rated}" id="rating_thread_{$thread['tid']}">
    					<li style="width: {$thread['width']}%" class="current_rating" id="current_rating_{$thread['tid']}">{$ratingvotesav}</li>
    				</ul>
    				<script type="text/javascript">
    				<!--
    					Rating.build_forumdisplay({$thread['tid']}, { width: '{$thread['width']}', extra_class: '{$not_rated}', current_average: '{$ratingvotesav}' });
    				// -->
    				</script>
    			</td>
    		</tr>
    	</table>
    </div>

  15. Template Name: trdf_newreply_modoptions

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    <tr>
    <td class="trow2" valign="top" colspan="2"><div><strong>{$lang->mod_options}</strong></div>
    <label><input type="checkbox" class="checkbox" name="modoptions[closethread]" value="1"{$closecheck} />&nbsp;{$lang->close_thread}</label><br />
    <label><input type="checkbox" class="checkbox" name="modoptions[stickthread]" value="1"{$stickycheck} />&nbsp;{$lang->stick_thread}</label>
    </span>
    </td>
    </tr>

  16. Template Name: trdf_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
    <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>New Trade</strong></td></tr>
    		<tr><td class="tcat" colspan="2"><strong>Required Information</strong></td></tr>
    		<tr>
    			<td class="trow_sep" colspan="2">
    				<div class="float_left">Need To:</div>
    				<div class="float_left" style="margin-left: 9px;">{$tfinput['trdftnt']}</div>
    				<div class="float_left" style="margin-left: 19px;">Category:</div>
    				<div class="float_left" style="margin-left: 9px;">{$tfinput['trdfcat']}</div>
    				<div class="float_left" style="margin-left: 19px;">Product Name:</div>
    				<div class="float_left" style="margin-left: 9px;"><input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" /></div>
    			</td>
    		</tr>
    		<tr>
    			<td class="trow1 smalltext" colspan="2">
    				Please set whether you want to buy or sell a product. Choose a category of the product, and type the name of the product.
    			</td>
    		</tr>
    		<tr>
    			<td class="trow_sep" colspan="2">
    				<div class="float_left">Quantity:</div>
    				<div class="float_left" style="margin-left: 9px;">{$tfinput['trdfquantity']}</div>
    				<div class="float_left" style="margin-left: 19px;">Price:</div>
    				<div class="float_left" style="margin-left: 9px;">{$tfinput['trdfminmax']} USD {$tfinput['trdfprice']} for  {$tfinput['trdfet']}</div>
    				<div class="float_left" style="margin-left: 19px;">Condition:</div>
    				<div class="float_left" style="margin-left: 9px;">{$tfinput['trdfcond']}</div>
    				<div class="float_left" style="margin-left: 19px;">Status:</div>
    				<div class="float_left" style="margin-left: 9px;">{$tfinput['trdfstatus']}</div>
    			</td>
    		</tr>
    		<tr>
    			<td class="trow1 smalltext" colspan="2">
    				You need to set the quantity of the product you want to buy/sell. You can set the minimum or maximum price for it. You need to set whether the price is for each product or it is a total price related to the quantity. Price format: x or x.xx You need to set whether the product you want to buy/sell is a new product or a used product. You can set whether the trading still available or not by set the status setting.
    			</td>
    		</tr>
    		<tr><td class="tcat" colspan="2"><strong>Additional Information</strong></td></tr>
    		<tr>
    			<td class="trow2" width="1">
    				<textarea name="message" id="message" rows="7" cols="60" tabindex="2">{$message}</textarea>
    			</td>
    			<td class="trow2 smalltext" valign="top">
    				If you have additional info about this trading, you can type it in the text area on the left.
    				<br class="clear" /><br />
    				If you have an image related to the product, you can upload it via the image uploader bellow. File format: jpeg or jpg or gif or png. Maximum file size: 100 kb. Maximum dimension: 1024 x 768 pixel. Minimum dimension: 320 x 240 pixel.
    				<br class="clear" />
    				<div align="center">{$tfinput['trdfimg']}</div>
    			</td>
    		</tr>
    		{$extra_threadfields}
    		<tr><td class="tcat" colspan="2"><strong>Miscellaneous</strong></td></tr>
    		<tr><td class="trow_sep" colspan="2"><strong>Payment Method</strong></td></tr>
    		<tr>
    			<td class="trow2 smalltext" valign="top" colspan="2">
    				You need to set what payment method you want to use for this trade. You can choose more than one payment method.
    				<br class="clear" />
    				<div>{$tfinput['trdfpayment']}</div>
    			</td>
    		</tr>
    		{$subscriptionmethod}
    		{$modoptions}
    		{$captcha}
    	</table>
    	<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>

    Again, we put the title and description for fields manually in this template. If we change the fields, maybe we need to edit this template too.

  17. Template Name: trdf_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
    65
    66
    67
    68
    {$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']}">
    	<tr>
    		<td class="tcat">
    			{$post['posturl']}<strong><span><a href="{$post['profilelink_plain']}" id="profile_{$post['pid']}">{$post['username_formatted']}</a></span></strong> {$post['onlinestatus']} - <span class="smalltext">{$post['postdate']} {$post['posttime']}</span>
    			<div id="profile_{$post['pid']}_popup" class="popup_menu" style="display: none;">
    				<div class="popup_item_container">
    					<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    						<tr>
    							<td class="trow1" valign="top" align="center">
    								<div><strong>{$post['profilelink']}</strong></div>
    								<div class="smalltext">{$post['useravatar']}</div>
    								<div class="smalltext">{$post['usertitle']}</div>
    								<div class="smalltext">{$post['userstars']}</div>
    								<div class="smalltext">{$post['groupimage']}</div>
    								<div class="smalltext">{$post['user_details']}</div>
    							</td>
    						</tr>
    						<tr>
    							<td class="tcat" align="center">
    								{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}
    							</td>
    						</tr>
    					</table>
    				</div>
    			</div>
    		</td>
    	</tr>
    	<tr>
    		<td class="{$altbg}" valign="top">
    			<table width="100%">
    				<tr>
    					<td>
    						<div class="smalltext" style="float: left; margin-right: 9px;" id="post_meta_{$post['pid']}">
    							<strong>{$post['iplogged']}</strong>
    						</div>
    						<div class=" float_left smalltext" style="margin-right: 9px;">
    							<strong>{$post['icon']}{$post['subject']} {$post['subject_extra']}</strong>
    						</div>
    						<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
    						<br />
    						<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
    							{$post['message']}
    						</div>
    						{$post['attachments']}
    					</td>
    				</tr>
    			</table>
    			<div class="float_right smalltext">
    				{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}
    			</div>
    			<noscript>
    				<div class="float_left smalltext">
    					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}
    				</div>
    			</noscript>
    		</td>
    	</tr>
    </table>
    <script type="text/javascript">
    // <!--
    	if(use_xmlhttprequest == "1")
    	{
    		new PopupMenu("profile_{$post['pid']}");
    	}
    // -->
    </script>

  18. Template Name: trdf_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
    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
    {$ignore_bit}
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tr>
    		<td width="300" valign="top" style="text-align: center;">
    			<table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" class="tborder">
    				<tr>
    					<td class="tcat" align="center">
    						<span class="smalltext">{$post['postdate']} {$post['posttime']}</span>
    					</td>
    				</tr>
    				<tr>
    					<td class="{$altbg}" width="250" valign="top" style="text-align: center;">
    						<a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    						<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    						{$post['useravatar']}<br />
    						<span class="smalltext">
    							{$post['usertitle']}<br />
    							{$post['userstars']}
    							{$post['groupimage']}<br />
    							{$post['user_details']}
    						</span>
    					</td>
    				</tr>
    				<tr>
    					<td class="tcat" align="center">
    						<span class="smalltext">
    							{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}
    						</span>
    					</td>
    				</tr>
    			</table>
    		</td>
    		<td valign="top">
    			<table border="0" cellspacing="0" cellpadding="{$theme['tablespace']}" class="tborder">
    				<tr>
    					<td class="tcat" colspan="3">
    						{$post['posturl']}
    						<span class="smalltext">
    							<strong>{$post['icon']}{$GLOBALS['threadfields']['trdftnt']}: {$post['subject_extra']}</strong>
    						</span>
    					</td>
    				</tr>
    				<tr>
    					<td class="{$altbg}" width="160" valign="bottom" align="center">
    						<a href="{$GLOBALS['threadfields']['trdfimg']['url']}">{$GLOBALS['threadfields']['trdfimg']['value']}</a>
    					</td>
    					<td class="{$altbg}" valign="top">
    						<table width="100%" border="0">
    							<tr>
    								<td colspan="3" align="center">
    									<div class="float_right" id="post_meta_{$post['pid']}">
    										<strong>{$post['iplogged']}</strong>
    									</div>
    									<div class="largetext"><strong>{$post['subject']}</strong></div>
    								</td>
    							</tr>
    							<tr>
    								<td>Quantity</td>
    								<td>:</td>
    								<td>{$GLOBALS['threadfields']['trdfquantity']}</td>
    							</tr>
    							<tr>
    								<td>Condition</td>
    								<td>:</td>
    								<td>{$GLOBALS['threadfields']['trdfcond']}</td>
    							</tr>
    							<tr>
    								<td width="99">Price</td>
    
    
    								<td width="1">:</td>
    								<td>{$GLOBALS['threadfields']['trdfminmax']} USD {$GLOBALS['threadfields']['trdfprice']} For {$GLOBALS['threadfields']['trdfet']}</td>
    							</tr>
    							<tr>
    								<td width="99">Payment</td>
    								<td width="1">:</td>
    								<td>{$GLOBALS['threadfields']['trdfpayment']}</td>
    							</tr>
    							<tr>
    								<td width="99">Status</td>
    								<td width="1">:</td>
    								<td>{$GLOBALS['threadfields']['trdfstatus']}</td>
    							</tr>
    							<tr>
    								<td width="99">Category</td>
    								<td width="1">:</td>
    								<td>{$GLOBALS['threadfields']['trdfcat']}</td>
    							</tr>
    						</table>
    					</td>
    				</tr>
    				<tr>
    					<td class="{$altbg}" valign="top" colspan="3">
    						<table width="100%">
    							<tr>
    								<td>
    									<div id="pid_{$post['pid']}" style="padding: 5px 0 5px 0;">
    										{$GLOBALS['threadfields']['trdfaddinfo']}{$post['message']}
    									</div>
    									{$post['attachments']}
    									{$post['signature']}
    									<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
    								</td>
    							</tr>
    						</table>
    					</td>
    				</tr>
    				<tr valign="bottom">
    					<td align="right" class="tcat" colspan="3">
    						{$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>

  19. Template Name: trdf_postbit_iplogged_hiden

    HTML Code
    <a href="moderation.php?action=getip&amp;pid={$post['pid']}">IP</a>

  20. Template Name: trdf_post_subscription_method

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    <tr><td class="trow_sep" colspan="2">Trade Subscription</td></tr>
    <tr>
    <td class="trow1 smalltext" colspan="2">
    	Your customer will respond to your trade by replying this thread directly. This feature will make you easier to notice if there is a new respond to your trade.<br /><br />
    	<label><input type="radio" name="postoptions[subscriptionmethod]" {$postoptions_subscriptionmethod_dont} value="" style="vertical-align: middle;" /> {$lang->no_subscribe}. You will not receive any notification if there is a respond to this trade.</label><br />
    	<label><input type="radio" name="postoptions[subscriptionmethod]" {$postoptions_subscriptionmethod_none} value="none" style="vertical-align: middle;" /> {$lang->no_email_subscribe}. You can check if there is a new respond to this trade by clicking the View New Subscribed Posts link in the header. You can manage your subscription trade in your User CP.</label><br />
    	<label><input type="radio" name="postoptions[subscriptionmethod]" {$postoptions_subscriptionmethod_instant} value="instant" style="vertical-align: middle;" /> {$lang->instant_email_subscribe}. If you choose this option, you will receive email notification if there is a new respond to this trade. You can check if there is a new respond to this trade by clicking the View New Subscribed Posts link in the header too. You can manage your subscription trade in your User CP.</label><br />
    </td>
    </tr>

    We add additional description here. I'm using View New Subscribed Posts plugin from Yumi. So, maybe some description has a relationship with that plugin (link in header). Modify it as our needs.

  21. Template Name: trdf_showthread

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    <html>
    <head>
    <title>{$thread['subject']}</title>
    {$headerinclude}
    <script type="text/javascript">
    <!--
    	var quickdelete_confirm = "{$lang->quickdelete_confirm}";
    // -->
    </script>
    <script type="text/javascript" src="jscripts/thread.js?ver=1400"></script>
    </head>
    <body>
    {$header}
    {$pollbox}
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" style="clear: both; width: 100%;">
    	<tr>
    		<td align="center">
    			<div class="largetext">
    				<strong>{$thread['subject']}</strong>
    			</div>
    			{$ratethread}
    		</td>
    	</tr>
    </table>
    <br class="clear" />
    <div id="posts">
    	{$first_post}
    	<br />
    	<div align="center">
    		<strong>&laquo; <a href="{$next_oldest_link}">{$lang->next_oldest}</a> | <a href="{$next_newest_link}">{$lang->next_newest}</a> &raquo;</strong>
    	</div>
    	<br />
    	{$search_thread}
    	<strong>Responds</strong>
    	<br class="clear" />
    	{$posts}
    </div>
    <br class="clear" />
    <div class="float_left">
    	{$multipage}
    </div>
    <div style="padding-top: 4px;" class="float_right">
    	{$newreply}
    </div>
    <br style="clear: both;" />
    {$quickreply}
    {$threadexbox}
    {$similarthreads}
    <br />
    <div class="smalltext" align="center">
    	Trading Forum<br />Powered By <a href="http://mybbhacks.zingaburga.com">XThreads</a> - <a href="http://mybbhacks.zingaburga.com">MyBB Hacks</a>
    </div>
    <br class="clear" />
    <div class="float_left">
    	<ul class="thread_tools">
    		<li class="printable"><a href="printthread.php?tid={$tid}">{$lang->view_printable}</a></li>
    		<li class="sendthread"><a href="sendthread.php?tid={$tid}">{$lang->send_thread}</a></li>
    		<li class="subscription_{$add_remove_subscription}"><a href="usercp2.php?action={$add_remove_subscription}subscription&amp;tid={$tid}&amp;my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a></li>
    	</ul>
    </div>
    <div class="float_right" style="text-align: right;">
    	{$moderationoptions}
    	{$forumjump}
    </div>
    <br style="clear: both;" />
    {$footer}
    </body>
    </html>

  22. Template Name: trdf_showthread_noreplies

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    <br class="clear" />
    <div id="xthreads_noreplies">
    	<table border="0" cellspacing="{$GLOBALS['theme']['borderwidth']}" cellpadding="{$GLOBALS['theme']['tablespace']}" class="tborder">
    		<tr>
    			<td class="tcat">
    				<em><strong>No responds yet</strong></em>
    			</td>
    		</tr>
    	</table>
    </div>

  23. Template Name: trdf_showthread_ratethread

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    <div align="center">
    	<table>
    		<tr>
    			<td>
    				<script type="text/javascript" src="jscripts/rating.js?ver=1400"></script>
    				<div id="success_rating_{$thread['tid']}"></div>
    				<div class="inline_rating">
    					<ul class="star_rating{$not_rated}" id="rating_thread_{$thread['tid']}">
    						<li style="width: {$thread['width']}%" class="current_rating" id="current_rating_{$thread['tid']}">{$ratingvotesav}</li>
    						<li><a class="one_star" title="{$lang->one_star}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=1&amp;my_post_key={$mybb->post_code}">1</a></li>
    						<li><a class="two_stars" title="{$lang->two_stars}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=2&amp;my_post_key={$mybb->post_code}">2</a></li>
    						<li><a class="three_stars" title="{$lang->three_stars}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=3&amp;my_post_key={$mybb->post_code}">3</a></li>
    						<li><a class="four_stars" title="{$lang->four_stars}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=4&amp;my_post_key={$mybb->post_code}">4</a></li>
    						<li><a class="five_stars" title="{$lang->five_stars}" href="./ratethread.php?tid={$thread['tid']}&amp;rating=5&amp;my_post_key={$mybb->post_code}">5</a></li>
    					</ul>
    				</div>
    			</td>
    		</tr>
    	</table>
    </div>

  24. Template Name: trdf_showthread_search

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    <div class="float_right">
    	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}">
    		<tr>
    			<td class="tcat">
    				<form action="search.php" method="post">
    					<input type="hidden" name="action" value="thread" />
    					<input type="hidden" name="tid" value="{$thread['tid']}" />
    					<input type="text" name="keywords" value="{$lang->enter_keywords}" onfocus="if(this.value == '{$lang->enter_keywords}') { this.value = ''; }" onblur="if(this.value=='') { this.value='{$lang->enter_keywords}'; }" class="textbox" size="25" />
    					<input type="submit" class="button" value="{$lang->search_thread}" />
    				</form>
    			</td>
    		</tr>
    	</table>
    </div>



All templates above based on MyBB 1.4.
Updated: 03 Sept 2010 29 May 2011

Screenshots:
1. New Thread:
   

2. Show Thread:
   

3. Thread List:
That is our forum rules Biggrin
   
Actual thread (has an active class):
       

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

(This post was last modified: 10-08-2012 01:50 AM by RateU.)
08-30-2010 01:54 AM
Find all posts by this user Quote this message in a reply
TriTop Offline
Member
***
Posts: 53
Joined: Apr 2008
Post: #2
RE: Trading Forum
WOW! Capabilities of Xthreads are incredible.
08-30-2010 04:21 AM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*******
Posts: 1,009
Joined: Apr 2010
Post: #3
RE: Trading Forum
RateU - yet another amazing example with X threads. Thank you. A question/idea - is it maybe an idea to have a clear all filter? I can't quite work out how to clear the filters.


[Image: leelink.gif]
MYBB1.6 & XThreads
08-30-2010 08:44 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,338
Joined: Jan 2008
Post: #4
RE: Trading Forum
I sometimes wonder how long it takes you to write these things - excellent work as usual Smile

My Blog
08-30-2010 09:09 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,325
Joined: Mar 2010
Post: #5
RE: Trading Forum
(08-30-2010 08:44 AM)leefish Wrote:  A question/idea - is it maybe an idea to have a clear all filter? I can't quite work out how to clear the filters.

Do you mean back to this kind of url? ....forumdisplay.php?fid=xxx without filter?
If so, I think we can click the navigation in our header? Or, in this example, we can click the Trading Forum just above the Product Category at the left side.

(08-30-2010 09:09 AM)ZiNgA BuRgA Wrote:  I sometimes wonder how long it takes you to write these things

I never count the exact time, Yumi. Depends on how long I can use the computer Biggrin

08-31-2010 05:33 AM
Find all posts by this user Quote this message in a reply
Firefox Wins Offline
Member
***
Posts: 164
Joined: Mar 2008
Post: #6
RE: Trading Forum
Great job RateU, thank you (again) for an amazing step-by-step tutorial.  Smile

(08-30-2010 01:54 AM)RateU Wrote:  All templates above based on MyBB 1.4...

Please explain: They are custom global templates, how would MyBB 1.4 (custom 'global templates') differ from 1.6?
Thank you
08-31-2010 06:53 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,338
Joined: Jan 2008
Post: #7
RE: Trading Forum
You might want to do a diff if you want to check.  It's based on 1.4 means that the edit used MyBB 1.4 templates as a base for editing.  1.6 may have modified templates.

My Blog
08-31-2010 07:53 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,325
Joined: Mar 2010
Post: #8
RE: Trading Forum
Updated:

Now, we are using an active class, to show what filter being active to the user. Required XThreads 1.31.

Changed:

trdf_forumdisplay template:

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
<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>
<style type="text/css">
.filtertf_active {
	background: #FFF6BF;
}
</style>
</head>
<body>
{$header}
{$moderatedby}
{$usersbrowsing}
{$subforums}
{$threadslist}
{$footer}
</body>
</html>

We put the class in our trdf_forumdisplay template. Modify it as our needs.

trdf_forumdisplay_threadlist template:

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
<table border="0" width="100%" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}">
	<tr>
		<td width="200" valign="top">
			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
				<tr>
					<td class="thead" colspan="2">
						<div align="center"><strong><a href="{$forumurl}">{$foruminfo['name']}</a></strong></div>
					</td>
				</tr>
				<tr><td class="tcat"><strong>Product Category</strong></td>{$inlinemodcol}</tr>
				<tr>
					<td class="trow1 {$filters_set['trdfcat']['active']['Hardware']}" colspan="2">
						<a href="{$forumurl_q}filtertf_trdfcat=Hardware"><span><strong>Hardware</strong></span></a>
					</td>
				</tr>
				<tr>
					<td class="trow1 {$filters_set['trdfcat']['active']['Software']}" colspan="2">
						<a href="{$forumurl_q}filtertf_trdfcat=Software"><span><strong>Software</strong></span></a>
					</td>
				</tr>
				<tr>
					<td class="trow1 {$filters_set['trdfcat']['active']['Other']}" colspan="2">
						<a href="{$forumurl_q}filtertf_trdfcat=Other"><span><strong>Other</strong></span></a>
					</td>
				</tr>
				<tr><td class="tcat" colspan="2"><strong>Need To</strong></td></tr>
				<tr>
					<td class="trow1 {$filters_set['trdftnt']['active']['Buy']}" colspan="2">
						<a href="{$forumurl_q}filtertf_trdftnt=Buy"><span><strong>Buy</strong></span></a>
					</td>
				</tr>
				<tr>
					<td class="trow1 {$filters_set['trdftnt']['active']['Sell']}" colspan="2">
						<a href="{$forumurl_q}filtertf_trdftnt=Sell"><span><strong>Sell</strong></span></a>
					</td>
				</tr>
				<tr><td class="tcat" colspan="2"><strong>Condition</strong></td></tr>
				<tr>
					<td class="trow1 {$filters_set['trdfcond']['active']['New']}" colspan="2">
						<a href="{$forumurl_q}filtertf_trdfcond=New"><span><strong>New</strong></span></a>
					</td>
				</tr>
				<tr>
					<td class="trow1 {$filters_set['trdfcond']['active']['Used']}" colspan="2">
						<a href="{$forumurl_q}filtertf_trdfcond=Used"><span><strong>Used</strong></span></a>
					</td>
				</tr>
				<tr><td class="tcat" colspan="2"><strong>Payment Method</strong></td></tr>
				<tr>
					<td class="trow1 {$filters_set['trdfpayment']['active']['PayPal']}" colspan="2">
						<a href="{$forumurl_q}filtertf_trdfpayment=PayPal"><span><strong>PayPal</strong></span></a>
					</td>
				</tr>
				<tr>
					<td class="trow1 {$filters_set['trdfpayment']['active']['AlertPay']}" colspan="2">
						<a href="{$forumurl_q}filtertf_trdfpayment=AlertPay"><span><strong>AlertPay</strong></span></a>
					</td>
				</tr>
				<tr>
					<td class="trow1 {$filters_set['trdfpayment']['active']['Wire Transfer']}" colspan="2">
						<a href="{$forumurl_q}filtertf_trdfpayment=Wire Transfer"><span><strong>Wire Transfer</strong></span></a>
					</td>
				</tr>
				<tr><td class="tcat" colspan="2"><strong>Status</strong></td></tr>
				<tr>
					<td class="trow1 {$filters_set['trdfstatus']['active']['Open']}" colspan="2">
						<a href="{$forumurl_q}filtertf_trdfstatus=Open"><span><strong>Open</strong></span></a>
					</td>
				</tr>
				<tr>
					<td class="trow1 {$filters_set['trdfstatus']['active']['Closed']}" colspan="2">
						<a href="{$forumurl_q}filtertf_trdfstatus=Closed"><span><strong>Closed</strong></span></a>
					</td>
				</tr>
			</table>
			<br />
			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$filters_set['__all']['visiblecss']}">
				<tr><td class="thead"><strong>Trade Sorter</strong></td></tr>
				<tr><td class="tcat"><strong>Sort By</strong></td></tr>
				<tr>
					<td class="trow1">
						<strong><a href="{$sorturl}&amp;sortby=subject&amp;order=asc">{$lang->thread}</a> {$orderarrow['subject']}</strong>
					</td>
				</tr>
				<tr>
					<td class="trow1">
						<strong><a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong>
					</td>
				</tr>
				<tr>
					<td class="trow1">
						<strong><a href="{$sorturl}&amp;sortby=replies&amp;order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong>
					</td>
				</tr>
				<tr>
					<td class="trow1">
						<strong><a href="{$sorturl}&amp;sortby=views&amp;order=desc">{$lang->views}</a> {$orderarrow['views']}</strong>
					</td>
				</tr>
				<tr>
					<td class="trow1">
						<strong><a href="{$sorturl}&amp;sortby=lastpost&amp;order=desc">{$lang->lastpost}</a> {$orderarrow['lastpost']}</strong>
					</td>
				</tr>
				{$ratingcol}
			</table>
			<br />
			<div>
				{$newthread}
			</div>
		</td>
		<td valign="top">
			{$searchforum}
			{$rules}
			<table border="0" width="100%" style="{$filters_set['__all']['visiblecss']}">
				<tr>
					{$threads}{$nullthreads}
				</tr>
			</table>
			<div class="float_left">
				{$multipage}
			</div>
		</td>
	</tr>
</table>
<br style="clear: both;" />
<br />
<div class="float_right" style="text-align: right;">
	{$inlinemod}
</div>
<br style="clear: both" />
<div class="smalltext" align="center">
	Trading Forum<br />Powered By <a href="http://mybbhacks.zingaburga.com">XThreads</a> - <a href="http://mybbhacks.zingaburga.com">MyBB Hacks</a>
</div>
{$inline_edit_js}


I've updated the first post, and including additional screenshots for this.


09-03-2010 05:19 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,325
Joined: Mar 2010
Post: #9
RE: Trading Forum
Update:

Using number format for price. Required XThreads 1.32:

Custom thread fields #3 (Textbox for price):
Display Format:

Code:
<?=number_format({VALUE},2)?>


10-05-2010 05:25 AM
Find all posts by this user Quote this message in a reply
Vapor Offline
Member
***
Posts: 115
Joined: Oct 2010
Post: #10
RE: Trading Forum
Holy crap...this is perfect ! Great mod !

My forum is here: http://ohioguns.net

Gun trader is here: http://ohioguns.net/forum-5.html

The search function does not work correctly...what did I fudge up?

D3G Gaming Team - http://d3g.in

[Image: vapor_sig.png]
(This post was last modified: 10-27-2010 05:49 AM by Vapor.)
10-27-2010 05:47 AM
Visit this user's website Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: