I'm working on adding a @ mention link that appears next to each poster's name in threads so that users can mention them by clicking the link without having to type their names out manually.
Currently if you click the @ symbol it loads to the main page, and then if you press the 'Back' button it will load the page you were just on and in the QuickReply box the user's name will be added that you mentioned.
Where I need help is getting it to function that way without navigating away from the page you're on, so that users don't have to press the 'Back' button as that is more time-consuming than manually typing their names out.
Currently the code being used is as follows:
I've tried adding things like return false; to prevent navigating away and also adding {$requestPaths.requestUri} to the href (which reloads the current page instead of the main page) in message_user_info but neither adds the user's name being mentioned to the QuickReply box.
If any HTML or JavaScript gurus have ideas, feel free to share them below.
I'm not seeking to add Java files or other resources to get it working, only an inline method similar to what is used in the Shoutbox when you click on user avatars.
Currently if you click the @ symbol it loads to the main page, and then if you press the 'Back' button it will load the page you were just on and in the QuickReply box the user's name will be added that you mentioned.
Where I need help is getting it to function that way without navigating away from the page you're on, so that users don't have to press the 'Back' button as that is more time-consuming than manually typing their names out.
Currently the code being used is as follows:
Code:
<a href="" rel="nofollow" style="cursor: pointer;" onclick="document.getElementById('ctrl_message_html').value += '@{$message.username} '" value="@{$message.username} " />@</a>
If any HTML or JavaScript gurus have ideas, feel free to share them below.
I'm not seeking to add Java files or other resources to get it working, only an inline method similar to what is used in the Shoutbox when you click on user avatars.