MyBB Community Forums

Full Version: Show Latest threads on Portal page Horizontal
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello,,

How can I show latest threads in middle (center) on portal.php full width?

Structure

(on left side)

[title, username, date]

Thread name Full
by
date


(on right side)

[last post, replies, views]

time
by

replies
views


It can be same as shown in thread list page. Just I want to show the same on portal page instead on announcements.
Anybody?
well i use plugins to do such things
Most Recent Posts Stats
and
Last Threads
u can see how it looks on my site
http://shaanse.com/Forum/
i hope it helped Smile
You dont need a plugin. You need to move the latestthreads block to the middle in your portal.php (where the announcements are now) and edit the latests threads and latests threads thread templates to fit a wider space
(2014-12-30, 11:37 AM)Leefish Wrote: [ -> ]You dont need a plugin. You need to move the latestthreads block to the middle in your portal.php (where the announcements are now) and edit the latests threads and latests threads thread templates to fit a wider space

How can I do this? Can you post the code as I am not a coder.
paste your latest threads and portal templates here and I will look
portal.php

<html>

 <head>

 <title>{$mybb->settings['bbname']}</title>

 {$headerinclude}

 </head>

 <body>

 {$header}

 <table width="100%" cellspacing="0" cellpadding="{$theme['tablespace']}" border="0" align="center">

 <tr><td valign="top" width="200">

 {$welcome}

 {$pms}

 {$search}

 {$stats}

 {$whosonline}

 </td>

 <td>&nbsp;</td>

 <td valign="top">

 {$announcements}

 {$latestthreads}

 </td>

 </tr>

 </table>

 {$footer}

 </body>

 </html>

portal_latestthreads

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead"><strong>{$lang->latest_threads}</strong></td>
</tr>
{$threadlist}
</table>
<br />

portal_latestthreads_thread

<tr>
<td class="{$altbg}">
<strong><a href="{$mybb->settings['bburl']}/{$thread['threadlink']}">{$thread['subject']}</a></strong>
<span class="smalltext"><br />
<a href="{$thread['lastpostlink']}">{$lang->latest_threads_lastpost}</a> {$lastposterlink}<br />
{$lastpostdate} {$lastposttime}<br />
<strong>&raquo; </strong>{$lang->latest_threads_replies} {$thread['replies']}<br />
<strong>&raquo; </strong>{$lang->latest_threads_views} {$thread['views']}
</span>
</td>
</tr>
Portal latestthreads;

<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="5"><strong>{$lang->latest_threads}</strong></td>
</tr>
<tr>
		<td class="tcat" width="50%"><span class="smalltext"><strong>Subject</strong></span></td>
                 <td class="tcat" align="left" width="16%"><span class="smalltext"><strong>{$lang->forum}</strong></span></td>
		<td class="tcat" align="center" width="7%"><span class="smalltext"><strong>{$lang->latest_threads_replies}</strong></span></td>
		<td class="tcat" align="center" width="7%"><span class="smalltext"><strong>{$lang->latest_threads_views}</strong></span></td>
		<td class="tcat" align="right" width="20%"><span class="smalltext"><strong>{$lang->latest_threads_lastpost}</strong></span></td>
	</tr>
{$threadlist}
</table>
<br />

portal_latestthreads_thread

<tr>
<td class="{$altbg}"><strong><a href="{$mybb->settings['bburl']}/{$thread['threadlink']}">{$thread['subject']}</a></strong></td>
<td class="{$altbg}" align="left"><a href="{$thread['forumlink']}">{$thread['forumname']}</a></td>
<td class="{$altbg}" align="center">{$thread['replies']}</td>
<td class="{$altbg}" align="center">{$thread['views']}</td>
<td class="{$altbg}" align="right"><a href="{$thread['lastpostlink']}">{$lang->latest_threads_lastpost}</a> {$lastposterlink}<br />
{$lastpostdate} {$lastposttime}</td>
</tr>
Hey, thank you so much for the code. Its working. Can i show the full subject message, as of now it is showing only limited characters.?
Also, on the left side below subject can we add thread starter name and date?
The setting for the number of characters is hardcoded in portal php, for thread starter and date, you need a plugin or to edit portal.php (I don't know if it is already getting the variables but I don't think so).

In all fairness, what you asked for was a plugin (that would show all those things) - so you can try a plugin that gets all that data and restyle the templates for it like I did for latest threads.
Pages: 1 2