1 (edited by astrojny 2006-11-08 01:45)

Topic: Subscribe To Topic

I know this has been tackled at length here: http://punbb.org/forums/viewtopic.php?id=4606

but, I basically want to know what file I need to edit to turn email subscriptions on permanently for everyone.

If there is not an easy way of accomplishing that, then could Rickard or someone with knowledge of the code point me to the file I need to edit in order to have the "Subscribe to this topic" box checked by default whenever you make a post. I am sure I just have to switch a 0 to a 1 somewhere but for the life of me I can't find where.

Thanks for the help!

Re: Subscribe To Topic

In post.php

FIND

                // To subscribe or not to subscribe, that ...
                if ($pun_config['o_subscriptions'] == '1' && $subscribe)

REPLACE WITH

                // To subscribe or not to subscribe, that ...
                if ($pun_config['o_subscriptions'] == '1')

That should automatically subscribe everyone who posts (it also makes the checkbox useless tongue)

3 (edited by astrojny 2006-11-08 02:05)

Re: Subscribe To Topic

Thank you Smartys, I appreciate it.

Is there a way to just have the checkbox checked by default, so a user could un-check if they really didn't want to subscribe? I would think it would be something simple, similar to what you showed above.

Re: Subscribe To Topic

OK, but this means quick reply won't automatically subscribe wink
FIND

$checkboxes = array();
if (!$pun_user['is_guest'])
{
    if ($pun_config['o_smilies'] == '1')
        $checkboxes[] = '<label><input type="checkbox" name="hide_smilies" value="1" tabindex="'.($cur_index++).'"'.(isset($_POST['hide_smilies']) ? ' checked="checked"' : '').' />'.$lang_post['Hide smilies'];

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

REPLACE WITH

$checkboxes = array();
if (!$pun_user['is_guest'])
{
    if ($pun_config['o_smilies'] == '1')
        $checkboxes[] = '<label><input type="checkbox" name="hide_smilies" value="1" tabindex="'.($cur_index++).'"'.(isset($_POST['hide_smilies']) ? ' checked="checked"' : '').' />'.$lang_post['Hide smilies'];

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

Re: Subscribe To Topic

Thanks again Smartys!

If I use your first method, which will always turn on email subscribe, will a user still be able to unsubscribe if they wish by clicking the link in the email or the post?

Re: Subscribe To Topic

Yes, they can click on the unsubscribe link and it will work. However, any subsequent posts will subscribe them again tongue

Re: Subscribe To Topic

Thanks again!