Quantcast
Channel: MyBB Community Forums - Tutorials
Viewing all articles
Browse latest Browse all 690

[Tutorial] Cut Out Announcement Portal, without plugins, very fast and easy

$
0
0
[Image: EGlAze0.jpg]


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:
[Image: TohOuuF.png]
In this:
[Image: AQYmdmW.png]
Or in this, where we add a scroll bar:
[Image: maVJZRc.png]


Difficulty 2/10 tutorial Big Grin

Let's begin:
we will ACP -> Styles and Templates -> Your theme -> Portal -> "Portal_Announcement"

We seek:

PHP Code:
<p>
{
$message}
</
p


Replaced by:
PHP Code:
<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:
PHP Code:
{$post['attachments']} 

add:

PHP Code:
<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

Viewing all articles
Browse latest Browse all 690

Trending Articles