Message Add-on – New Message Dialogue Improvements (Solution) – UserPro Forums https://forum.userproplugin.com/forums/topic/message-add-on-new-message-dialogue-improvements-solution-2/feed/ Mon, 29 Apr 2024 13:52:04 +0000 https://bbpress.org/?v=2.6.2 en-US https://forum.userproplugin.com/forums/topic/message-add-on-new-message-dialogue-improvements-solution-2/#post-43906 <![CDATA[Message Add-on – New Message Dialogue Improvements (Solution)]]> https://forum.userproplugin.com/forums/topic/message-add-on-new-message-dialogue-improvements-solution-2/#post-43906 Thu, 06 Nov 2014 02:02:39 +0000 Gaz Lloyd BSc Hons Whilst using the userpro message add-on I noticed that when you open the new message dialogue to message a user there was a few issues.

1) Contained within the users display badges there was a message icon which when clicked would open the same dialogue.
2) The view profile button was too close too the username.
3) The text for the username was a little bland and non descriptive and needed some improving.

Well if you are in the same situation I have compiled this little tutorial to help out as this worked for myself.

First you need to login to either cpanel file manager or your FTP client you use to access you main installation and plugin files.

Once you have done this navigate to wp-content/plugins/userpro-messaging/templates/new-message.php and open this file.

I shall break down each of the following solutions into mini tutorials in the same numbered order as above according to each issue to make it simpler for you.

1) Removal of the user badges
—————————–

This can be done by navigating to line number 12 (in my instance) and removing the following code completely: <?php echo userpro_show_badges($chat_with, $inline=true); ?> That’s it the badges should now be removed. This will stop the message icon appearing and causing confusion whilst improving the general looks of the dialogue.

2) Username and view profile button to close together
—————————————————–

Where the view the profile button is too close too the username you simply need to add <br></br> directly after <?php echo userpro_profile_data('display_name', $chat_with); ?> on line 12 (in my case). That’s it for part two all done and very simple to do.

3) Enhance the username text area
———————————

If you would like to enhance the textual appearance of the username this is also pretty simple. In my instance I wanted it to instead of displaying the username have Your messaging [Your Username] where [Your Username] is the name of the user that would be displayed as usual.

This can be achieved by navigating to line 12 (again was line 12 for myself) and replacing the following lines code <a href="<?php echo $userpro->permalink($chat_with); ?>"><?php echo userpro_profile_data('display_name', $chat_with); ?></a><?php echo userpro_show_badges($chat_with, $inline=true); ?> with <?php _e('Your&nbsp;'); ?><?php _e('messaging&nbsp;'); ?><?php echo userpro_profile_data('display_name'); ?><?php echo userpro_profile_data('display_name', $chat_with); ?> It’s as simple as that.

As you can see the code <?php _e('Your&nbsp;'); ?> adds the text Your with a standard space in front of the username and the same with <?php _e('messaging&nbsp;'); ?> adding the word messaging with a standard space. For further reference purposes the &nbsp; represents the standard space.

If you would like something different you could change the text within this code however we have to consider space issues if the user say had a long username hence I wanted to improve it but keep it short with this in mind.

If all goes well you should end up with a more better presented window in which people can message one or another.

Well there you have it another tutorial in the hope that it helps others in the same boat. If you find this tutorial useful or have any improvements or comments on this let me know. I always welcome feedback. Good luck and hope it helps!

Regards,

Gaz

]]>
https://forum.userproplugin.com/forums/topic/message-add-on-new-message-dialogue-improvements-solution-2/#post-44045 <![CDATA[Reply To: Message Add-on – New Message Dialogue Improvements (Solution)]]> https://forum.userproplugin.com/forums/topic/message-add-on-new-message-dialogue-improvements-solution-2/#post-44045 Tue, 11 Nov 2014 16:53:21 +0000 kreacom Great! Thanks for the share!

]]>
https://forum.userproplugin.com/forums/topic/message-add-on-new-message-dialogue-improvements-solution-2/#post-44049 <![CDATA[Reply To: Message Add-on – New Message Dialogue Improvements (Solution)]]> https://forum.userproplugin.com/forums/topic/message-add-on-new-message-dialogue-improvements-solution-2/#post-44049 Tue, 11 Nov 2014 17:43:01 +0000 Ayesha (UserPro Support ) Thanks so much for sharing these tips 🙂 Much appreciated

]]>