Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
DesignzShop Posted November 28, 2019 Posted November 28, 2019 Hello, I'm adding a send message button in the stock records display template in pages. I can't seem to get the message to display the article posters name when the message pop up comes up. I'm using this code here <a href='{url="app=core&module=messaging&controller=messenger&do=compose&to={$member->member_id}" seoTemplate="messenger_compose"}' data-ipsDialog data-ipsDialog-title='{lang="compose_new"}' data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="message_sent"}" class='ipsButton ipsButton_primary ipsButton_small'><i class='fa fa-envelope'></i> <span> {lang="message_send"}</span></a> Any help would be very appreciated. Kind regards
Daniel F Posted November 28, 2019 Posted November 28, 2019 Where's $member coming from? Do you mean the record author? Have you tried $record->author()->member_id ?
DesignzShop Posted November 28, 2019 Author Posted November 28, 2019 Yes, I mean record author. I have this working perfect Daniel except it doesn't auto-fill the authors name into the pop up,, I'll attach a screen in just s sec Ok,, in screen 1 is what I have but when I click the message box, I need to autofill the username into where I have the arrow pointing below
Daniel F Posted November 28, 2019 Posted November 28, 2019 It works for me with <a href='{url="app=core&module=messaging&controller=messenger&do=compose&to={$record->author()->member_id}" seoTemplate="messenger_compose"}' data-ipsDialog data-ipsDialog-title='{lang="compose_new"}' data-ipsDialog-remoteSubmit data-ipsDialog-flashMessage="{lang="message_sent"}" class='ipsButton ipsButton_primary ipsButton_small'><i class='fa fa-envelope'></i> <span> {lang="message_send"}</span></a>
DesignzShop Posted November 28, 2019 Author Posted November 28, 2019 Much LOVE to you today Daniel,, much much much... Thank you so very much
Daniel F Posted November 28, 2019 Posted November 28, 2019 Just now, DesignzShop said: Much LOVE to you today Daniel,, much much much... Thank you so very much Was my guess correct? Was it because you used $member which wasn't in the scope or was it something else?
DesignzShop Posted November 28, 2019 Author Posted November 28, 2019 3 hours ago, Daniel F said: Was my guess correct? Was it because you used $member which wasn't in the scope or was it something else? You were correct Daniel 🙂 It works a charm now!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.