phpBB2Refugees.com Logo
Not affiliated with or endorsed by the phpBB Group

Register •  Login 

Continue the legacy...

Welcome to all phpBB2 Refugees!Wave Smilie

This site is intended to continue support for the legacy 2.x line of the phpBB2 bulletin board package. If you are a fan of phpBB2, please, by all means register, post, and help us out by offering your suggestions. We are primarily a community and support network. Our secondary goal is to provide a phpBB2 MOD Author and Styles area.

Flag for "user wants notification"


 
Search this topic... | Search MOD Requests... | Search Box
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Author Message
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Mon Jun 15, 2009 12:55 pm 
Post subject: Flag for "user wants notification"

Hi, I would like to set a little flag (maybe a colored spot or something only visible for admins) when a user sends a post and has ticked the checkbox "Notify me when a reply is posted".

Is that possible?

/Holger
Back to top
Murmur
Board Member



Joined: 20 Aug 2009

Posts: 57
Location: California


flag
PostPosted: Sat Aug 29, 2009 5:53 am 
Post subject: Re: Flag for "user wants notification"

I would assume you're talking about topic "watch" status which is stored in table:

PREFIX_topics_watch

Whether it is set for a topic depends on:

1) user profile choice "Always Notify me of replies"
2) if they checked the box (when posting)
3) if they clicked "watch this topic" (even if they haven't posted)

The mod you're talking about is do-able of course. You'd be changing:

viewtopic.php
templates/MYTEMPLATE/viewtopic_body.tpl

From just a quick glance at viewtopic.php, it looks like the info ("Is the user watching this topic?") is not immediately available within the gather/display posts loop. So you'd also have to change or add to the SQL.
I could be wrong on the last part.

I did a quick search and found no such mod out there. Could be wrong about that too. icon_smile.gif
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 663
Location: Texas


flag
PostPosted: Sat Aug 29, 2009 2:28 pm 
Post subject: Re: Flag for "user wants notification"

So if I am reading this right, you want a visual indication (sort of like we have here for when you have posted in a topic) that shows if a user has subscribed to a topic?

It's certainly possible, but can I ask why you're interested in this?

_________________
phpBBDoctor Blog
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Sat Aug 29, 2009 5:49 pm 
Post subject: Re: Flag for "user wants notification"

Hi, you both have understood exactly what I would like to have.
In some cases people state that they where not informed via email of new replies. I would like to verify this sometimes.
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 663
Location: Texas


flag
PostPosted: Sat Aug 29, 2009 7:00 pm 
Post subject: Re: Flag for "user wants notification"

The data is all there, obviously. The problem is figuring out how to display it. For example, here are some scenarios:

1. The topic starter might be watching the topic. In that case, it should be easy to make a flag visible to the admin on the viewforum page, or even on the viewtopic page.

2. Someone who posts in the topic might be watching. In that case, where would you put the indicator? You could mark on the post, perhaps, but as an admin then you have to read the entire topic.

3. Someone can be watching the topic without ever having posted. That means there is really no place to put a little mark by their user name, since it won't ever appear.

To me, the easiest way to do this (and most efficient, as it would only add one query) would be to simply list out the usernames of those folks that are watching the topic. It might not be as "sexy" as a little dot somewhere, but it handles all three of the above scenarios in the best fashion, and least in my opinion.

If you're going to do that, it would take a quick check at the top of viewtopic.php to see if the person is an admin, and if so, a second query to get the list of people watching the topic that is being viewed. You could add the list of folks underneath the topic title somewhere, perhaps?

_________________
phpBBDoctor Blog
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Sat Aug 29, 2009 7:03 pm 
Post subject: Re: Flag for "user wants notification"

I only need to put the "flag" on posts and replies with the checkbox marked when sending the message.
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 663
Location: Texas


flag
PostPosted: Sat Aug 29, 2009 7:10 pm 
Post subject: Re: Flag for "user wants notification"

But I can watch a topic without posting in the topic. icon_wink.gif How would you know that?
_________________
phpBBDoctor Blog
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Sat Aug 29, 2009 7:27 pm 
Post subject: Re: Flag for "user wants notification"

Tyat does not matter. I am only interested in people who writes. They write and wait for replies.
Back to top
Murmur
Board Member



Joined: 20 Aug 2009

Posts: 57
Location: California


flag
PostPosted: Sat Aug 29, 2009 9:36 pm 
Post subject: Re: Flag for "user wants notification"

Unfortunately, the table watch_topics doesn't distinguish between ~how~ a user subscribed.
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Sun Aug 30, 2009 11:16 am 
Post subject: Re: Flag for "user wants notification"

Does not matter I think, because the user is selected and the message is selected, so why not select the status also?
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 663
Location: Texas


flag
PostPosted: Sun Aug 30, 2009 3:20 pm 
Post subject: Re: Flag for "user wants notification"

The status isn't reflected on the post, it's only in the watched topics table. icon_smile.gif There is no flag on a post that matches up with the "Notify me when a reply is posted" checkbox on the posting form.
_________________
phpBBDoctor Blog
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Sun Aug 30, 2009 5:44 pm 
Post subject: Re: Flag for "user wants notification"

Yes, but that is what I am requesting icon_redface.gif
Back to top
drathbun
Board Member



Joined: 24 Jul 2008

Posts: 663
Location: Texas


flag
PostPosted: Mon Aug 31, 2009 12:09 am 
Post subject: Re: Flag for "user wants notification"

I'll be honest, I don't think you're thinking through your request. icon_smile.gif

The reply notification is per topic, not per post. What I think you are asking for is a way to store whether someone clicked the "notify me when a reply is posted" but on the specific post, rather than the topic. That doesn't make sense, especially if a topic is 50 pages long and they marked a post on page 1. Unless you read the entire topic, you'll have no way to know. If I were designing this MOD, I would use the list idea I mentioned earlier.

That being said, here's what you would have to do.

1. Alter the phpbb_posts table and include a new field, perhaps called "user_requested_notify". Something like this would work:
Code:
alter table phpbb_posts
add user_requested_notify tinyint(1) unsigned default 0;

2. Alter the call to submit_post() found in posting.php to include a field perhaps called $notify_on that will carry the status of this field. Basically look at the $smilies_on and replicate that behavior throughout posting.php.
3. Alter the function in includes/functions_post.php so that the $notify_on field is processed. The processing will include storing the value on the new field in the phpbb_posts table.
4. Finally, you'll have to set up the visual indicator for the post when the checkbox is made.

To be honest, setting up the list of people watching a topic like I suggested is far, far, easier. icon_wink.gif It only adds one query to viewtopic.php and some output to viewtopic_body.tpl and that's it.
2. Alter the insert statement in includes/functions_post to

_________________
phpBBDoctor Blog
Back to top
Holger
Board Member



Joined: 19 Jan 2009

Posts: 509
Location: Hanover


flag
PostPosted: Mon Aug 31, 2009 6:57 am 
Post subject: Re: Flag for "user wants notification"

Thank you for your tips! Now I have a point to start from!

/Holger
Back to top
Display posts from previous:   
Register or Login to Post    Index » MOD Requests  Previous TopicPrint TopicNext Topic
Page 1 of 1 All times are GMT
 
Jump to:  

Index • About • FAQ • Rules • Privacy • Search •  Register •  Login 
Not affiliated with or endorsed by the phpBB Group
Powered by phpBB2 © phpBB Group
Generated in 0.0274 seconds using 15 queries. (SQL 0.0017 Parse 0.0009 Other 0.0247)
phpBB Customizations by the phpBBDoctor.com
Template Design by DeLFlo and MomentsOfLight.com Moments of Light Logo