1 (edited by dexter 2008-04-06 04:34)

Topic: Auto User Notification

I am sure the fix to this is simple. But I want a way to modify the POST.php PHP protocols to automatically check the user notification box, so by default users are notified of replies to their topic. I looked over the code, and searched a bit here, but I assume one of your PunBB cool people, could help me out quickly. smile Thanks!


http://www.d3xt3r.net/forum


Looking here, I see multiple routes I could take... This is the code for the checkbox notification option.

$checkboxes[] = '<label><input type="checkbox" name="subscribe" value="1" tabindex="'.($cur_index++).'"'.(isset($_POST['subscribe']) ? ' checked="checked"' : '').' />'.$lang_post['Subscribe'];

I could change to:

$checkboxes[] = '<label><input type="checkbox" name="subscribe" value="1" tabindex="'.($cur_index++).'"'.(isset($_POST['subscribe']) ? ' checked="checked"' : ' checked="checked"').' />'.$lang_post['Subscribe'];

OR

$checkboxes[] = '<label><input type="checkbox" name="subscribe" value="1" tabindex="'.($cur_index++).'" checked="checked" />'.$lang_post['Subscribe'];

Will that work? Or cause a problem?

Re: Auto User Notification

NEEEEVVVERRMIND. I got it. I modified post.php coding to the last code above, and it worked. Voila. smile

Re: Auto User Notification

Thank you dexter, that's what I've been looking. big_smile

I used the 3rd one, like you, and it worked fine:

dexter wrote:

...

$checkboxes[] = '<label><input type="checkbox" name="subscribe" value="1" tabindex="'.($cur_index++).'" checked="checked" />'.$lang_post['Subscribe'];

Thanks.