2015-04-28, 02:48 AM
Hi, this is a pretty simple tutorial to cut threads in the Mybb portal without using any plugin and like different outcome to every webmaster.
To transform this:
In this:
Or in this, where we add a scroll bar:
Difficulty 2/10 tutorial
Let's begin:
we will ACP -> Styles and Templates -> Your theme -> Portal -> "Portal_Announcement"
We seek:
<p>
{$message}
</p>
Replaced by:
<p style="height: 450px; overflow: hidden;">
{$message}
</p>
Detail this part to do this automatically topics shown on the site are cut to a size of 450px in this part obviously we change the size to which every webmaster prefer, with the value "overflow" have 2 options to customize as you see the topic on the site, using the "Hidden" option the issue would be cut in the assigned measure, in this case 450px, whether this image / mycode, or text, it is trimmed, but without deforming the code or the portal the second option is to use the "overflow" with the "Auto" value, in this way we obtain another alternative, which is also good looking, and that adds a scrollbar us where we can give a quick glance at the posted topic.
view images for reference.
Now as the final part we add an option to give us the "Read More / Comment" button, this will simply add this code:
Below it, or continued:
{$post['attachments']}
add:
<div><strong><a href="{$mybb->settings['bburl']}/{$announcement['threadlink']}"> Read More / Comment</a></div>
Thus we add the "option / button" to go to the complete topic.
This method is new to me, and I always wanted to shorten portal Mybb issues but did not know how, and now was making a new theme for Mybb and trying to achieve this,
hopefully will be useful.
Greetings.
Translated with Google.
Credits: [1.8] Recortar anuncios del portal sin plugin, rapido y muy facil & XEDE