Thread List Modification
Kylin Offline
Junior Member
**
Posts: 8
Joined: Jan 2013
Post: #1
Thread List Modification
Hello all! I'm in the process of updating a portion of my site and I'm hoping for a little help. I'm presently using Xthreads for one particular forum section and I'm looking to renovate said section even further.

Here's what the section currently looks like:
[Image: LSHallCurrent.png]

Here's what I'm trying to get it to look like (just a quick concept thrown in Paint rather messy-like):
[Image: LSHallConcept.png]

Basically, I'm trying to rearrange the section in a more grid-like manner rather than MyBB's normal linear manner. I also wish to divide the section up into subsections based on which server is selected when creating the post. For example, someone clicks "Server X" while making a new thread and the new thread will automatically get categorized in that subsection. In the above concept art, there are only 3 such subcategories (which is all I intend on using).

Hopefully that came across clearly and wasn't overly confusing Ouch . Assuming people understand what I'm trying to achieve, is this possible? And any ideas on how to achieve it?

Below is my code for the forumdisplay_threadlist template for this particular section:

PHP 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
 <div class="float_left">
	{$multipage}
</div>
<div class="float_right" style="margin-bottom: 14px;">
	{$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>{$foruminfo['name']}</strong>
			</div>
		</td>
	</tr>
	<tr>

		<td class="tcat" colspan="1" width="1"></td>
		<td class="tcat"><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="70"><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="70"><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="160"><span class="smalltext"><strong><a href="{$sorturl}&amp;sortby=lastpost&amp;order=desc">{$lang->lastpost}</a> {$orderarrow['lastpost']}</strong></span></td>
		{$inlinemodcol}
	</tr>
	{$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: 14px;">
	{$newthread}
</div>
<br style="clear: both;" />
<br />
<div class="float_left" style="width: 400px;">
	<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
		{$moderatedby}
                {$usersbrowsing}<br />
	</table>
</div>
<div class="float_right" style="text-align: right;">
	{$inlinemod}
	{$searchforum}
	{$forumjump}
</div>
<br style="clear: both" />
{$inline_edit_js}

07-19-2013 02:20 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Thread List Modification
So do you know the HTML required to do this?

My Blog
07-22-2013 10:00 AM
Find all posts by this user Quote this message in a reply
Kylin Offline
Junior Member
**
Posts: 8
Joined: Jan 2013
Post: #3
RE: Thread List Modification
Whoops. Here's the html for the current layout (forumdisplay_thread)

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<tr>
	<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%">{$GLOBALS['threadfields']['timg']['value']}</td>
	<td class="{$bgcolor}{$thread_type_class}">
		{$attachment_count}
		<div>
			<span>{$prefix} {$gotounread}{$thread['threadprefix']}<span class="ls_text"><a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a></span>{$thread['multipage']}</span>
			<div class="author smalltext">{$thread['profilelink']}</div>
		</div>
	</td>
	<td align="center" class="{$bgcolor}{$thread_type_class}"><a href="javascript:MyBB.whoPosted({$thread['tid']});">{$thread['replies']}</a>{$unapproved_posts}</td>
	<td align="center" class="{$bgcolor}{$thread_type_class}">{$thread['views']}</td>
	{$rating}
	<td class="{$bgcolor}{$thread_type_class}" >  
<span><a href='{$flp_lastpost['profile']}' title='Lastpost by {$flp_lastpost['username']}'><img src='{$flp_lastpost['avatar']}' {$flp_lastpost['dimensions']} alt='' align="right" /></a></span>
<span class="lastpost smalltext">{$lastpostdate} {$lastposttime}<br />
		<a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
	</td>
{$modbit}
</tr>


It's mostly a matter of properly moving stuff around to get the layout I want (the second-grid like appearance). I'm struggling a bit with it and it's mostly trial and error at the moment.

(This post was last modified: 07-24-2013 03:16 AM by Kylin.)
07-24-2013 03:04 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: Thread List Modification
The only XThreads specific feature you really need to worry about is the Thread Grouping option (under the forum's settings).
And of course its related templates:
Quote:forumdisplay_group_sep and forumdisplay_thread_null - for use with thread grouping; defaults to nothing

I'm not going to give any help on actual HTML code - you need to figure that out yourself.  If you're not familiar with HTML, I suggest focusing on how the HTML <table> element works.  Conceptually, each thread is a table cell.

My Blog
07-24-2013 09:57 AM
Find all posts by this user Quote this message in a reply
Kylin Offline
Junior Member
**
Posts: 8
Joined: Jan 2013
Post: #5
RE: Thread List Modification
Got everything figured out. For those interested, the xthreads gallery mod here is actually really helpful in achieving the above desired results.

I am still stuck on one tiny thing though, and I could have sworn xthreads had a built in feature for that but perhaps I'm mistaken. I'd like to remove pagination for this particular forum section and have all threads on a single page rather than span multiple pages. Is this possible? Or is the only way around it to modify the entire forum's pagination settings? I see an override posts per page setting, but not an override threads per page setting.
(This post was last modified: 07-26-2013 07:12 AM by Kylin.)
07-26-2013 07:08 AM
Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #6
RE: Thread List Modification
(07-26-2013 07:08 AM)Kylin Wrote:  override threads per page setting.

You can use Settings Overrides feature.

07-26-2013 07:28 AM
Find all posts by this user Quote this message in a reply
Kylin Offline
Junior Member
**
Posts: 8
Joined: Jan 2013
Post: #7
RE: Thread List Modification
Aha, I've never even bothered to look at that setting and for some reason figured it was for something else entirely. Problem solved. Thanks!
07-26-2013 07:40 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: