Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Shamim Hasan

    (@shamim51)

    I’m sorry – I went to the link to read about this and posted my own question, without realizing it was a Resolved thread. Forgive me for not paying attention.
    Here is my question, copied from that thread:

    I was trying the above code out on my site. I use Ultimate Member plugin, and it has custom profile display pages. I added the code to the bottom of the user profile page, (from above)

    <a href='<?php echo fep_action_url("newmessage&to=USERLOGIN&message_title= TITLE") ?>'>Send Message</a>

    but rather than seeing “Send Message” it shows this instead:

    0 new message and 0 new announcement

    with the 0 new messages being a link which goes to an error page, and the 0 new announcement is also a link which will go to the PM area to send a message – but I still have to open a new message and type the user’s name.

    I need the ability to send a message to the member right from their profile page. Since it looks like I’ll use this Front End PM plugin, it makes sense to invest in it to make it work. ??

    Can you help?

    Plugin Author Shamim Hasan

    (@shamim51)

    you can contact with me through https://shamimbiplob.wordpress.com/contact-us/

    I also use Ultimate Member and would like to do exactly what Mr. Brown is doing. Wonder if there was a solution to this?
    Thank you!

    Did you get this to work?

    Yes, I contacted plugin author like he asked, and I made a Donation for the support.

    I use Ultimate Member and am trying to do this exact same thing. Could anyone explain how to do this?

    I left a message on the developer’s site (and would be happy to make a donation there to get the answer), but my message was ignored. Any help would be appreciated.

    Honestly, I couldn’t get it to work, so I got the Ultimate Member Private Messages plugin that integrates perfectly.

    Thanks, esayer. I will probably end up doing the same thing.

    Plugin Author Shamim Hasan

    (@shamim51)

    I am very busy now a days. So i could not support you. @dysschord (Michael Eric Brown) you can share your code which i have given to you with others if you do not mind. I do not have enough time now to think again and write those codes.

    The code that works for me that Shamim wrote for me is as follows:

    function fep_link_after_profile_pic()
        {
            global $user_login;
    
            if ( $user_login && $user_login != um_profile('user_login'))
                {
                    echo "<p><a class='fep-button' href='".fep_query_url('newmessage', array('to' => um_profile('user_login')))."'>".__('Contact this User', 'fep').'</a></p>';
                }
        }
    
    add_action('um_profile_header', 'fep_link_after_profile_pic');

    @shamim51 and @dysschord – Thank you both.

    Unfortunately, this code doesn’t seem to work for me. I end up with blank user profiles. I’ll keep fiddling with it, and hopefully I’ll be able to make it work.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Message to user button’ is closed to new replies.