Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility of subscribing to a forum #93

Open
franga2000 opened this issue Nov 4, 2017 · 7 comments
Open

Possibility of subscribing to a forum #93

franga2000 opened this issue Nov 4, 2017 · 7 comments

Comments

@franga2000
Copy link
Contributor

The ability to auto-subscribe to all new topics within a given forum would be extremely useful.
I can implement this, but I want to make sure no one else is working on it and to get some feedback.

I would put the toggle left of the "Mark all topics as read" link on the forum page. A button like the one on the topic page would be more consistent, but it would look very out of place IMO. I can't think of a good place to put this for categories, but I doubt anyone would want to subscribe to those anyways.
For the subscription managment view, I was thinking of just adding another heading below (or above?) the topic subscriptions and copy the table from the index page.

The backend would of course use an M2M field, same as the topic subscriptions.

Thoughts?

@ellmetha
Copy link
Owner

ellmetha commented Nov 5, 2017

Sounds good to me! 😉

@franga2000
Copy link
Contributor Author

I finally got around to doing this. Here is my progress so far: franga2000/django-machina@2adf216.
I realized that there is already a button on the forum view, so I put this one next to it: Screenshot

To avoid basically copy-pasting a big chunk of code, I created the GenericSubscribeView and GenericUnsubscribeView classes in forum_members/views.py.
I hoped to be able to reuse the template too, but since virtually the same confirmation template is repeated in at least 6 other places, I decided to copy it for now and leave refactoring the rest for when I have more time (I'll open a separate issue to discuss the details).

I haven't updated the test suite or the documentation yet - I'll do that soon. And I've already spotted a few typos so I'll fix those in the next commit, along with whatever else needs changing before a PR.

@martinburchell
Copy link
Contributor

@franga2000 How are you getting along with this new feature? We'd like to make use of it in the site we're developing

@franga2000
Copy link
Contributor Author

To be honest, I sort of forgot about this 😄. We've been running my forum-subscriptions branch in production for about a month now, but I haven't gotten around to cleaning the code up to be PR-ready.

I'll do my best to do that if I get some spare time this week, but I'm in the middle of rewriting a big 💩 pile of legacy PHP code to Django, so it might take a bit.

@aliceh75
Copy link

Hello,

I've looked through your changes - the code looks good enough for a PR as far as I can tell. The only thing that seems to be missing are automated tests.

I'll try your branch out to make sure it does what I need (but it looks like it does), and if so I'm happy to help make this into a PR. If there are things other than the tests you were thinking needed doing, let me know and maybe I can take a look.

@aliceh75
Copy link

Hello,

Having tested this I notice two things that still need doing:

  • Have a different email template for new topics (at the moment it uses the same template as the new reply template, but the wording doesn't make sense for new topics);
  • Show the list of forums you're subscribed to (Django Machina allows you to see the list of topics you're subscribed to, it would make sense to see the list of forums too).

I'm hoping I'll have some time to work on those (at least the first one) in the next couple of weeks, I'll keep you updated.

@aliceh75
Copy link

Oh, I also noticed subscribing to a forum doesn't subscribe to sub-forums of that forum. I'm not sure that's desirable though, maybe something people would want to configure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants