Highlight posts with a button

Mick in Tutorials on Jul 31, 2018


Highlight pieces of text in your posts and other parts of your forum using a bbc button in SMF. A light background color will wrap your texts to call your users attentions. Useful for making lists, titles, rules page, etc. Very easy to implement in SMF with a few small edits.



Save this image:  and upload it to /Themes/your-theme/images/bbc folder.

The CSS:
Open ---->  /Themes/your-theme/css/index.css and at the very end add:

.highlight-text {
        background-color: #ffff88;
}

To change the highlight color, replace #ffff88; in the css file to suit your needs


Open  -----> /Themes/default/languages/Modifications.english.php and add before the ?>

$txt['highlight-text'] = 'Highlight';

Open ----->  /Sources/Subs-Editor.php and find:

            array(
                'image' => 'quote',
                'code' => 'quote',
                'before' => '[quote]',
                'after' => '[/quote]',
                'description' => $txt['bbc_quote']
            ),

Add after:

            array(
                'image' => 'highlight-text',
                'code' => 'highlight-text',
                'before' => '[highlight-text]',
                'after' => '[/highlight-text]',
                'description' => $txt['highlight-text']
            ),

Open ---->  /Sources/Subs.php and find:

            array(
                'tag' => 'table',
                'before' => '<table class="bbc_table">',
                'after' => '</table>',
                'trim' => 'inside',
                'require_children' => array('tr'),
                'block_level' => true,
            ),

Add before:

            array(
                'tag' => 'highlight-text',
                'before' => '<span class="highlight-text">',
                'after' => '</span>',
            ),







Tagged with:


Mick

Mick G

  idesignsmf.com

    

Mick is an American theme designer for Simple Machines Forum software currently living in South Florida, USA. He runs idesignSMF and started tinkering with SMF in 2006 where he created several SMF forums of his own before he founded idesignSMF in 2009 to which he is dedicated full time and has a weakness for Pizza.

  Connect with us:

     

  Improve SMF

If you wish to contribute to the development of SMF you can contribute to the coding discussions taking place on Github. You are also welcome to suggest features which you would like to see added to the software in the Feature Requests board.

  Receive our monthly newsletter right in your inbox.
Commitment issues? Unsubscribe at any time.

Get 100% complete access to our entire collection and find out why 11,202 SMF owners prefer our themes



0 Comments







  Find the right theme for you. Browse through our gallery of expertly-crafted free SMF themes to find the perfect one for your needs.