Skip Navigation

[Résolu] the message system

This support ticket is created Il y a 4 années et 12 mois. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 6 réponses, has 2 voix.

Last updated by Christian Cox Il y a 4 années et 12 mois.

Assisted by: Christian Cox.

Auteur
Publications
#1233882
inbox-300x202.png

Tell us what you are trying to do?
I want to show the number of new messages on an account page.

Is there any documentation that you are following?
Not that i know of.

Is there a similar example that we can see?
See picture

What is the link to your site?

#1234384

Hope somebody can help me soon 😉

#1234573

Hi, I was digging through the message module and it doesn't appear to track which messages have been read and which messages have not been read, per User. Without tracking that information, I can't help you display the number of "new" messages. I can help you display the number of messages in the inbox, but that number will include both read and unread messages. Let me know if you would like assistance with that.

To track read messages and determine the number of new items, you would have to add a considerable amount of custom code using PHP. You would also need a custom field that holds a read vs. unread status indicator, per User. It's quite complex and probably falls outside the scope of support we provide here here in the forums.

#1234723

Hi Christian,

Thanks for your reply. I know how to display a number to show all the messages. But for what i need that defeats the purpose.

I really thought it was possible with Toolset. 🙁

I would say it is a function that needs to be in there. That would complete the message system. Is it something you guys consider putting in? I think it would be a great feature to have! 😉

#1235045

I encourage you to submit your request over here: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

That will be reviewed by key stakeholders who make decisions about upcoming features in the software.

#1235129

Hi, Yes oke i will do that! 😉

Can you still help me out with showing the number of all messages to a specific user?

#1235275

Sure, go to Toolset > Views and duplicate the "Messages Received" View. Call it "Number of messages received" or something similar. Edit the new View and in the Pagination and Sliders settings choose "No pagination". In the Custom Search settings panel choose "Full page refresh when visitors click on the search button". Scroll down to the Loop Editor and delete everything from the CSS panel. Replace the loop contents with this:

[wpv-layout-start]
[wpv-items-found]
[wpv-found-count]
<!-- wpv-loop-start -->
<wpv-loop></wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-posts-found][/wpv-no-posts-found]
[wpv-layout-end]

You can add extra markup or CSS around the wpv-found-count shortcode to display some formatting, and you can add text in the wpv-no-posts-found shortcode if you want to display something when no messages are found.

Then place this new View somewhere on your site using the same shortcode attribute described in the Messages setup guide:

[wpv-view name="Number of messages received" info="[wpv-current-user info='id']"]
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.