Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Computer Specs
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Computer Specs
Requirement: XThreads

This is just a very simple example for creating a Computer Specs section on our forum, based on the other XThreads example applications.
There are many fields that can be added to the Computer Specs. In this example applications, we use the basic specs only. So, modify it as our needs.

Create/edit a forum:
AdminCP -> Forums & Posts -> Forum Management:
  • Template Prefix: compspecs_
  • Language File Prefix: compspecs_
  • Show first post on every showthread page: Yes
  • Enable XThreads' Inline Forum Search: Yes
  • Allow Blank Post Message: Yes

Create a Custom Thread Fields:
AdminCP -> Configuration -> Custom Thread Fields
  1. Listbox for Type
    • Title: Type
    • Key: compspecs_type
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: Listbox
    • Field Input Width: 15
    • Field Input Height: 1
    • Values List:

      Code:
      1{|}Laptop
      2{|}Desktop

      Modify it as our needs

    • Editable by / Required Field?: Everyone (required)
    • Display Order: 1
    • Allow Filtering: Yes
    • Underlying Data Type: Integer (unsigned)
    • Formatting Map List:
      • Value: 1
        Displayed Output: Laptop
      • Value: 2
        Displayed Output: Desktop

      Code:
      1{|}Laptop
      2{|}Desktop

      Modify it as our needs. Related to the Values List setting of this field.

    • Hide Input Field: Yes
  2. Listbox for Processor
    • Title: Processor
    • Key: compspecs_proc
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: Listbox
    • Field Input Width: 10
    • Field Input Height: 1
    • Values List:

      Code:
      1{|}Intel
      2{|}AMD

      Modify it as our needs

    • Editable by / Required Field?: Everyone (required)
    • Display Order: 2
    • Allow Filtering: Yes
    • Underlying Data Type: Integer (unsigned)
    • Formatting Map List:
      • Value: 1
        Displayed Output: Intel
      • Value: 2
        Displayed Output: AMD

      Code:
      1{|}Intel
      2{|}AMD

      Modify it as our needs. Related to the Values List setting of this field.

    • Hide Input Field: Yes
  3. Textbox for Processor Series
    • Title: Processor Series
    • Key: compspecs_procseries
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: Textbox
    • Editable by / Required Field?: Everyone (required)
    • Display Order: 3
    • Hide Input Field: Yes
  4. Textbox for Processor Frequency
    • Title: Frequency
    • Key: compspecs_procfreq
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: Textbox
    • Maximum Text Length: 5
    • Field Input Width: 5
    • Editable by / Required Field?: Everyone (required)
    • Display Order: 4
    • Underlying Data Type: Float
    • Text Mask Filter: Number (real)
    • Hide Input Field: Yes
  5. Listbox for Chipsets
    • Title: Chipsets
    • Key: compspecs_chipsets
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: Listbox
    • Field Input Width: 10
    • Field Input Height: 1
    • Values List:

      Code:
      1{|}Intel
      2{|}AMD

      Modify it as our needs.

    • Editable by / Required Field?: Everyone (required)
    • Display Order: 5
    • Allow Filtering: Yes
    • Underlying Data Type: Integer (unsigned)
    • Formatting Map List:
      • Value: 1
        Displayed Output: Intel
      • Value: 2
        Displayed Output: AMD

      Code:
      1{|}Intel
      2{|}AMD

      Modify it as our needs. Related to the Values List setting of this field.

    • Hide Input Field: Yes
  6. Textbox for Chipsets Series
    • Title: Chipsets Series
    • Key: compspecs_chipsetsseries
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: Textbox
    • Editable by / Required Field?: Everyone (required)
    • Display Order: 6
    • Hide Input Field: Yes
  7. Textbox for Memory Size
    • Title: Memory Size
    • Key: compspecs_memsize
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: Textbox
    • Maximum Text Length: 3
    • Maximum Text Length: 3
    • Editable by / Required Field?: Everyone (required)
    • Display Order: 7
    • Underlying Data Type: Integer (unsigned)
    • Text Mask Filter: Digits
    • Hide Input Field: Yes
  8. Textbox for Memory Frequency
    • Title: Memory Frequency
    • Key: compspecs_memfreq
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: Textbox
    • Maximum Text Length: 10
    • Maximum Text Length: 10
    • Editable by / Required Field?: Everyone (required)
    • Display Order: 8
    • Display Format:

      Code:
      <?=my_number_format({VALUE})?>

    • Underlying Data Type: Integer (unsigned)
    • Text Mask Filter: Digits
    • Hide Input Field: Yes
  9. Listbox for Memory Type
    • Title: Memory Type
    • Key: compspecs_memtype
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: Listbox
    • Field Input Width: 10
    • Field Input Height: 1
    • Values List:

      Code:
      1{|}DDR1
      2{|}DDR2
      3{|}DDR3

      Modify it as our needs

    • Editable by / Required Field?: Everyone (required)
    • Display Order: 9
    • Allow Filtering: Yes
    • Underlying Data Type: Integer (unsigned)
    • Formatting Map List:
      • Value: 1
        Displayed Output: DDR1
      • Value: 2
        Displayed Output: DDR2
      • Value: 3
        Displayed Output: DDR3

      Code:
      1{|}DDR1
      2{|}DDR2
      3{|}DDR3

      Modify it as our needs. Related to the Values List setting of this field.

    • Hide Input Field: Yes
  10. Listbox for Graphics
    • Title: Graphics
    • Key: compspecs_graphics
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: Listbox
    • Field Input Width: 15
    • Field Input Height: 1
    • Values List:

      Code:
      1{|}NVidia
      2{|}ATI Radeon

      Modify it as our needs

    • Editable by / Required Field?: Everyone (required)
    • Display Order: 10
    • Allow Filtering: Yes
    • Underlying Data Type: Integer (unsigned)
    • Formatting Map List:
      • Value: 1
        Displayed Output: NVidia
      • Value: 2
        Displayed Output: ATI Radeon

      Code:
      1{|}NVidia
      2{|}ATI Radeon

      Modify it as our needs. Related to the Values List setting of this field.

    • Hide Input Field: Yes
  11. Textbox for Graphics Series
    • Title: Graphics Series
    • Key: compspecs_graphicsseries
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: Textbox
    • Editable by / Required Field?: Everyone (required)
    • Display Order: 11
    • Hide Input Field: Yes
  12. Textbox for Graphics Memory
    • Title: Graphics Memory
    • Key: compspecs_graphicsmemory
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: Textbox
    • Maximum Text Length: 10
    • Maximum Text Length: 10
    • Editable by / Required Field?: Everyone (required)
    • Display Order: 12
    • Display Format:

      Code:
      <if intval({VALUE}) >= 1024 then><?=intval({VALUE})/1024?> GB<else>{VALUE} MB</if>

    • Underlying Data Type: Integer (unsigned)
    • Text Mask Filter: Digits
    • Hide Input Field: Yes
  13. Textbox for Hard Drives
    • Title: Hard Drives
    • Key: compspecs_hd
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: Textbox
    • Maximum Text Length: 10
    • Maximum Text Length: 10
    • Editable by / Required Field?: Everyone (required)
    • Display Order: 13
    • Display Format:

      Code:
      <if intval({VALUE}) >= 1024 then><?=intval({VALUE})/1024?> TB<else>{VALUE} GB</if>

    • Underlying Data Type: Integer (unsigned)
    • Text Mask Filter: Digits
    • Hide Input Field: Yes
  14. Textbox for RPM
    • Title: RPM
    • Key: compspecs_hdrpm
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: Textbox
    • Maximum Text Length: 10
    • Maximum Text Length: 10
    • Editable by / Required Field?: Everyone (required)
    • Display Order: 14
    • Display Format:

      Code:
      <?=my_number_format({VALUE})?>

    • Underlying Data Type: Integer (unsigned)
    • Text Mask Filter: Digits
    • Hide Input Field: Yes
  15. File for Computer Picture
    • Title: Picture
    • Key: compspecs_picture
    • Applicable Forums: select our Computer Specs forum
    • Input Field Type: File
    • Valid File Extensions: jpg|jpeg|gif|png
    • Maximum File Size: 204800
      Modify it as our needs.
    • Editable by / Required Field?: Everyone
      Modify it as our needs. Select Everyone (required) if we want to force user to upload an image.
    • Display Order: 15
    • Only Accept Image Files: Yes
    • Image Thumbnail Generation: 120x90|160x120
    • Blank Replacement Value:

      Code:
      <img src="images/no-picture.png" alt="No Picture" />

    • Display Format:

      Code:
      <if THIS_SCRIPT == 'showthread.php' then><a href="{URL}" title="Click to view the large picture" target="_blank"><img src="{URL}/thumb160x120" alt="{FILENAME}" /></a><else><img src="{URL}/thumb120x90" alt="{FILENAME}" /></if>



Now, we need to create new templates in Global Template.
Admin CP -> Templates & Style -> Templates -> Global Templates:

  1. compspecs_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
    {$ignore_bit}
    <a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tbody>
    		<tr>
    			<td class="tcat">
    				<div class="float_left smalltext">
    					{$post['postdate']}, {$post['posttime']} <span id="edited_by_{$post['pid']}">{$post['editedmsg']}</span>
    				</div>
    				{$post['posturl']}
    			</td>
    		</tr>
    		<tr>
    			<td class="trow1 {$unapproved_shade}">
    				<table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
    					<tr>
    						<td class="post_avatar" width="1" style="{$post['avatar_padding']}">
    							{$post['useravatar']}
    						</td>
    						<td class="post_author">
    							<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    							<span class="smalltext">
    								{$post['usertitle']}<br />
    								{$post['userstars']}
    								{$post['groupimage']}
    							</span>
    						</td>
    						<td class="smalltext post_author_info" width="165">
    							{$post['user_details']}
    						</td>
    					</tr>
    				</table>
    			</td>
    		</tr>
    		<tr>
    			<td class="trow2 post_content {$unapproved_shade}">
    				<div class="post_body">
    					<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    						<tr><td class="thead" colspan="3"><strong>{$lang->compspecs_title}</strong></td></tr>
    						<tr>
    							<td class="trow1" rowspan="6" style="width:1px;padding:9px">
    								<div style="text-align:center">{$GLOBALS['threadfields']['compspecs_picture']['value']}</div>
    							</td>
    							<td class="trow1">{$lang->thread_subject}</td>
    							<td class="trow1">{$post['subject']}</td>
    						</tr>
    						<tr>
    							<td class="trow2">{$lang->compspecs_type}</td>
    							<td class="trow2">{$GLOBALS['threadfields']['compspecs_type']}</td>
    						</tr>
    						<tr>
    							<td class="trow1">{$lang->compspecs_proc}</td>
    							<td class="trow1">{$GLOBALS['threadfields']['compspecs_proc']} {$GLOBALS['threadfields']['compspecs_procseries']} {$GLOBALS['threadfields']['compspecs_procfreq']} {$lang->compspecs_procfreqghz}
    							</td>
    						</tr>
    						<tr>
    							<td class="trow2">{$lang->compspecs_memory}</td>
    							<td class="trow2">{$GLOBALS['threadfields']['compspecs_memtype']} {$GLOBALS['threadfields']['compspecs_memsize']} {$lang->compspecs_gb} {$GLOBALS['threadfields']['compspecs_memfreq']} {$lang->compspecs_memfreq}</td>
    						</tr>
    						<tr>
    							<td class="trow1">{$lang->compspecs_graphics}</td>
    							<td class="trow1">{$GLOBALS['threadfields']['compspecs_graphics']} {$GLOBALS['threadfields']['compspecs_graphicsseries']} {$GLOBALS['threadfields']['compspecs_graphicsmemory']}
    							</td>
    						</tr>
    						<tr>
    							<td class="trow2">{$lang->compspecs_hd}</td>
    							<td class="trow2">{$GLOBALS['threadfields']['compspecs_hd']} {$GLOBALS['threadfields']['compspecs_hdrpm']} {$lang->compspecs_rpm}</td>
    						</tr>
    						<tr><td class="trow_sep" colspan="3">{$lang->your_message}</td></tr>
    						<tr><td class="trow2" colspan="3"><div class="post_body" id="pid_{$post['pid']}">{$post['message']}</div></td></tr>
    					</table>
    				</div>
    				{$post['attachments']}
    				{$post['signature']}
    
    				<div class="post_meta" id="post_meta_{$post['pid']}">
    				{$post['iplogged']}
    				</div>
    			</td>
    		</tr>
    		<tr>
    			<td class="trow1 post_buttons {$unapproved_shade}">
    				<div class="author_buttons float_left">
    					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}
    				</div>
    				<div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
    				</div>
    			</td>
    		</tr>
    	</tbody>
    </table>

  2. compspecs_newthread

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    <html>
    <head>
    <title>{$lang->newthread_in}</title>
    {$headerinclude}
    <script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
    </head>
    <body>
    {$header}
    {$preview}
    {$thread_errors}
    {$attacherror}
    <form action="newthread.php?fid={$fid}&amp;processed=1" method="post" enctype="multipart/form-data" name="input">
    	<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
    	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    		<tr>
    			<td class="thead" colspan="2"><strong>{$lang->post_new_thread}</strong></td>
    		</tr>
    		{$loginbox}
    		<tr>
    			<td class="trow2" width="20%">
    				<strong>{$lang->thread_subject}</strong>
    			</td>
    			<td class="trow2">
    				{$prefixselect}<input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" />
    				<strong>{$lang->compspecs_type}</strong> {$tfinput['compspecs_type']}
    			</td>
    		</tr>
    		<tr>
    			<td class="trow2" width="20%">
    				<strong>{$lang->compspecs_proc}</strong>
    			</td>
    			<td class="trow2">
    				{$tfinput['compspecs_proc']}
    				<strong>{$lang->compspecs_series}</strong> {$tfinput['compspecs_procseries']}
    				<strong>{$lang->compspecs_procfreq}</strong> {$tfinput['compspecs_procfreq']} {$lang->compspecs_procfreqghz}
    			</td>
    		</tr>
    		<tr>
    			<td class="trow2" width="20%">
    				<strong>{$lang->compspecs_chipsets}</strong>
    			</td>
    			<td class="trow2">
    				{$tfinput['compspecs_chipsets']}
    				<strong>{$lang->compspecs_series}</strong> {$tfinput['compspecs_chipsetsseries']}
    			</td>
    		</tr>
    		<tr>
    			<td class="trow2" width="20%">
    				<strong>{$lang->compspecs_memory}</strong>
    			</td>
    			<td class="trow2">
    				{$tfinput['compspecs_memsize']} {$lang->compspecs_gb}
    				{$tfinput['compspecs_memfreq']} {$lang->compspecs_memfreq}
    				{$tfinput['compspecs_memtype']}
    			</td>
    		</tr>
    		<tr>
    			<td class="trow2" width="20%">
    				<strong>{$lang->compspecs_graphics}</strong>
    			</td>
    			<td class="trow2">
    				{$tfinput['compspecs_graphics']}
    				<strong>{$lang->compspecs_series}</strong> {$tfinput['compspecs_graphicsseries']}
    				{$tfinput['compspecs_graphicsmemory']} {$lang->compspecs_mb}
    				<em class="smalltext">{$lang->compspecs_gbmb}</em>
    			</td>
    		</tr>
    		<tr>
    			<td class="trow2" width="20%">
    				<strong>{$lang->compspecs_hd}</strong>
    			</td>
    			<td class="trow2">
    				{$tfinput['compspecs_hd']} {$lang->compspecs_gb} <em class="smalltext">{$lang->compspecs_tbgb}</em> {$tfinput['compspecs_hdrpm']} {$lang->compspecs_rpm}
    			</td>
    		</tr>
    		{$extra_threadfields}{$posticons}
    		<tr>
    			<td class="trow2" valign="top"><strong>{$lang->your_message}</strong>{$smilieinserter}</td>
    			<td class="trow2">
    				<textarea name="message" id="message" rows="20" cols="70" tabindex="2">{$message}</textarea>
    				{$codebuttons}
    				{$multiquote_external}
    			</td>
    		</tr>
    		<tr>
    			<td class="trow1" valign="top"><strong>{$lang->post_options}</strong></td>
    			<td class="trow1"><span class="smalltext">
    				<label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1" tabindex="7"{$postoptionschecked['signature']} /> {$lang->options_sig}</label>
    				{$disablesmilies}</span>
    			</td>
    		</tr>
    		{$modoptions}
    		{$subscriptionmethod}
    		{$pollbox}
    		{$captcha}
    	</table>
    	{$attachbox}
    	<br />
    	<div style="text-align:center"><input type="submit" class="button" name="submit" value="{$lang->post_thread}" tabindex="4" accesskey="s" />  <input type="submit" class="button" name="previewpost" value="{$lang->preview_post}" tabindex="5" />{$savedraftbutton}</div>
    	<input type="hidden" name="action" value="do_newthread" />
    	<input type="hidden" name="posthash" value="{$posthash}" />
    	<input type="hidden" name="attachmentaid" value="" />
    	<input type="hidden" name="attachmentact" value="" />
    	<input type="hidden" name="quoted_ids" value="{$quoted_ids}" />
    	<input type="hidden" name="tid" value="{$tid}" />
    	{$editdraftpid}
    </form>
    {$forumrules}
    {$footer}
    </body>
    </html>

  3. compspecs_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
    {$searchforum}
    <div class="float_left">
    	{$multipage}
    </div>
    <div class="float_right">
    	{$newthread}
    </div>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    	<tr>
    		<td class="thead" colspan="{$colspan}">
    			<div style="float: right;">
    				<span class="smalltext"><strong><a href="misc.php?action=markread&amp;fid={$fid}{$post_code_string}">{$lang->markforum_read}</a> | <a href="usercp2.php?action={$add_remove_subscription}subscription&amp;type=forum&amp;fid={$fid}&amp;my_post_key={$mybb->post_code}">{$add_remove_subscription_text}</a>{$clearstoredpass}</strong></span>
    			</div>
    			<div>
    				<strong><a href="{$forumurl}">{$foruminfo['name']}</a></strong>
    			</div>
    		</td>
    	</tr>
    	<tr>
    		<td class="tcat" colspan="3" width="66%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=subject&amp;order=asc">{$lang->thread}</a> {$orderarrow['subject']} / <a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong></span></td>
    		<td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=replies&amp;order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong></span></td>
    		<td class="tcat" align="center" width="7%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=views&amp;order=desc">{$lang->views}</a> {$orderarrow['views']}</strong></span></td>
    		{$ratingcol}
    		<td class="tcat" align="right" width="20%"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=lastpost&amp;order=desc">{$lang->lastpost}</a> {$orderarrow['lastpost']}</strong></span></td>
    		{$inlinemodcol}
    	</tr>
    	{$selectall}
    	{$announcementlist}
    	{$threads}{$nullthreads}
    	<tr>
    		<td class="tfoot" align="right" colspan="{$colspan}">
    			<form action="forumdisplay.php" method="get">
    				<input type="hidden" name="selectall" value="{$allselected}" />
    				<input type="hidden" name="fid" value="{$fid}" />
    				<select name="sortby">
    					{$sort_by_prefix}<option value="subject" {$sortsel['subject']}>{$lang->sort_by_subject}</option>
    					<option value="lastpost" {$sortsel['lastpost']}>{$lang->sort_by_lastpost}</option>
    					<option value="starter" {$sortsel['starter']}>{$lang->sort_by_starter}</option>
    					<option value="started" {$sortsel['started']}>{$lang->sort_by_started}</option>
    					{$ratingsort}
    					<option value="replies" {$sortsel['replies']}>{$lang->sort_by_replies}</option>
    					<option value="views" {$sortsel['views']}>{$lang->sort_by_views}</option>
    					<option value="icon" {$sortsel['icon']}>{$lang->sort_by_icon}</option>
    					<option value="lastposter" {$sortsel['lastposter']}>{$lang->sort_by_lastposter}</option>
    					<option value="attachmentcount" {$sortsel['attachmentcount']}>{$lang->sort_by_attachmentcount}</option>
    					{$xthreads_extra_sorting}
    				</select>
    				<select name="order">
    					<option value="asc" {$ordersel['asc']}>{$lang->sort_order_asc}</option>
    					<option value="desc" {$ordersel['desc']}>{$lang->sort_order_desc}</option>
    				</select>
    				<select name="datecut">
    					<option value="1" {$datecutsel['1']}>{$lang->datelimit_1day}</option>
    					<option value="5" {$datecutsel['5']}>{$lang->datelimit_5days}</option>
    					<option value="10" {$datecutsel['10']}>{$lang->datelimit_10days}</option>
    					<option value="20" {$datecutsel['20']}>{$lang->datelimit_20days}</option>
    					<option value="50" {$datecutsel['50']}>{$lang->datelimit_50days}</option>
    					<option value="75" {$datecutsel['75']}>{$lang->datelimit_75days}</option>
    					<option value="100" {$datecutsel['100']}>{$lang->datelimit_100days}</option>
    					<option value="365" {$datecutsel['365']}>{$lang->datelimit_lastyear}</option>
    					<option value="9999" {$datecutsel['9999']}>{$lang->datelimit_beginning}</option>
    				</select>
    				{$gobutton}
    			</form>
    		</td>
    	</tr>
    </table>
    <div class="float_left">
    	{$multipage}
    </div>
    <div class="float_right" style="margin-top: 4px;">
    	{$newthread}
    </div>
    <br style="clear: both;" />
    <br />
    <div class="float_left">
    	<div class="float_left">
    		<dl class="thread_legend smalltext">
    			<dd><img src="{$theme['imgdir']}/newfolder.gif" alt="{$lang->new_thread}" title="{$lang->new_thread}" /> {$lang->new_thread}</dd>
    			<dd><img src="{$theme['imgdir']}/newhotfolder.gif" alt="{$lang->new_hot_thread}" title="{$lang->new_hot_thread}" /> {$lang->new_hot_thread}</dd>
    			<dd><img src="{$theme['imgdir']}/hotfolder.gif" alt="{$lang->hot_thread}" title="{$lang->hot_thread}" /> {$lang->hot_thread}</dd>
    		</dl>
    	</div>
    
    	<div class="float_left">
    		<dl class="thread_legend smalltext">
    			<dd><img src="{$theme['imgdir']}/folder.gif" alt="{$lang->no_new_thread}" title="{$lang->no_new_thread}" /> {$lang->no_new_thread}</dd>
    			<dd><img src="{$theme['imgdir']}/dot_folder.gif" alt="{$lang->posts_by_you}" title="{$lang->posts_by_you}" /> {$lang->posts_by_you}</dd>
    			<dd><img src="{$theme['imgdir']}/lockfolder.gif" alt="{$lang->locked_thread}" title="{$lang->locked_thread}" /> {$lang->locked_thread}</dd>
    		</dl>
    	</div>
    	<br style="clear: both" />
    </div>
    
    <div class="float_right" style="text-align: right;">
    	{$inlinemod}
    	{$forumjump}
    </div>
    <br style="clear: both" />
    <div style="text-align:center" class="smalltext">
    {$foruminfo['name']}<br />
    Powered By: <a href="http://mybbhacks.zingaburga.com/showthread.php?tid=288" target="_blank">XThreads</a>
    </div>
    {$inline_edit_js}

  4. compspecs_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
    <tr>
    	<td align="center" class="{$bgcolor}{$thread_type_class}" colspan="2">
    		{$GLOBALS['threadfields']['compspecs_picture']['value']}
    	</td>
    	<td class="{$bgcolor}{$thread_type_class}">
    		{$attachment_count}
    		<div>
    			<span>{$prefix} {$gotounread}{$thread['threadprefix']}<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>{$thread['multipage']}</span>
    			<div class="author smalltext">{$thread['profilelink']}</div>
    			<div>
    				{$lang->compspecs_proc} {$GLOBALS['threadfields']['compspecs_proc']} {$GLOBALS['threadfields']['compspecs_procseries']} {$GLOBALS['threadfields']['compspecs_procfreq']} {$lang->compspecs_procfreqghz}<br />
    				{$lang->compspecs_memory} {$GLOBALS['threadfields']['compspecs_memsize']} {$lang->compspecs_gb}<br />
    				{$lang->compspecs_hd} {$GLOBALS['threadfields']['compspecs_hd']}
    			</div>
    		</div>
    	</td>
    	<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
    	<td align="center" class="{$bgcolor}{$thread_type_class}">{$thread['views']}</td>
    	{$rating}
    	<td class="{$bgcolor}{$thread_type_class}" style="white-space: nowrap; text-align: right;">
    		<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
    		<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
    	</td>
    {$modbit}
    </tr>

  5. compspecs_editpost_first

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    <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" 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>
    <br />
    <form action="editpost.php?pid={$pid}&amp;processed=1" method="post" enctype="multipart/form-data" name="input">
    	<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
    	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    		<tr>
    			<td class="thead" colspan="2"><strong>{$lang->edit_post}</strong></td>
    		</tr>
    		{$loginbox}
    		<tr>
    			<td class="trow2">
    				<strong>{$lang->thread_subject}</strong>
    			</td>
    			<td class="trow2">
    				{$prefixselect}<input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" />
    				<strong>{$lang->compspecs_type}</strong> {$tfinput['compspecs_type']}
    			</td>
    		</tr>
    		<tr>
    			<td class="trow2" width="20%">
    				<strong>{$lang->compspecs_proc}</strong>
    			</td>
    			<td class="trow2">
    				{$tfinput['compspecs_proc']}
    				<strong>{$lang->compspecs_series}</strong> {$tfinput['compspecs_procseries']}
    				<strong>{$lang->compspecs_procfreq}</strong> {$tfinput['compspecs_procfreq']} {$lang->compspecs_procfreqghz}
    			</td>
    		</tr>
    		<tr>
    			<td class="trow2" width="20%">
    				<strong>{$lang->compspecs_chipsets}</strong>
    			</td>
    			<td class="trow2">
    				{$tfinput['compspecs_chipsets']}
    				<strong>{$lang->compspecs_series}</strong> {$tfinput['compspecs_chipsetsseries']}
    			</td>
    		</tr>
    		<tr>
    			<td class="trow2" width="20%">
    				<strong>{$lang->compspecs_memory}</strong>
    			</td>
    			<td class="trow2">
    				{$tfinput['compspecs_memsize']} {$lang->compspecs_gb}
    				{$tfinput['compspecs_memfreq']} {$lang->compspecs_memfreq}
    				{$tfinput['compspecs_memtype']}
    			</td>
    		</tr>
    		<tr>
    			<td class="trow2" width="20%">
    				<strong>{$lang->compspecs_graphics}</strong>
    			</td>
    			<td class="trow2">
    				{$tfinput['compspecs_graphics']}
    				<strong>{$lang->compspecs_series}</strong> {$tfinput['compspecs_graphicsseries']}
    				{$tfinput['compspecs_graphicsmemory']} {$lang->compspecs_mb}
    				<em class="smalltext">{$lang->compspecs_gbmb}</em>
    			</td>
    		</tr>
    		<tr>
    			<td class="trow2" width="20%">
    				<strong>{$lang->compspecs_hd}</strong>
    			</td>
    			<td class="trow2">
    				{$tfinput['compspecs_hd']} {$lang->compspecs_gb} <em class="smalltext">{$lang->compspecs_tbgb}</em> {$tfinput['compspecs_hdrpm']} {$lang->compspecs_rpm}
    			</td>
    		</tr>
    		{$extra_threadfields}{$posticons}
    		<tr>
    			<td class="trow2" valign="top"><strong>{$lang->your_message}:</strong><br /><div style="text-align: center;">{$smilieinserter}</div></td>
    			<td class="trow2">
    				<textarea name="message" id="message" rows="20" cols="70" tabindex="3">{$message}</textarea>
    				{$codebuttons}
    			</td>
    		</tr>
    		<tr>
    			<td class="trow1" valign="top"><strong>{$lang->post_options}</strong></td>
    			<td class="trow1"><span class="smalltext">
    				<label><input type="checkbox" class="checkbox" name="postoptions[signature]" value="1" tabindex="6"{$postoptionschecked['signature']} /> {$lang->options_sig}</label>
    				{$disablesmilies}</span>
    			</td>
    		</tr>
    		{$subscriptionmethod}
    		{$pollbox}
    	</table>
    	{$attachbox}
    	<br />
    	<div align="center"><input type="submit" class="button" name="submit" value="{$lang->update_post}" tabindex="3" accesskey="s" />  <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}" />
    	{$tfinput['xtra_tid']}{$tfinput['xtra_pid']}{$tfinput['xtra_aid']}
    	<input type="hidden" name="attachmentaid" value="" />
    	<input type="hidden" name="attachmentact" value="" />
    </form>
    {$footer}
    </body>
    </html>

  6. compspecs_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
    <br class="clear" />
    <table border="0" cellspacing="{$GLOBALS['theme']['borderwidth']}" cellpadding="{$GLOBALS['theme']['tablespace']}" class="tborder">
    	<tr>
    	<td class="thead"><strong>{$lang->compspecs_search}</strong></td>
    	</tr>
    	<tr>
    		<td class="trow1" style="text-align: center">
    			<form action="forumdisplay.php" method="get">
    				{$xthreads_forum_filter_form}
    				<select name="filtertf_compspecs_type">
    					<option value="">All</option>
    					<option value="1"{$GLOBALS['filters_set']['compspecs_type']['selected'][1]}>Laptop</option>
    					<option value="2"{$GLOBALS['filters_set']['compspecs_type']['selected'][2]}>Desktop</option>
    				</select>
    				{$lang->compspecs_proc}
    				<select name="filtertf_compspecs_proc">
    					<option value="">All</option>
    					<option value="1"{$GLOBALS['filters_set']['compspecs_proc']['selected'][1]}>Intel</option>
    					<option value="2"{$GLOBALS['filters_set']['compspecs_proc']['selected'][2]}>AMD</option>
    				</select>
    				{$lang->compspecs_chipsets}
    				<select name="filtertf_compspecs_chipsets">
    					<option value="">All</option>
    					<option value="1"{$GLOBALS['filters_set']['compspecs_chipsets']['selected'][1]}>Intel</option>
    					<option value="2"{$GLOBALS['filters_set']['compspecs_chipsets']['selected'][2]}>AMD</option>
    				</select>
    				{$lang->compspecs_graphics}
    				<select name="filtertf_compspecs_graphics">
    					<option value="">All</option>
    					<option value="1"{$GLOBALS['filters_set']['compspecs_graphics']['selected'][1]}>NVidia</option>
    					<option value="2"{$GLOBALS['filters_set']['compspecs_graphics']['selected'][2]}>ATI Radeon</option>
    				</select>
    				<input type="text" class="textbox" name="search" 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 />

  7. compspecs_postbit_first_classic

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    {$ignore_bit}
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="{$post_extra_style} {$post_visibility}" id="post_{$post['pid']}">
    	<tr>
    		<td class="{$altbg}" width="15%" valign="top" style="white-space: nowrap; text-align: center;"><a name="pid{$post['pid']}" id="pid{$post['pid']}"></a>
    		<strong><span class="largetext">{$post['profilelink']}</span></strong> {$post['onlinestatus']}<br />
    		<span class="smalltext">
    			{$post['usertitle']}<br />
    			{$post['userstars']}
    			{$post['groupimage']}
    			{$post['useravatar']}<br />
    			{$post['user_details']}
    		</span>
    	</td>
    	<td class="{$altbg}" valign="top">
    		<table width="100%">
    			<tr><td>
    			<div class="post_body">
    				<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    					<tr><td class="thead" colspan="3">{$post['posturl']}<strong>{$lang->compspecs_title}</strong></td></tr>
    					<tr>
    						<td class="trow1" rowspan="6" style="width:1px;padding:9px">
    							<div style="text-align:center">{$GLOBALS['threadfields']['compspecs_picture']['value']}</div>
    						</td>
    						<td class="trow1">{$lang->thread_subject}</td>
    						<td class="trow1">{$post['subject']}</td>
    					</tr>
    					<tr>
    						<td class="trow2">{$lang->compspecs_type}</td>
    						<td class="trow2">{$GLOBALS['threadfields']['compspecs_type']}</td>
    					</tr>
    					<tr>
    						<td class="trow1">{$lang->compspecs_proc}</td>
    						<td class="trow1">{$GLOBALS['threadfields']['compspecs_proc']} {$GLOBALS['threadfields']['compspecs_procseries']} {$GLOBALS['threadfields']['compspecs_procfreq']} {$lang->compspecs_procfreqghz}
    						</td>
    					</tr>
    					<tr>
    						<td class="trow2">{$lang->compspecs_memory}</td>
    						<td class="trow2">{$GLOBALS['threadfields']['compspecs_memtype']} {$GLOBALS['threadfields']['compspecs_memsize']} {$lang->compspecs_gb} {$GLOBALS['threadfields']['compspecs_memfreq']} {$lang->compspecs_memfreq}</td>
    					</tr>
    					<tr>
    						<td class="trow1">{$lang->compspecs_graphics}</td>
    						<td class="trow1">{$GLOBALS['threadfields']['compspecs_graphics']} {$GLOBALS['threadfields']['compspecs_graphicsseries']} {$GLOBALS['threadfields']['compspecs_graphicsmemory']}
    						</td>
    					</tr>
    					<tr>
    						<td class="trow2">{$lang->compspecs_hd}</td>
    						<td class="trow2">{$GLOBALS['threadfields']['compspecs_hd']} {$GLOBALS['threadfields']['compspecs_hdrpm']} {$lang->compspecs_rpm}</td>
    					</tr>
    					<tr><td class="trow_sep" colspan="3">{$lang->your_message}</td></tr>
    					<tr><td class="trow2" colspan="3"><div class="post_body" id="pid_{$post['pid']}">{$post['message']}</div></td></tr>
    				</table>
    			</div>
    			{$post['attachments']}
    			{$post['signature']}
    			<div style="text-align: right; vertical-align: bottom;" id="post_meta_{$post['pid']}">
    				<div id="edited_by_{$post['pid']}">{$post['editedmsg']}</div>
    				{$post['iplogged']}
    			</div>
    		</td></tr>
    	</table>
    </td>
    </tr>
    <tr>
    	<td class="{$altbg}" style="white-space: nowrap; text-align: center; vertical-align: middle;"><span class="smalltext">{$post['postdate']} {$post['posttime']}</span></td>
    	<td class="{$altbg}" style="vertical-align: middle;">
    		<table width="100%" border="0" cellpadding="0" cellspacing="0">
    			<tr valign="bottom">
    				<td align="left" ><span class="smalltext">{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}{$post['button_rep']}</span></td>
    				<td align="right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}</td>
    			</tr>
    		</table>
    	</td>
    </tr>
    </table>



Additional Info:
  1. We use language prefix for this (attached). Upload it to our inc/languages/english folder.
  2. The templates above based on MyBB 1.6.8 templates.

That's the basic. Just modify it as our needs.
Please tell me if there is something wrong with the code above. I'm still learning.

Screenshots:

1. Newthread / Editpost:
   

2. Thread List:
   

3. Showthread:
       


Attached File(s)
.7z  compspecs.7z (Size: 990 bytes / Downloads: 607)

07-30-2012 10:58 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Computer Specs - RateU - 07-30-2012 10:58 AM
RE: Computer Specs - RateU - 12-21-2012, 05:58 AM
RE: Computer Specs - admin2u - 12-25-2012, 07:33 AM
RE: Computer Specs - RateU - 12-26-2012, 02:31 AM
RE: Computer Specs - admin2u - 12-26-2012, 06:35 AM
RE: Computer Specs - RateU - 12-26-2012, 06:42 AM
RE: Computer Specs - admin2u - 12-26-2012, 07:00 AM
RE: Computer Specs - Altered - 01-02-2014, 12:30 PM
RE: Computer Specs - ZiNgA BuRgA - 01-03-2014, 08:58 PM
RE: Computer Specs - Altered - 01-06-2014, 03:00 AM
RE: Computer Specs - ZiNgA BuRgA - 01-06-2014, 05:36 PM
RE: Computer Specs - Altered - 02-05-2014, 07:33 AM
RE: Computer Specs - ZiNgA BuRgA - 02-06-2014, 08:53 AM
RE: Computer Specs - Altered - 02-11-2014, 08:31 AM
RE: Computer Specs - ZiNgA BuRgA - 02-11-2014, 08:52 AM
RE: Computer Specs - blacksword - 06-13-2022, 06:52 PM

 Standard Tools
Forum Jump: