MyBB Community Forums

Full Version: Text in the middle under similarthreads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I'm asking a question on behalf of a friend and he's using the latest version of MyBB.

He wonders how to enter this text that is shown in the picture in the middle. He wants to have this centered but finds nothing under Templates. He uses similarthreads.

[Image: vwNAEPC.png]

How to enter text, time, users in the middle and then under Last post?
(2022-05-21, 11:36 AM)OakleY Wrote: [ -> ]Hello, I'm asking a question on behalf of a friend and he's using the latest version of MyBB.

He wonders how to enter this text that is shown in the picture in the middle. He wants to have this centered but finds nothing under Templates. He uses similarthreads.

[Image: vwNAEPC.png]

How to enter text, time, users in the middle and then under Last post?

not sure about similarthreads as there was no link to such provided in post to have a look at it if you are speaking on a plugin, but I assume you mean show thread setting similar threads table? Well, for that as well as other last post areas there are several ways in general one could do this, though one way in general to get the desired result he could just do something simple for example like:

[attachment=45160]

Wrapping such in a div with inline styling:

    <div class="text-center" style="text-align:center;"></div>

For last post you pointed to in image:

I assume you meant similarthreads as in similarthreads table in show thread?

[attachment=45161]

If so then:

Edit Template: showthread_similarthreads_bit

Find:

{$lastpostdate}<br />
			<a href="{$similar_thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}

Wrap in div:

<div class="text-center" style="text-align:center;">{$lastpostdate}<br />
			<a href="{$similar_thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</div>

Now for same in forumbit last post:

[attachment=45162]

Edit Template: forumbit_depth2_forum_lastpost

Find:
<a href="{$lastpost_link}" title="{$full_lastpost_subject}"><strong>{$lastpost_subject}</strong></a>
   <br />{$lastpost_date}<br />{$lang->by} {$lastpost_profilelink}

Wrap in div:
    <div class="text-center" style="text-align:center;">
       <a href="{$lastpost_link}" title="{$full_lastpost_subject}"><strong>{$lastpost_subject}</strong></a>
   <br />{$lastpost_date}<br />{$lang->by} {$lastpost_profilelink}</div>

For same in threadlist lastpost:

[attachment=45163]

Edit Template: forumdisplay_thread

Find:
 <span class="lastpost smalltext">{$lastpostdate}<br />
 <a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>

Wrap in div:
   <div class="text-center" style="text-align:center;">
 <span class="lastpost smalltext">{$lastpostdate}<br />
 <a href="{$thread['lastpostlink']}">{$lang->lastpost}</a>: {$lastposterlink}</span>
 </div>

or you could remove the inline text styling

ie:
<div class="text-center" style="text-align:center;">

to:
<div class="text-center">

and define the text alignment for div via css in stylesheet:
.text-center {
  text-align:center;
}

Best of luck.
Great...

Thanks, it worked
(2022-05-22, 05:23 AM)OakleY Wrote: [ -> ]Great...

Thanks, it worked

No worries, happy to help.