MyBB Community Forums

Full Version: 30 Most Recent Posts
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
I'm looking to replace the current 'getnew' page with the 30 most recent posts in thread list format.

I've put the code from here in index.php just not sure what to do now: http://community.mybb.com/thread-110658.html

My Board is here: http://thetflforum.co.uk.previewdns.com/forum

Any help would be appreciated Smile.

Thanks
Anyone able to help? Smile
Anyone able to help here?
Ah Kyle Big Grin

What exactly is the issue?

Do you want these on a new page? Or on the index in a sidebar?

If a new page this post may hold a solution:

http://community.mybb.com/thread-120138-...#pid868062
Well hello again Big Grin

And you've done it again, that was exactly what I was looking for. I would like to make some edits though if you could help me.

I want the layout to match that of a thread list in the forums, so: thread status icon, thread icon, subject/ author, replies, views, last post and I don't want avatars displayed. If you could help me do this I'd very much appreciate it Smile.
Well, that would require changing the query fairly significantly to get the thread status icon, the rest is doable I think.

You basically want it to look like forum display but with threads from all forums, right?
Yes I want it to look like forum display but do the same function it does now which is of course recent posts from all forums.

If you're unable to get the status icons then it's not important Smile.
Ok, I will look what I need to do to get this to work and look like a faux forumdisplay.

Stay tuned.
Kyle, can you help me out here by posting two of your templates:

Forumdisplay threadlist and forum display thread?

Thank you.
No problem:

Forumdisplay_threadlist:
<div class="float_left">
	{$multipage}
</div>
<div class="float_right">
	{$newthread}{$deletebutton}
</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="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}{$deletebutton}
</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;">
<table width="100%" cellpadding="{$theme['tablespace']}" cellspacing="0" align="center">
<tr>
<td width="33%" class="trow1" vAlign="top" align="left">
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=213595605359066&xfbml=1"></script><fb:like href="" send="true" layout="button_count" width="150" show_faces="false" font=""></fb:like>
</td>
<td width="23%" class="trow1" vAlign="top" align="left">
<a href="http://twitter.com/share" class="twitter-share-button" data-count="horizontal" data-via="TheTFLforum">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</td>
<td width="23%" class="trow1" vAlign="top" align="left">
<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>
<g:plusone size="medium"></g:plusone>
</td>
<td width="23%" class="trow1" vAlign="top" align="left">
<script src="http://www.stumbleupon.com/hostedbadge.php?s=2"></script>
</td>
</tr>
</table></br>
	{$inlinemod}
	{$searchforum}
</div>
<br style="clear: both" />
{$inline_edit_js}

forumdisplay_thread:
<tr tr:hover td {background-color:#000;}>
	<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%"><img src="{$theme['imgdir']}/{$folder}.gif" alt="{$folder_label}" title="{$folder_label}" /></td>
	<td align="center" class="{$bgcolor}{$thread_type_class}" width="2%">{$icon}</td>
	<td class="{$bgcolor}{$thread_type_class}" onclick="window.location.href='showthread.php?tid={$thread['tid']}';" style="cursor: pointer;">
		{$attachment_count}
		<div>
			<span>{$mysupport_status}{$mysupport_bestanswer}{$mysupport_assigned}{$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>
	</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>
Pages: 1 2 3 4 5