Skip Navigation

[Resolved] But what about another problems

This support ticket is created 4 years, 8 months ago. 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 8 replies, has 3 voices.

Last updated by Serhii 4 years, 8 months ago.

Assisted by: Luo Yang.

Author
Posts
#1541505

>It seems that you have only tested with user "Liluhot", if you login your website as user "admin", you should be able to see the same problem: They are still being redirected to the home page.

No! I am not getting redirection to the front page any more, please watch this short video - hidden link

And ok, thanks I understod why I did not see who is serder, and who is reciver.

But what about another problems 3 and 4:

-----------------

FIXED 1) User Liluhot sent a message to the admin. I checked my inbox and saw a new message, but I do not see who is sender - hidden link Which user sent me the letter? And Liluhot doesn't see who is the receiver - hidden link

FIXED 2) I (in admin role) opened the message from Liluhot and still don't see who sent me the message - hidden link

3) And one more problem when I am opening message. The problem with CSS styles. CSS class called "single-message" for some reason was added inside tag "body" and crashed my front-end - hidden link

4) Most important. Liluhot and Admin had a little conversation - hidden link and I expected to see one dialog in "inbox" and one dialog in "outbox" because it was one conversation between two users (one dialog). But here is what I saw: Liluhot (inbox - hidden link ; outbox - hidden link ), Admin (inbox - hidden link ; outbox - hidden link ). It seems like we started three different dialogs.

After every reply is created a new dialog in the inbox/outbox . That shouldn't work like that right? Because it becomes unreadable...

#1541865

Hello,

Q3) I assume we are talking about single message post, for example:
hidden link

The CSS class name "single-message" is outputted from WordPress core, there isn't such kind of built-in feature to disable it within Toolset plugins.

I suggest you modify your custom CSS codes to avoid the CSS conflict.

Q4) I assume you are going to display the messages as hierarchical structure, for example:
- Main message 1
--- Admin Reply 2
----- Reply 3
....

If it is, the demo messaging system does not include this feature, you will try with nested view, for example, in page "Outbox":
1) Parent post view:
- Query messaging posts
- Filter by:
a) post's author is current logged in user
https://toolset.com/documentation/user-guides/views/filtering-views-query-by-author/
b) Select top-level posts with no parent.
https://toolset.com/documentation/user-guides/views/displaying-brother-pages/
- in view's loop, display post information + below child post view

2) Child post view:
- Query messaging posts
- Filter by:
Select posts whose parent is the current post in the loop.
- in view's loop, display post information + the child post view itself.

#1548035

1 problem - Fixed
2 problem - Fixed
3 problem - Fixed

----------------------------------

4 problem - Actual

What you wrote looks incomprehensible to me. Before I begin to figure out how to do this, I would like to make sure that it helps me realize next - hidden link (short video from my PC)

To implement what is shown in the video I need:

1) Parent post view:
- Query messaging posts
- Filter by:
a) post's author is current logged in user
https://toolset.com/documentation/user-guides/views/filtering-views-query-by-author/
b) Select top-level posts with no parent.
https://toolset.com/documentation/user-guides/views/displaying-brother-pages/
- in view's loop, display post information + below child post view

2) Child post view:
- Query messaging posts
- Filter by:
Select posts whose parent is the current post in the loop.
- in view's loop, display post information + the child post view itself.

----------------------------

Did I understand correctly?

#1548081

Without waiting for a response to the message above https://toolset.com/forums/topic/but-what-about-another-problems/#post-1548035 , I decided to try to follow your instructions. So far nothing works.

1) Parent post view:
hidden link

- Query messaging posts
- Filter by:
a) post's author is current logged in user
b) Select top-level posts with no parent.

2) Child post view:
hidden link

- Query messaging posts
- Filter by:
Select posts whose parent is the current post in the loop.

3) New inbox page for testing
hidden link

#1548267

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Luo is having a holiday today. He will get in touch with you tomorrow as soon as he will be back to work.

#1549181

Thanks for the details, please edit the custom field group "Message details"
hidden link

You should be able to see three custom fields:
- Message from, this is for user's ID who create the message post
- Message to: it is for user's ID who receive the message
- First Message ID: for the first message post ID

You can setup the nested view depends on above custom fields. I have done below modifications in your website:

1) Edit the child post view "Messages received - 2 child":
hidden link
Select items with field:
First Message ID is a string equal to VIEW_PARAM(message)

2) Edit the parent view "Messages received - 2":
hidden link

a) in section "Query Filter", change it to:

Select items with field:
Message to is a string equal to VIEW_PARAM(messageto)

So it will get message

b) in section "Loop Editor ", setup the shortcodes as below:

[wpv-conditional if="($(wpcf-first-message-id) eq '[wpv-post-id]')"]
...
[wpv-view name="messages-received-2-child" message="[types field='first-message-id' raw='true'][/types]"]
...
[/wpv-conditional]

3) Edit the page "Inbox 2":
hidden link
Change the shortcode to:
[wpv-view name="Messages received - 2" messageto="[wpv-user field="ID"]"]

Test it in front-end:
hidden link

Please check if it is what you want.

For the "Out-box" pages, you will need to setup other nested views, and in the parent post view, setup filter on custom field "message from".

For your reference.

#1549299

>Please check if it is what you want.

No, this is absolutely not what I wanted. I’ve already recorded two videos to explain what I want.

This is what I see after your changes:

1) User LiluHot just see empty page inbox-2 - hidden link
2) User Admin get this on page inbox-2 hidden link

Everything began to look even worse.

#1549421

There is a misunderstand, the feature you asked in Q4), there isn't such kind of built-in feature within message system demo. So you will need to customize the nested view, and style/format the result.

For user "Liluhot", he starts the message, in the message post, the field "Message from" value is "Liluhot" user's ID.

In order to display message posts start by current logged-in user, you will need to add a filter into parent post view:
1) Edit the post view "Messages received - 2":
hidden link
Add a filter:

OR
Message from is a string equal to VIEW_PARAM(messagefrom)

2) Edit the page "Inbox 2", change the shortcode as below:
hidden link
[wpv-view name="Messages received - 2" messageto="[wpv-user field="ID"]" messagefrom="[wpv-user field="ID"]"]

Login as user "Liluhot", test the problem page again:
hidden link

You will be able to see the messages start by user "Liluhot".

And I have setup a content template in post view "Messages received - 2 child":
hidden link

1) In section "Ordering ", use option: order by post title ASC
2) in section "Limit and Offset", use option: skip 1 item(it will skip the first message post)

[wpv-post-link] -  [wpv-user field='user_firstname' id="[types field='message-from'][/types]"] [wpv-user field='user_lastname' id="[types field='message-from'][/types]"] - <a href="[wpv-post-url]#reply" class="small reply"><i class="fa fa-reply" aria-hidden="true" title="reply"></i></a>

And it is only an demo, you will need to customize/style the result manually.
And in my opinion, you don't need the "outbox" page any more, since above parent post view can outputs all messages "send from" or "Send to" current logged-in user.

#1549631

Sorry, but it seems to me that you absolutely do not understand what I need to implement. Your advice only distance me from the goal.

Maybe another member of your support team can help me.

In any case, I am grateful to you for your time and efforts.