Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 xthreads request
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #6
RE: xthreads request
Here is for the forum display template.
I use xtfblp_ template prefix for this example:

xtfblp_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
<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="9">
			<div style="float: right;">
				<span class="smalltext"><strong><a href="misc.php?action=markread&amp;fid={$fid}">{$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="8">
			<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>
		{$inlinemodcol}
	</tr>
	{$selectall}
	{$threads}{$nullthreads}
	<tr>
		<td class="tfoot" align="right" colspan="9">
			<form action="forumdisplay.php" method="get">
				<input type="hidden" name="selectall" value="{$allselected}" />
				<input type="hidden" name="fid" value="{$fid}" />
				<select name="sortby">
					<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>
				</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}
	{$searchforum}
	{$forumjump}
</div>
<br style="clear: both" />
{$inline_edit_js}

Modify it as your needs.


xtfblp_forumdisplay_thread

HTML Code
1
2
3
4
5
6
7
8
9
10
11
12
<tr>
	<td class="{$bgcolor}{$thread_type_class}" colspan="{$colspan}">
		<div class="largetext">
			<a href="{$thread['threadlink']}" class="{$inline_edit_class} {$new_class}" id="tid_{$inline_edit_tid}">{$thread['subject']}</a>
			<div class="author smalltext">{$thread['profilelink']}</div>
		</div>
	</td>
	<td class="{$bgcolor}" valign="middle" align="center" width="150">
		<img src="images/english/newthread.gif" alt="" title="" />
	</td>
	{$modbit}
</tr>

Look at the image tags in line #9. Replace it with the Facebook Like button.

xtfblp_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
<html>
<head>
<title>{$lang->newthread_in}</title>
{$headerinclude}
<script type="text/javascript" src="jscripts/post.js?ver=1400"></script>
</head>
<body>
{$header}
{$thread_errors}
<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}" />
	<div style="width: 600px; margin: auto auto;">
		<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>
			<tr>
				<td class="trow2" width="20%">
					<strong>{$lang->thread_subject}</strong>
				</td>
				<td class="trow2">
					<input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" />
				</td>
			</tr>
			{$extra_threadfields}
			<tr style="display: none;">
				<td class="trow2" valign="top"><strong>{$lang->your_message}</strong>{$smilieinserter}</td>
				<td class="trow2">
				<textarea name="message" id="message" rows="20" cols="70" tabindex="2">{$message}</textarea>
				{$codebuttons}
				{$multiquote_external}
				</td>
			</tr>
			{$modoptions}
			{$captcha}
		</table>
		<br />
		<div style="text-align:center">
			<input type="submit" class="button" name="submit" value="{$lang->post_thread}" tabindex="4" accesskey="s" />
		</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}
	</div>
</form>
{$forumrules}
{$footer}
</body>
</html>


Screenshot for newthread. Edit post should be similar to this:
   

xtfblp_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
<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}
{$post_errors}
<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}" />
	<div style="width: 600px; margin: auto auto;">
		<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
			<tr>
				<td class="thead" colspan="2"><strong>{$lang->edit_post}</strong></td>
			</tr>
			<tr>
				<td class="trow2">
					<strong>{$lang->subject}</strong>
				</td>
				<td class="trow2">
					<input type="text" class="textbox" name="subject" size="40" maxlength="85" value="{$subject}" tabindex="1" />
				</td>
			</tr>
			{$extra_threadfields}
			<tr style="display: none;">
				<td class="trow2" valign="top">
					<strong>{$lang->your_message}:</strong><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>
		</table>
		<br />
		<div align="center">
			<input type="submit" class="button" name="submit" value="{$lang->update_post}" tabindex="3" accesskey="s" />
		</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="" />
	</div>
</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>


Next to showthread?
EDIT: The templates above based on MyBB 1.6


(This post was last modified: 11-07-2010 07:54 AM by RateU.)
11-07-2010 07:50 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
xthreads request - x-Treme - 11-07-2010, 06:32 AM
RE: xthreads request - RateU - 11-07-2010, 07:04 AM
RE: xthreads request - x-Treme - 11-07-2010, 07:11 AM
RE: xthreads request - RateU - 11-07-2010, 07:26 AM
RE: xthreads request - x-Treme - 11-07-2010, 07:32 AM
RE: xthreads request - RateU - 11-07-2010 07:50 AM
RE: xthreads request - x-Treme - 11-07-2010, 07:56 AM
RE: xthreads request - RateU - 11-07-2010, 08:09 AM
RE: xthreads request - x-Treme - 11-07-2010, 08:14 AM
RE: xthreads request - RateU - 11-07-2010, 08:22 AM
RE: xthreads request - x-Treme - 11-07-2010, 08:59 AM
RE: xthreads request - RateU - 11-07-2010, 09:03 AM
RE: xthreads request - x-Treme - 11-07-2010, 09:24 AM

 Standard Tools
Forum Jump: