Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Request: Brand Directory
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #1
Request: Brand Directory
Hey everyone,

I run the fashion website HARAJUJU.net and am currently running xThreads in collaboration with a custom plugin designed by Pirata Nervo. I'm pretty impressed by what it can do and I want to utilize it to design a clothing brand directory. The issue is that I'm very short on time and knowledge, and on a very tight deadline to complete this. The solution I envision seems to already mostly exist across RateU's example plugins, so hopefully you guys could help me out?

Here's a very rough mock-up of what I imagine the forumdisplay to look like:

[Image: VY7fE.jpg]

As for the thread display, I imagine it looking ... pretty much just like this:

http://i40.tinypic.com/6oog1z.jpg

Minus the rating box. Though I do wonder what would happen if there are too many images attached. The discussion below it would display like it would in any other forum; only the first post should be custom. I could probably handle this using the Product Review tutorial if I need to.

Sorry, I know I sound like a total n00b (because I am one), and I really appreciate your help/feedback! Willing to give Admin CP access if need  be. ._.;
(This post was last modified: 05-19-2011 02:08 AM by brad-t.)
05-19-2011 02:03 AM
Find all posts by this user Quote this message in a reply
techu Offline
Member
***
Posts: 154
Joined: Sep 2010
Post: #2
RE: Request: Brand Directory
RateU already did that in the trading forum.
Take a look at this http://mybbhacks.zingaburga.com/showthread.php?tid=443

[Image: banner.png]
05-19-2011 02:47 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #3
RE: Request: Brand Directory
Ahh you're right, it's very similar ... will try it out this weekend and hopefully not blow anything up
05-19-2011 03:59 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #4
RE: Request: Brand Directory
You can try to modify this very basic sample. Basically, it is a combination from the trade and product review example application.

Create or edit a forum with these settings:
  • Forum Rules: Display rules for this forum on the thread listing.
    Modify the forum rules.
  • Template Prefix: brand_
  • Language File Prefix: brand_
  • Thread Grouping: 3
  • Show first post on every showthread page: Yes
  • Enable XThreads' Inline Forum Search: Yes
  • Custom WOL Text:
    • Forum Display:

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

    • New Thread:

      HTML Code
      Submitting a new Brand

    • New Reply:

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

    • Show Thread:

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


Create a Custom Thread Fields with these settings:
AdminCP -> Configuration -> Custom Thread Fields
  1. Listbox for Gender:
    • Title: Gender
    • Key: gender
    • Applicable Forums: 'select our Brand Directory forum'
    • Input Field Type: Listbox
    • Field Input Width: 10
    • Field Input Height: 1
    • Values List:

      Code:
      Men
      Women

    • Editable by / Required Field?: Everyone (required)
    • Allow Filtering: Yes
    • Display Order: 1
  2. Textbox for Price:
    • Title: Price
    • Key: price
    • Applicable Forums: 'select our Brand Directory forum'
    • Maximum Text Length: 10
      Modify it as our needs
    • Field Input Width: 10
      Modify it as our needs
    • Editable by / Required Field?: Everyone (required)
    • Display Order: 2
    • Display Format:

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

    • Text Mask Filter: Custom

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

      Modify it as our needs.

  3. Listbox for Style:
    Not quite sure whether the style is multi select or not (I'm not familiar with fashion). In this example we use a single select (only one style can be selected for each brand).
    • Title: Style
    • Key: style
    • Applicable Forums: 'select our Brand Directory forum'
    • Input Field Type: Listbox
    • Field Input Width: 20
      Modify it as our needs. Depends on the long of the longest style name.
    • Field Input Height: 1
    • Values List:

      Code:
      Style 1
      Style 2
      Style 3
      Style 4

      Modify it as our needs. Please remember to edit our brand_forumdisplay_threadlist template (line #11 - #22) if we edit the value.

    • Editable by / Required Field?: Everyone (required)
    • Allow Filtering: Yes
    • Display Order: 3
  4. File input field type for main image:
    This is the only required image for this.
    • Title: Main Image
    • Key: mimg
    • Applicable Forums: 'select our Brand Directory forum'
    • Input Field Type: File
    • Valid File Extensions: jpg|jpeg|gif|png
    • Maximum File Size: 1048576
      Modify it as our needs. It is a maximum file size (in bytes) that can be uploaded.
    • Editable by / Required Field?: Everyone (required)
    • Display Order: 4
    • Only Accept Image Files: Yes
    • Image Thumbnail Generation: 160x120
    • Display Format:

      HTML Code
      <img src="{URL}/thumb160x120" alt="" style="border: 1px solid #C1C1C1; padding: 3px; margin: 3px;" />

      Modify it as our need.

  5. File input field type for additional image:
    Repeat this step as our needs, depends on how many additional images can be uploaded for each brands. Just use diferrent key. For example: bimg1, bimg2, bimg3 and etc. Then, put the variable in our brand_showthread template.
    The variable should be like this:

    Code:
    {$GLOBALS['threadfields']['bimgx']['value']}

    Change the bimgx with the appropriate key.
    In our brand_showthread template, there are five variable like this, for five additional brand images, using bimg1, bimg2, bimg3, bimg4 and bimg5 as key (line #49 - #53)

    • Title: Additional Image 1
    • Key: bimg1
    • Applicable Forums: 'select our Brand Directory forum'
    • Input Field Type: File
    • Valid File Extensions: jpg|jpeg|gif|png
    • Maximum File Size: 1048576
      Modify it as our needs. It is a maximum file size (in bytes) that can be uploaded.
    • Editable by / Required Field?: Everyone
      This is not a required image.
    • Display Order: 5
    • Only Accept Image Files: Yes
    • Image Thumbnail Generation: 160x120
    • Display Format:

      HTML Code
      <a href="{URL}" target="_blank"><img src="{URL}/thumb160x120" alt="" style="border: 1px solid #C1C1C1; padding: 3px; margin: 3px;" /></a>

      Modify it as our need.




Create new templates in Global Template.
Admin CP -> Templates & Style -> Templates -> Global Templates:
  1. brand_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>

    There is a stylesheet in this template for selected filter. Modify it as our needs.

  2. brand_forumdisplay_announcements_announcement

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    <tr>
    	<td class="{$bgcolor}" colspan="{$colspan}">
    		<a href="{$announcement['announcementlink']}"{$new_class}>{$announcement['subject']}</a>
    		<div class="author smalltext">
    			{$announcement['profilelink']},
    			{$postdate} {$posttime}
    		</div>
    	</td>
    </tr>

    Just to make announcements a bit blended with this template Biggrin. Personally I prefer to not displaying announcements for this type of forum.

  3. brand_forumdisplay_group_sep

    HTML Code
    </tr><tr>

  4. brand_forumdisplay_inlinemoderation_col

    HTML Code
    1
    2
    3
    4
    5
    6
    <tr>
    	<td class="trow_sep">
    		<input type="checkbox" name="allbox" onclick="inlineModeration.checkAll(this)" />
    		<strong>{$lang->brand_select_all}</strong>
    	</td>
    </tr>

  5. brand_forumdisplay_searchforum_inline

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    <tr>
    	<td class="tcat"><strong>{$lang->search_forum}</strong></td>
    </tr>
    <tr>
    	<td class="trow1">
    		<div style="text-align: center; margin: 10px 0px;">
    			<form action="forumdisplay.php" method="get">
    				<input type="text" class="textbox" name="search" value="{$searchval}" />
    				<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}" />
    				{$xthreads_forum_filter_form}
    			</form>
    		</div>
    	</td>
    </tr>

  6. brand_forumdisplay_sticky_sep and brand_forumdisplay_threads_sep

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

  7. brand_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
    <td width="33%" valign="top">
    	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    		<tr>
    			<td class="thead" colspan="{$colspan}">
    				<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="{$bgcolor}{$thread_type_class}" valign="middle">
    				<div style="text-align: center;">
    					<a href="{$thread['threadlink']}">{$GLOBALS['threadfields']['mimg']['value']}</a>
    				</div>
    				{$rating}
    				<div class="smalltext" style="text-align: center;">
    					<strong>{$thread['profilelink']}</strong><br />
    					{$thread['threaddate']} {$lang->at} {$thread['threadtime']}
    				</div>
    				<br />
    				<span class="smalltext">
    					{$thread['postpreview']}<br />
    					<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}<br />
    					{$lang->brand_price}: {$GLOBALS['threadfields']['price']}<br />
    					{$lang->brand_gender}: {$GLOBALS['threadfields']['gender']}<br />
    					{$lang->brand_style}: {$GLOBALS['threadfields']['style']}
    				</span>
    			</td>
    			{$modbit}
    		</tr>
    	</table>
    </td>

  8. brand_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
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" style="clear: both; width: 100%;">
    	<tr>
    		<td width="20%" valign="top">
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    				<tr>
    					<td class="thead largetext"><strong><a href="{$forumurl}">{$foruminfo['name']}</a></strong></td>
    				</tr>
    				{$inlinemodcol}
    				{$searchforum}
    				<tr><td class="tcat"><strong>{$lang->brand_style}</strong></td></tr>
    				<tr>
    					<td class="trow1 smalltext {$filters_set['style']['active']['Style 1']}"><strong><a href="{$forumurl_q}filtertf_style=Style 1">Style 1</a></strong></td>
    				</tr>
    				<tr>
    					<td class="trow1 smalltext {$filters_set['style']['active']['Style 2']}"><strong><a href="{$forumurl_q}filtertf_style=Style 2">Style 2</a></strong></td>
    				</tr>
    				<tr>
    					<td class="trow1 smalltext {$filters_set['style']['active']['Style 3']}"><strong><a href="{$forumurl_q}filtertf_style=Style 3">Style 3</a></strong></td>
    				</tr>
    				<tr>
    					<td class="trow1 smalltext {$filters_set['style']['active']['Style 4']}"><strong><a href="{$forumurl_q}filtertf_style=Style 4">Style 4</a></strong></td>
    				</tr>
    				<tr><td class="tcat"><strong>{$lang->brand_gender}</strong></td></tr>
    				<tr>
    					<td class="trow1 smalltext {$filters_set['gender']['active']['Men']}"><strong><a href="{$forumurl_q}filtertf_gender=Men">Men</a></strong></td>
    				</tr>
    				<tr>
    					<td class="trow1 smalltext {$filters_set['gender']['active']['Women']}"><strong><a href="{$forumurl_q}filtertf_gender=Women">Women</a></strong></td>
    				</tr>
    				<tr><td class="tcat"><strong>{$lang->brand_sort}</strong></td></tr>
    				<tr>
    					<td class="trow1 smalltext"><strong><a href="{$sorturl}&amp;sortby=subject&amp;order=asc">{$lang->thread}</a> {$orderarrow['subject']}</strong></td>
    				</tr>
    				<tr>
    					<td class="trow1 smalltext"><strong><a href="{$sorturl}&amp;sortby=starter&amp;order=asc">{$lang->author}</a> {$orderarrow['starter']}</strong></td>
    				</tr>
    				<tr>
    					<td class="trow1 smalltext"><strong><a href="{$sorturl}&amp;sortby=started&amp;order=asc">{$lang->brand_created}</a> {$orderarrow['started']}</strong></td>
    				</tr>
    				<tr>
    					<td class="trow1 smalltext"><strong><a href="{$sorturl}&amp;sortby=replies&amp;order=desc">{$lang->replies}</a> {$orderarrow['replies']}</strong></td>
    				</tr>
    				<tr>
    					<td class="trow1 smalltext"><strong><a href="{$sorturl}&amp;sortby=views&amp;order=desc">{$lang->views}</a> {$orderarrow['views']}</strong></td>
    				</tr>
    				<tr>
    					<td class="trow1 smalltext"><strong><a href="{$sorturl}&amp;sortby=lastpost&amp;order=desc">{$lang->lastpost}</a> {$orderarrow['lastpost']}</strong></td>
    				</tr>
    				{$ratingcol}
    				<tr><td class="tcat"><strong>{$lang->brand_misc}</strong></td></tr>
    				<tr>
    					<td class="trow1 smalltext"><strong><a href="misc.php?action=markread&amp;fid={$fid}{$post_code_string}">{$lang->markforum_read}</a></strong></td>
    				</tr>
    				<tr>
    					<td class="trow1 smalltext"><strong><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></strong></td>
    				</tr>
    				{$clearstoredpass}
    			</table>
    		</td>
    		<td valign="top">
    			{$rules}
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder trow1" style="clear: both;">
    				{$selectall}
    				{$announcementlist}
    				<tr>
    					{$threads}{$nullthreads}
    				</tr>
    			</table>
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both;">
    				<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>
    		</td>
    	</tr>
    </table>
    <br style="clear: both;" />
    <br />
    <div class="float_right" style="text-align: right;">
    	{$inlinemod}
    	{$forumjump}
    </div>
    <br style="clear: both" />
    <div class="smalltext" align="center">
    	{$foruminfo['name']}<br />
    	Powered By <a href="http://mybbhacks.zingaburga.com/showthread.php?tid=288">XThreads</a> &ndash; <a href="http://mybbhacks.zingaburga.com">MyBB Hacks</a>
    </div>
    {$inline_edit_js}

    All filtering URL laid in this template. Modify it as our needs.

  9. brand_forumdisplay_threadlist_clearpass

    HTML Code
    <tr>
    	<td class="trow1 smalltext"><strong><a href="misc.php?action=clearpass&amp;fid={$fid}">{$lang->clear_stored_password}</a></strong></td>
    </tr>

  10. brand_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 smalltext">
    		<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. brand_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>

  12. brand_forumdisplay_thread_null

    HTML Code
    <td width="30%" valign="top">&nbsp;</td>

    Modify it as our needs. Probably we can put advertisement to this template.

  13. brand_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}{$thread_type_class}" id="rating_table_{$thread['tid']}">
    	<table>
    		<tr>
    			<td class="{$bgcolor}{$thread_type_class}">
    				<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>

  14. brand_postbit_first and brand_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
    75
    76
    77
    78
    79
    80
    81
    {$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']}">
    							{$GLOBALS['threadfields']['mimg']['value']}
    						</td>
    						<td class="post_author">
    							<table border="0" width="100%">
    								<tr>
    									<td valign="top" width="20%">{$lang->brand_name}</td>
    									<td width="1" valign="top">:</td>
    									<td valign="top">{$post['subject']}</td>
    								</tr>
    								<tr>
    									<td valign="top">{$lang->brand_price}</td>
    									<td width="1" valign="top">:</td>
    									<td valign="top">{$GLOBALS['threadfields']['price']}</td>
    								</tr>
    								<tr>
    									<td valign="top">{$lang->brand_style}</td>
    									<td width="1" valign="top">:</td>
    									<td valign="top">{$GLOBALS['threadfields']['style']}</td>
    								</tr>
    								<tr>
    									<td valign="top">{$lang->brand_gender}</td>
    									<td width="1" valign="top">:</td>
    									<td valign="top">{$GLOBALS['threadfields']['gender']}</td>
    								</tr>
    								<tr>
    									<td valign="top">{$lang->author}</td>
    									<td width="1" valign="top">:</td>
    									<td valign="top">{$post['profilelink']}</td>
    								</tr>
    							</table>
    						</td>
    					</tr>
    				</table>
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow2 post_content {$unapproved_shade}">
    				<div class="largetext" align="center"><strong>{$post['subject']}</strong></div>
    
    				<div class="post_body" id="pid_{$post['pid']}">
    					{$post['message']}
    				</div>
    				{$post['attachments']}
    				{$post['signature']}
    
    				<div class="post_meta" id="post_meta_{$post['pid']}">
    				{$post['iplogged']}
    				</div>
    			</td>
    		</tr>
    
    		<tr>
    			<td class="trow1 post_buttons {$unapproved_shade}">
    				<div class="author_buttons float_left">
    					{$post['button_email']}{$post['button_pm']}{$post['button_www']}{$post['button_find']}
    				</div>
    				<div class="post_management_buttons float_right">{$post['button_edit']}{$post['button_quickdelete']}{$post['button_quote']}{$post['button_multiquote']}{$post['button_report']}{$post['button_warn']}{$post['button_reply_pm']}{$post['button_replyall_pm']}{$post['button_forward_pm']}{$post['button_delete_pm']}
    				</div>
    			</td>
    		</tr>
    	</tbody>
    </table>

  15. brand_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
    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
    <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=1603"></script>
    </head>
    <body>
    {$header}
    {$pollbox}
    <div class="float_right">
    	{$newreply}
    </div>
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" width="100%" style="clear: both; border-bottom-width: 0;">
    	<tr>
    		<td width="60%" valign="top">
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0;">
    				<tr>
    					<td class="thead" colspan="2">
    						<div>
    							<strong>{$thread['subject']}</strong>
    						</div>
    					</td>
    				</tr>
    			</table>
    			<div>
    				{$first_post}
    			</div>
    			<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>
    		</td>
    		<td valign="top">
    			{$ratethread}
    			<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    				<tr>
    					<td class="thead">
    						<div><strong>{$thread['subject']} {$lang->brand_picture}</strong></div>
    					</td>
    				</tr>
    				<tr>
    					<td class="trow1" align="center">
    						<a href="{$GLOBALS['threadfields']['mimg']['url']}" target="_blank">{$GLOBALS['threadfields']['mimg']['value']}</a>
    						{$GLOBALS['threadfields']['bimg1']['value']}
    						{$GLOBALS['threadfields']['bimg2']['value']}
    						{$GLOBALS['threadfields']['bimg3']['value']}
    						{$GLOBALS['threadfields']['bimg4']['value']}
    						{$GLOBALS['threadfields']['bimg5']['value']}
    					</td>
    				</tr>
    			</table>
    			{$search_thread}
    		</td>
    	</tr>
    </table>
    <br />
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder" style="clear: both; border-bottom-width: 0; margin-bottom: -7px;">
    	<tr>
    		<td class="thead" colspan="2">
    			<strong>{$lang->replies}</strong>
    		</td>
    	</tr>
    	{$classic_header}
    </table>
    <div id="posts">
    	{$posts}
    </div>
    <div>
    	{$multipage}
    </div>
    <br style="clear: both;" />
    {$threadexbox}
    {$similarthreads}
    {$quickreply}
    <br />
    <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;" />
    <div class="smalltext" style="text-align: center;">
    	{$forum['name']}<br />
    	Powered by <a href="http://mybbhacks.zingaburga.com/showthread.php?tid=288">XThreads</a> &ndash; <a href="http://mybbhacks.zingaburga.com">MyBB Hacks</a>
    </div>
    {$footer}
    </body>
    </html>

  16. brand_showthread_noreplies

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    <table border="0" cellspacing="{$GLOBALS['theme']['borderwidth']}" cellpadding="{$GLOBALS['theme']['tablespace']}" class="tborder" style="clear: both; border-top-width: 0;" id="xthreads_noreplies">
    	<tr>
    		<td class="trow1">
    			{$GLOBALS['lang']->brand_no_replies}
    		</td>
    	</tr>
    </table>

  17. brand_showthread_ratethread

    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
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    	<tr>
    		<td class="thead">
    			<div><strong>{$thread['subject']} {$lang->rate_thread}</strong></div>
    		</td>
    	</tr>
    	<tr>
    		<td class="trow1" align="center">
    			<table width="100%" border="0">
    				<tr>
    					<td width="150">{$lang->brand_average_rating}</td>
    					<td width="1">:</td>
    					<td>
    						<script type="text/javascript" src="jscripts/rating.js?ver=1400"></script>
    						<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>
    				<tr>
    					<td>{$lang->brand_total_votes}</td>
    					<td width="1">:</td>
    					<td>{$thread['numratings']}</td>
    				</tr>
    			</table>
    		</td>
    	</tr>
    </table>
    <br class="clear" />

  18. brand_showthread_search

    HTML Code
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    <br class="clear" />
    <table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    	<tr>
    		<td class="thead">
    			<div><strong>{$lang->brand_search}</strong></div>
    		</td>
    	</tr>
    	<tr>
    		<td class="trow1" align="center">
    			<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>

  19. brand_forumdisplay_nothreads

    HTML Code
    <td colspan="{$colspan}" class="trow1">{$lang->nothreads}</td>



Additional Info:
  1. If we don't want thread rating there, just uncheck the Yes, allow threads to be rated setting in our Brand Directory forum settings.
  2. We can set another filter form for "advance" filter using select box, so user can filter thread more flexible, combining Gender and Style.
  3. We use language prefix for this (attached). Upload it to our inc/languages/english folder.
  4. We need Thread Tooltip Preview plugin for the article preview on thread list.
  5. Probably we need to create a newthread and editpost_first for "better" form submission.
  6. The templates above based on MyBB 1.6.3 templates.


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

Screenshot (using default theme):

1. Thread List:
Admin View - User View:
       

2. Showthread:
Horizontal - Classic
       

The layout depends on our themes.

Live Demo:
http://www.14.mynie.co.cc/forumdisplay.php?fid=15
Classic postbit layout:
http://www.14.mynie.co.cc/showthread.php?tid=403
Horizontal:
http://www.14.mynie.co.cc/showthread.php?tid=405
http://www.14.mynie.co.cc/showthread.php?tid=404


Attached File(s)
.7z  Brand Directory Language Files.7z (Size: 726 bytes / Downloads: 380)

(This post was last modified: 05-20-2011 07:05 AM by RateU.)
05-19-2011 10:18 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #5
RE: Request: Brand Directory
This looks fantastic, I'll try it on the weekend and report back! Cheers!
05-19-2011 10:36 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #6
RE: Request: Brand Directory
RateU with the excellent guides again! Biggrin

My Blog
05-19-2011 01:00 PM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #7
RE: Request: Brand Directory
He's seriously incredible. Can't believe the amount of knowledge amassed by this guy!
05-20-2011 12:01 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #8
RE: Request: Brand Directory
Hi, this is weird ...

When I view the source of the page it is totally different from the template you gave me for brand_forumdisplay_thread. I ensured many times it's entered properly. Ouch

http://harajuju.net/Forum-Brands
05-20-2011 04:30 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #9
RE: Request: Brand Directory
Are you sure you've created the brand_forumdisplay_thread_rating template?

05-20-2011 05:01 AM
Find all posts by this user Quote this message in a reply
brad-t Offline
Member
***
Posts: 120
Joined: Apr 2011
Post: #10
RE: Request: Brand Directory
Yup ...

http://i.imgur.com/WQl2z.png
05-20-2011 05:11 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: