Passworded Boards
Hooks »

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Passworded Boards
« on January 9th, 2013, 02:44 AM »
Because people will want it.


Here comes the ingenuity: No additional hooks are needed. I use the menu hook to modify profile and recent; their context is available to modify.
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Passworded Boards
« Reply #1, on January 9th, 2013, 02:59 AM »
As I said in my thoughts, I'm jealous of this. The UI is so elegant (I'm assuming you didn't try to fix up feeds? Don't know about search.)

Not sure how I would have done it had I attempted it, I think I'd have skipped trying to show the nice UI and simply pretended the board didn't exist (user group can see, but cannot enter) and done it by having the plugin fudge query_enter_board and query_see_topic if necessary afterwards.

I did consider adding it as a core feature for those who feel they need it, but I think it's better as a plugin, and if it's like this, it's a great job :)
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: Passworded Boards
« Reply #2, on January 9th, 2013, 05:34 AM »
Well, thank you! I'm actually  blushing right now.

Anyway, this UX isn't anything new. It is derived from my old SMF mod http://livemods.net/index.php?action=media;sa=item;in=75

I forgot about search and the feeds. I'm going to modify query_enter/see_board for SSI, feeds will get a similar treatment, and search will still index passworded boards, but only hide them from the end results with the above UX.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Passworded Boards
« Reply #3, on January 9th, 2013, 05:37 AM »
You did a good job, be proud of it! :)

The only downside I can think of doing it that way is that other plugins won't necessarily behave. If it's enforced by munging query_ magic, other plugins can't help but behave.

It's sort of why I've been thinking it might have to be considered as core unless we stay resolute and firm against the people who think it's a good idea!

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: Passworded Boards
« Reply #4, on January 9th, 2013, 06:28 AM »
Quote
The only downside I can think of doing it that way is that other plugins won't necessarily behave. If it's enforced by munging query_ magic, other plugins can't help but behave.
Eh, if they don't, they have a security issue. They have the inbuilt topic privacy settings to contend with.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Passworded Boards
« Reply #5, on January 9th, 2013, 06:44 AM »
Sure, that's a given, but what I'm thinking is a plugin that is not aware of password boards will potentially not respect it... I don't know how it works but the screenshots seem to suggest query_enter_board otherwise grants access, so a plugin that does as it should and uses QEB is going to be able to access things even without the password.

Hooks »