Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Aiheen aloitti: MarkJ - elokuu 08, 2014, 05:11:30 AP

Otsikko: Opt out from boards?
Kirjoitti: MarkJ - elokuu 08, 2014, 05:11:30 AP
Is there a mod for giving a member a choice as to whether to see replies / topics created in certain boards?

My forum contains some 'ADULT' boards and I would like to give a choice as above. 
Otsikko: Re: Opt out from boards?
Kirjoitti: Arantor - elokuu 08, 2014, 05:14:01 AP
Users can mark boards ignored in their profile, which means they won't show up in unread and won't appear on the board index as 'new'.
Otsikko: Re: Opt out from boards?
Kirjoitti: MarkJ - elokuu 08, 2014, 05:22:30 AP
Lainaus käyttäjältä: ‽ - elokuu 08, 2014, 05:14:01 AP
Users can mark boards ignored in their profile, which means they won't show up in unread and won't appear on the board index as 'new'.

I can see a way for members to ignore other members but I can't see where they can block board notifications?

I'm using blocks on the front of my site displaying recent topics and replies - this is my concern.
Otsikko: Re: Opt out from boards?
Kirjoitti: MarkJ - elokuu 08, 2014, 05:24:24 AP
Ah wait - found an option to turn it on in Admin  :) .
Otsikko: Re: Opt out from boards?
Kirjoitti: Arantor - elokuu 08, 2014, 05:29:49 AP
I don't know if portal blocks respect that or not, they may not.
Otsikko: Re: Opt out from boards?
Kirjoitti: MarkJ - elokuu 08, 2014, 05:30:57 AP
Lainaus käyttäjältä: ‽ - elokuu 08, 2014, 05:29:49 AP
I don't know if portal blocks respect that or not, they may not.

Yes they do  :) .

This is great but ... what would be perfect is the other way around - a new user can't see the board contents unless the opt in.  Can this be achieved?
Otsikko: Re: Opt out from boards?
Kirjoitti: Arantor - elokuu 08, 2014, 05:34:55 AP
Not without a serious redesign.

On the flip side, there is a longwinded way it could be sort of achieved. All the adult boards, make it so the only group that can see them is a new group you create called Adult Access or whatever. Doesn't matter what it's called, only that it's a new group that is the only group that can see those boards. Then you make the group joinable, meaning that people can opt-into the group as a whole from their profile.

It gets messy when you start dealing with moderators and stuff though.
Otsikko: Re: Opt out from boards?
Kirjoitti: MarkJ - elokuu 08, 2014, 05:44:06 AP
Lainaus käyttäjältä: ‽ - elokuu 08, 2014, 05:34:55 AP
Not without a serious redesign.

On the flip side, there is a longwinded way it could be sort of achieved. All the adult boards, make it so the only group that can see them is a new group you create called Adult Access or whatever. Doesn't matter what it's called, only that it's a new group that is the only group that can see those boards. Then you make the group joinable, meaning that people can opt-into the group as a whole from their profile.

It gets messy when you start dealing with moderators and stuff though.

That seems perfect to me - thanks  :)
Otsikko: Re: Opt out from boards?
Kirjoitti: MarkJ - elokuu 08, 2014, 06:10:13 AP
Nearly perfect but ... when I create a new group 'ADULT Access' and a user alters his profile to join, only the boards within that group are seen - all others are not visible.  I can make another group 'DAILY Boards' and put all boards in there apart from the ADULT but then they would have to choose to join that one as well as the ADULT when making the choice.  Is there a way to keep all users in the DAILY Boards at all times?
Otsikko: Re: Opt out from boards?
Kirjoitti: Arantor - elokuu 08, 2014, 06:15:08 AP
Nope, there isn't. But you can always add all boards to Adult Access to make that work too.

Thing is, joinable groups should be additional to any other groups...
Otsikko: Re: Opt out from boards?
Kirjoitti: MarkJ - elokuu 08, 2014, 06:26:04 AP
Lainaus käyttäjältä: ‽ - elokuu 08, 2014, 06:15:08 AP
Nope, there isn't. But you can always add all boards to Adult Access to make that work too.

Thing is, joinable groups should be additional to any other groups...

Ah right.  So all I have to do is add ALL boards to ADULT Access - sorted.

Cheers
Otsikko: Re: Opt out from boards?
Kirjoitti: MarkJ - elokuu 08, 2014, 07:17:59 AP
Works brilliantly and I've added a link to the menu sending them to the profile page they need to alter.

What would finish this off perfectly would be to display a tick / x image next to the link should they either be in or out of the group?

Any ideas on that one  ;) ?
Otsikko: Re: Opt out from boards?
Kirjoitti: Arantor - elokuu 08, 2014, 07:34:24 AP
That would require a rewrite of that system. Surely 'join group' and 'leave group' with suitable description is enough?
Otsikko: Re: Opt out from boards?
Kirjoitti: MarkJ - elokuu 08, 2014, 08:33:56 AP
Lainaus käyttäjältä: ‽ - elokuu 08, 2014, 07:34:24 AP
That would require a rewrite of that system. Surely 'join group' and 'leave group' with suitable description is enough?

I should be able to code something.  The link I'm referring to is one I have added to the theme I'm using.  It shouldn't be too hard to run a check on whether they are opted in or out and display different images or a different link message.