• Jack

    (@jack1132132)


    Hello,

    I’m applying a different color to some of my messages depending on their content. I add the class “donation-msg” to messages attached to donations and I apply a yellow color to theses messages using the following CSS:

    
    .bm-message.my .bm-message-content:has(.donation-msg) {
    	background: yellow !important;
    }
    
    .bp-messages-wrap .bm-messages-list .bm-list .bm-messages-stack.bm-right-side .bm-content .bm-messages-listing .bm-message .bm-message-content:not(.bm-hide-background):has(.donation-msg) span{
    	color: black !important;
    }

    Since there has been some changes to the class names, I’m needing to change these for updates.
    Are there any hooks that facilitate applying css different messages?
    I see there’s a new hook listed on the change log called “better_messages_filter_message_content_overwrite”, but I can’t find it in the code of the latest release.


    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Jack

    (@jack1132132)

    Nevermind, I didn’t update it properly. The hook is present.

    But is there anyway to filter the element with the bm-message class?


    Thank you.

    • This reply was modified 1 year, 10 months ago by Jack.
    Plugin Author wordplus

    (@wordplus)

    Hi there!

    To filter messages class, it can be done only from frontend with javascripts. I can add hook in future versions.

    Thread Starter Jack

    (@jack1132132)

    @wordplus Is there any change to add a hook inside handle_upload in addons/files.php to allow for customized permissions and charging of messages containing attachments?


    Thank you.

    Plugin Author wordplus

    (@wordplus)

    Hi there!

    Hooks will be added to next update.

    Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Applying different styles to messages’ is closed to new replies.