Latest topics - AwesomeBB

Go down

Latest topics - AwesomeBB

Post by pedxz on August 29th 2018, 7:39 am

Latest topics - AwesomeBB

We know that the AwesomeBB version is in beta and do not have widgets yet, so I made a simple code so we have a widget - Latest topics.

Author: pedxz
Working forum versions: Only AwesomeBB

Installation

The installation is unique, and can only be done by creating a new javascript. CSS can be modified, and is embedded in Javascript. Please follow the steps below to install the effect on your community.

ACP > Modules > HTML and Javascript > Javascript codes management > Create a new javascript

Placement: In the home page

The code:
Code:
/**
 *  Latest topics - AwesomeBB by Pedxz
 *  Created August 26, 2018 <1.0>
 *  See more: http://ajuda.forumeiros.com
*/
$(function() {
 
    var title = 'Latest Topics', empty = 'At the moment we are without messages or you are not allowed to see them!', last = $('<div>', {
        id: 'block-latest',
        class: 'block-subtle'
    }).append(
        ' <i class="material-icons">chat_bubble_outline</i>' +
        ' <div>' +
        ' <span class="headline">' + title + '</span>' +
        ' <div class="block-last-load"></div>' +
        ' </div>'
    );
 
    if (_board.tpl_version !== 'awesomebb') return;
 
    $(last).insertBefore('#block-online');
 
    $('#block-latest .block-last-load').load('/latest .block-topics-details');
 
    $('head').append(
        '<style type="text/css">' +
        '.block-last-load:empty::before {' +
        ' content: "'+ empty +'";' +
        '}'+
        '#block-latest i {' +
        ' color: #BF263C;' +
        '}' +
        '.block-last-load {' +
        ' margin-left: -.37em;' +
        ' margin-right: -.37em;' +
        ' height: 300px;' +
        ' overflow-y: auto;' +
        '}' +
        '.block-last-load a {' +
        '  text-decoration: none;' +
        '  border: 0!important;' +
        '  display: inline;' +
        '}' +
        '.block-last-load .block-topics-details {' +
        ' padding: 1em;' +
        '}' +
        '.block-last-load .block-topics-details:not(:nth-child(2n+1)) {' +
        ' background-color: #F5F7FA;' +
        '}' +
        '#block-latest h2 {' +
        ' font-size: 16px;' +
        ' text-overflow: ellipsis;' +
        ' overflow: hidden;' +
        ' white-space: nowrap;' +
        ' width: 100%;' +
        '}' +
        '#block-latest .block-topics-author,' +
        '#block-latest .block-topics-lastpost img {' +
        '  display: none;' +
        '}' +
        '#block-latest .block-topics-lastpost,' +
        '#block-latest .block-topics-author a {' +
        '  display: inline;' +
        '}' +
        '@media only screen and (max-width: 768px) {' +
        ' #block-latest {' +
        '  margin-top: 20px;' +
        ' }' +
        '}' +
        '</style>'
    );
 
});

Details

If the widget is appearing blank for the guests, go to ACP > Users & Groups > Special Rights and make sure the search option is authorized for the guests.

avatar
pedxz
Forumember

Male Posts : 158
Reputation : 32
Language : speaker daemonium & português
Location : Portugal

https://ajuda.forumeiros.com/u62843

Back to top Go down

Re: Latest topics - AwesomeBB

Post by mpelmmc on August 29th 2018, 4:04 pm

Thank you so much for sharing @pedxz. This will be indeed very useful thumleft



Rules of the forum - Frequently Asked Questions - Have you lost your password?
Please mark the "solved" button if your problem/doubt has been solved.
avatar
mpelmmc
Support Moderator
Support Moderator

Male Posts : 898
Reputation : 137
Language : English and Spanish

https://help.forumotion.com/

Back to top Go down

Re: Latest topics - AwesomeBB

Post by TonnyKamper on August 29th 2018, 11:13 pm

Awesome @pedxz Yes
avatar
TonnyKamper
Forumember

Female Posts : 359
Reputation : 27
Language : Dutch/English
Location : The Netherlands

http://www.nederlandheelt.nl/forum

Back to top Go down

Re: Latest topics - AwesomeBB

Post by Mr.Winni on November 18th 2018, 12:46 pm

thank you so much pedxz
avatar
Mr.Winni
New Member

Male Posts : 22
Reputation : 4
Language : Vietnamese, English, Chinese
Location : Viet Nam

http://dntg.forumotion.com

Back to top Go down

Re: Latest topics - AwesomeBB

Post by CAForum on November 26th 2018, 12:33 am

Hi,
Thank you for this script however the list of the last subjects is fixed, is it possible to modify the script to have a scrolling of the last subjects?
avatar
CAForum
New Member

Male Posts : 10
Reputation : 2
Language : Français
Location : Paris

https://lesforums.caforum.fr/

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum