I need to show each user different daily education posts depending on how many points they have.

Every day they submit information using content-type "Daily Submission" and with each submission, their point_count field count on thair Profile grows by 1 point. As an example, a person gets 14 points after 14 days of successive submissions.

I have created a text post for each day in the program. I assigned point_count value for each post. Now I want to show a post with a poin_count value X to all users who have accumulated X points.

So a user on the first day (day 1) of the program sees a message "Welcome to the program!".

The user on day 10 of the program he sees a message "10 days! Time flies!" And so on.

Different users see different messages depending on post_count field value.

I added point_count field to content type "Daily Submission" and to User Profile.

I am using views and panels to render other values on the page.

Please advise how to achieve this.

Comments

wombatbuddy’s picture

One way is using the 'Rules' module.
For instance, you can create for your posts the following alises: day-1, day-2 .. day-10
Then you can use the rule like this:
Export of the rule 

{ "rules_display_node_based_on_value_in_user_profile" : {
    "LABEL" : "Display node based on value in user profile",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules" ],
    "ON" : { "user_login" : [] },
    "DO" : [ { "redirect" : { "url" : "\/day-[account:field-point-count]" } } ]
  }
}
fkiner’s picture

It is a good solution. But I want the user to have access to posts not on redirect only. I will try the panel's argument.

wombatbuddy’s picture

But I want the user to have access to posts

It seems I didn't understand the goal.
What do you mean by the 'post' term?
Maybe you need just to display a message instead of the redirection?

fkiner’s picture

posts are text content I post. nodes.

wombatbuddy’s picture

Do you mean that initially a user don't have permission to see these nodes?
And after redirection you want to give to him this permission?

fkiner’s picture

I am afraid it is too confusing. I don't have the skills to explain what I need. Sorry.

wombatbuddy’s picture

Ok, but if you still need help on this, then you can create  images to illustrate the goal.

fkiner’s picture

Thank you for no giving up. Here is an image of what I need. I hope it is clear enough. Not sure how to upload images here so here is from imgur: https://imgur.com/qu9nSXL

fkiner’s picture

It worked like a charm. Even better: the same works without creating many variants. I can do it in the same variant and use Visibility rules for the content panels. Here is the image: http://tinyurl.com/yxxb98m3

Thank you so much. I would never know where to look.