BuddyDev

Search

[Resolved] Remove the subject line requirement in messages?

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #17638

    Hi Brajesh, I read your answer in the resolved topic ‘Remove the subject line requirement in messages?’

    I am also looking for a way to remove the subject line, but I am not sure how.

    This was the solution you provided:

    You may use the following js(in document ready block) to add the subject on your own

    jQuery(‘#send_message_form’).submit( function() {
    jQuery(‘#subject’).val(“Some message subject”);
    });

    Where do I find the ‘document ready block’ to put in the js?

    Regards
    Carsten

  • Participant
    Level: Enlightened
    Posts: 89
    Graham Hoffman on #17639

    If there are any issues (I believe BP requires the title to be entered before sending?) there is a plugin called BP Better Messages that enables you to remove the Message Title functionality.

    https://wordpress.org/plugins/bp-better-messages/

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #17640

    Hi Graham, thanks for your reply, I appreciate it.

    I know the Better Messages plugin, which have many desirable features, among them that the subject is gone. Another great thing is the design and audio message notification.

    The problem with the plugin is, that it is not just an visual and functional improvement of the BP component, it substitutes it, with the disadvantages it causes.

    Regards
    Carsten

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #18883
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #18892

    Hi Carsten,
    You can put that in your theme’s javascript file. Look for js file in your theme.

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #18907

    Hi Brajesh, thanks for your answer.

    In the js folder are a number of js files, do I put it in one of the existing files, or do I create a new one, and in that case, what do I call that js file?

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24706
    Brajesh Singh on #18920

    Hi Carsten,
    If you ceate a js file, you will need the code to load it too.

    Since it is just 2 lines of code, My suggestion will be to put it in one of the js file provided by theme. Look for a file named buddypress.js and you can put the code inside the dom ready section there. If you are using a custom theme, you may ask there(or check their documents) to see if there is any custom js file supported.

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #18955

    Hi Brajesh, I am using the GeneratePress, and I have don some research on adding custom js to the theme. There are no buddypress.js file, the developers recommend to use GP Hooks , which is part of the GP Premium add-ons.

    I am not using their Premium Add ons, so are there no other standardized way of adding js code to a theme?

    Regards
    Carsten

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #18956

    Hi again I bought the GP Premium so the problem is solved, I hope.

    Regards
    Carsten

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #18957

    I copied

    <script>

    jQuery(‘#send_message_form’).submit( function() {
    jQuery(‘#subject’).val(“Some message subject”);
    });

    </script>

    into the custom hook option in the theme, but the ‘subject’ is still showing?

    Regards
    Carsten

The topic ‘[Resolved] Remove the subject line requirement in messages?’ is closed to new replies.

This topic is: not resolved