• Resolved heArt-coder

    (@heart-coder)


    Hi
    Trying to customize some parts of the frontend of theme and successfully added filter

    add_filter( 'bp_better_messages_current_template', 'overwrite_bp_better_messages_template', 10, 2 );
    function overwrite_bp_better_messages_template( $path_to_template, $template ){
    
        if( $template === 'layout-index.php' ) {
            $template_path = get_stylesheet_directory() . '/skins/default/plugins/bp-better-messages/views/layout-index.php';
        }
    
        return $template_path;
    }

    Changes i made appear but any ajax link that i click throws 500 error. Disabled every other plugin, went back to main theme and also tried with twentytwentytwo… nothing works. Can you please check this…

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author wordplus

    (@wordplus)

    Hi there!

    This filter is well tested and should work well, should be some error in your code.

    But with better messages 2.0 it will not work anymore, since the app will be rendered in frontend, so its probably not makes any sense to use it.

    Thanks!

    Thread Starter heArt-coder

    (@heart-coder)

    Changes i want to make is actually very simple.
    Only icons for buttons are not understandable for older audience so i want to add titles beside icons.
    Also wanted to remove emojis since it’s not appropriate for professional intranet.
    I believe both of this should be on options because it would make sense for a lot of other users of this plugin.
    What is your recommendation to achieve these changes? Is there hooks that i can use or should I do it with JavaScript?

    Thanks for fast answer

    Plugin Author wordplus

    (@wordplus)

    I think the easiest way in your case is to use CSS to overwrite icons styling.

    You can also add labels to them using pseudo CSS selectors, I have example here:
    https://www.wordplus.org/knowledge-base/how-to-add-text-to-the-new-thread-button/

    The same I would recommend to do with Emoji Selector – just hide it with CSS, as in 1st version its hard coded to plugin code. Probably will make it switchable in upcoming version.

    Thread Starter heArt-coder

    (@heart-coder)

    Yes used css content for titles and found that Emoji Selector is all over js. Had to clean js since i don’t want external image loading parts to run because i am going to use it on offline intranet portal.

    You are adding a lot of cool stuff that needs websocket but i hope you keep basic stuff on server in the future.

    Thanks for answers and wish you the best

    Plugin Author wordplus

    (@wordplus)

    Hi there!

    The main staff all at your server, the websocket only used to transit some data ??

    Probably will release more advanced AJAX version after 2.0 release.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Replacing plugin templates with your own throws 500 error’ is closed to new replies.