XF 2.1 Using custom fields + group promotions to allow the user to choose the content they see (but it isn't working)

alternadiv

Well-known member
I am trying to use the custom fields and group promotions features to allow users to choose which content is viewable to them. Let me create an example so you understand what I mean...

Say you have five sections on your forum, which is a forum about colors:
  • Red
  • Blue
  • Green
  • Yellow
  • Purple

Some members may only be interested in reading threads about their favorite color(s). Maybe this member only wants to see the red and purple sections.

I think I know how this can be done easily without an add-on...
  1. You would create a user group for each of the colors.
  2. Then change the user group forum permissions so that someone in the red group can no longer see the other four colors, the purple group can only see purple, the green group only green, and so on.
  3. Then create a custom user field asking which color(s) the member wants to see. Using a multiple choice selection, you list the five colors.
  4. Then you create a user group promotion using the user field criteria you made in the previous step.
  5. Now when the user selects red and purple in the preferences page, blue, green, and yellow become hidden to them.
I have a couple questions though. In theory, it seems like it should work. But when I tested it, selecting one of the options in my preferences page did not promote me into the respective user group (thus hiding the other colors). It essentially did nothing at all. I was able to use the manually promote user system to add myself to the user group that I expected it to add me to, and that actually worked. But why isn't it automatically promoting? Second question is about the permissions. If you do exactly what I said in step 2 above, will you be able to see both colors? The permissions of the red group say not to show you the purple forum, but since you chose to join the purple group as well, does that now show you the purple forum? You're essentially battling permissions - you're in a red group that says yes to red and no to purple and you're in a purple group that says yes to purple and no to red - so what happens? Will you be able to view both forums as intended?
 
I think I give every month at least once the same answer for the same type of question.

For whatever reason usergroup promotions don't work instantly. And people wonder what they did wrong when they setup a promotion, because they don't see the result immediately. Which is a design flaw in my opinion, but anyway.

The illusion of it wasn't doing anything was because you have to wait for the usergroup promotions cron to run. Check your crons and see when the next time is. Promotions only work after the cron runs. You can of course run the cron manually to see an effect, but that is just for testing.

To solve that problem, I can highly recommend this addon by @Xon

To your other question, I am not sure but it should work. A "yes" +"no" = "yes" as I think, unless the parent node is set to "no".
 
Thank you. I'll be honest and tell you I'm extra stupid because I actually already use that add-on on my live forum. I don't have it on my test forum, hence the thread. I guess I need a better memory.
 
I think I remember recommending that particular addon to you in the past.

But I wouldn't call it stupid, it is just that we have so many things to consider when setting up forums, that we forget things.

Btw. I use your setup to have a multi-lingual forum. So English users can see only English sections of the forum etc. But if you go that path, everytime you create a new node/category, you have to remember that and revoke the "view" permission from those particular groups. And I forget that everytime.
 
I think I remember recommending that particular addon to you in the past.

But I wouldn't call it stupid, it is just that we have so many things to consider when setting up forums, that we forget things.

Btw. I use your setup to have a multi-lingual forum. So English users can see only English sections of the forum etc. But if you go that path, everytime your create a new node/category, you have to remember that and revoke the "view" permission from those particular groups. And I forget that everytime.
Thanks for the advice. I was actually wondering if this is being done on a live forum anywhere. It seems like it would be a very user friendly system especially since it will even remove the hidden content from search results and such. If they don't want to see it, they really won't see it, and that's great.
 
Well, that part is actually the strong point of the usergroups system but I wouldn't call it user-friendly, because the setting you want to set up is hidden in the preferences page. And it also only works for registered users. So if you use that system for a multi-lingual forum, unregistered people will see all forum sections. But better than nothing of course.
 
Well, that part is actually the strong point of the usergroups system but I wouldn't call it user-friendly, because the setting you want to set up is hidden in the preferences page. And it also only works for registered users. So if you use that system for a multi-lingual forum, unregistered people will see all forum sections. But better than nothing of course.
Good point about the unregistered members. I wonder if it is possible for an add-on author to take those hidden preferences (I know what you mean) and move them to a new URL that you could link your members to. So you can just say you guys can show/hide whatever you want by simply going to this page. That would be convenient if possible.

Side note: Is it possible to tie custom user fields to specific groups? So, going off my example, you can create a user field asking what your favorite shade of red is that only the people in the red user group would see.
 
Good point about the unregistered members. I wonder if it is possible for an add-on author to take those hidden preferences (I know what you mean) and move them to a new URL that you could link your members to. So you can just say you guys can show/hide whatever you want by simply going to this page. That would be convenient if possible.
If you have the money to fund it, everything is possible. No developer will create this for just you and me or the handful of people who would realize that they need this :).

Side note: Is it possible to tie custom user fields to specific groups? So, going off my example, you can create a user field asking what your favorite shade of red is that only the people in the red user group would see.
And also if you have some spare money, please donate @Xon (I'm broke I can't).

Because I think what you ask for is also possible with another of his free addon:

 
If you have the money to fund it, everything is possible. No developer will create this for just you and me or the handful of people who would realize that they need this :).


And also if you have some spare money, please donate @Xon (I'm broke I can't).

Because I think what you ask for is also possible with another of his free addon:

Awesome! Thank you!

If you don't mind, can I take a look at your forum?
 
Regarding my second question:
If you do exactly what I said in step 2 above, will you be able to see both colors? The permissions of the red group say not to show you the purple forum, but since you chose to join the purple group as well, does that now show you the purple forum? You're essentially battling permissions - you're in a red group that says yes to red and no to purple and you're in a purple group that says yes to purple and no to red - so what happens? Will you be able to view both forums as intended?
The answer to this is that it does not work like this. You will not see either forum.

I am going to keep testing things to try to get a working system going. I'm thinking instead of opt INTO forums you want to see, I'll have the options set so you are opting OUT of what you don't want to see. Will report back with results.
 
Got it. Instead of asking what they want to see, ask what they want to hide. Then the answer to the permissions will always be no and there won't be any conflicting permissions.

Anyone know the difference between "no" and "never" for permissions?
 
Back
Top Bottom