• Resolved carmex

    (@carmex)


    Hello!

    I have created a member directory and added some additional fields to it. I’d also like to add a ‘Chat with me’ function to each member in the list, on the list its self. I can get this working just fine on the users profile page, but I can’t pull that users ID though for the listings.

    Below shows where I need to add it.

    <a href="javascript:void(0)" onclick="javascript:jqcc.cometchat.chatWith('[USER ID HERE]');">Chat with me</a>

    I’ve tried just about everything, but no use. I either get an error, or the field returns blank.

    For info trying to integrate comet chat. Client wants the voice and video calling they provide.

    Any help much appreciated.

    Cheers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @carmex

    You will need to copy the file plugins/ultimate-member/templates/members-grid.php to your theme /themes/your-theme/ultimate-member/members-grid.php

    Once copied to the theme, in the /themes/your-theme/ultimate-member/members-grid.php you can add the custom chat button/anchor like this:

    <a href="javascript:void(0)" onclick="javascript:jqcc.cometchat.chatWith({{user.id}});">Chat with me</a>

    It should be added after the loop:
    <# _.each( data, function( user, key, list ) { #>

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hey there!

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread by changing the Topic Status to ‘Not Resolved’ if any other questions come up and we’d be happy to help. 🙂

    Regards,

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Insert user_id into to member-list.php’ is closed to new replies.