<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[PunBB Forums - Can I make "Subscribe to this topic" checked by default?]]></title>
	<link rel="self" href="http://punbb.informer.com/forums/feed/atom/topic/21711/"/>
	<updated>2009-06-03T13:31:33Z</updated>
	<generator>PunBB</generator>
	<id>http://punbb.informer.com/forums/topic/21711/can-i-make-subscribe-to-this-topic-checked-by-default/</id>
		<entry>
			<title type="html"><![CDATA[Re: Can I make "Subscribe to this topic" checked by default?]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128192/#p128192"/>
			<content type="html"><![CDATA[<p>Thank you!</p>]]></content>
			<author>
				<name><![CDATA[charless]]></name>
				<uri>http://punbb.informer.com/forums/user/15560/</uri>
			</author>
			<updated>2009-06-03T13:31:33Z</updated>
			<id>http://punbb.informer.com/forums/post/128192/#p128192</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can I make "Subscribe to this topic" checked by default?]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128172/#p128172"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>charless wrote:</cite><blockquote><p>Regarding your suggested fix, if I update the software will I have to redo this fix each time?</p></blockquote></div><p>Yes, you should. That is why creating an extension based on this code will be more convenient for you.<br /></p><div class="quotebox"><cite>charless wrote:</cite><blockquote><p>Would this change also make &quot;Subscribe to this topic&quot; true and allow users to uncheck this option if they do not want to subscribe?</p></blockquote></div><p>Yes, it would. You can set the default value of the &quot;auto_notify&quot; column in the &quot;users&quot; table to 1. Or set it when a user is registered, examine the function &quot;add_user&quot; of &quot;&lt;FORUM_ROOT&gt;/include/functions.php&quot; (lines 1658-1709)</p>]]></content>
			<author>
				<name><![CDATA[Slavok]]></name>
				<uri>http://punbb.informer.com/forums/user/13265/</uri>
			</author>
			<updated>2009-06-03T08:33:47Z</updated>
			<id>http://punbb.informer.com/forums/post/128172/#p128172</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can I make "Subscribe to this topic" checked by default?]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128153/#p128153"/>
			<content type="html"><![CDATA[<p>Thank you for your very helpful reply!</p><p>Regarding your suggested fix, if I update the software will I have to redo this fix each time?</p><p>Regarding this: <em>There is also an option &quot;Subscribe to topics by default when posting&quot; in user&#039;s profile</em></p><p>This seems like the best solution to my problem. Would this change also make &quot;Subscribe to this topic&quot; true and allow users to uncheck this option if they do not want to subscribe?</p><p>If you don&#039;t mind, could you tell me how to make this change as well? Hopefully this will also help other users interested in doing the same things.</p>]]></content>
			<author>
				<name><![CDATA[charless]]></name>
				<uri>http://punbb.informer.com/forums/user/15560/</uri>
			</author>
			<updated>2009-06-02T16:50:56Z</updated>
			<id>http://punbb.informer.com/forums/post/128153/#p128153</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can I make "Subscribe to this topic" checked by default?]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128127/#p128127"/>
			<content type="html"><![CDATA[<p>You need to edit file &quot;&lt;FORUM_ROOT&gt;viewtopic.php&quot;. Add this code <br /></p><div class="codebox"><pre><code>if (isset($forum_page[&#039;hidden_fields&#039;][&#039;subscribe&#039;]))
    unset($forum_page[&#039;hidden_fields&#039;][&#039;subscribe&#039;]);
// Load the post.php language file
require FORUM_ROOT.&#039;lang/&#039;.$forum_user[&#039;language&#039;].&#039;/post.php&#039;;

$forum_page[&#039;fld_count&#039;] = 0;
$forum_page[&#039;checkboxes&#039;] = array();
if ($forum_config[&#039;o_smilies&#039;] == &#039;1&#039;)
    $forum_page[&#039;checkboxes&#039;][&#039;hide_smilies&#039;] = &#039;&lt;div class=&quot;mf-item&quot;&gt;&lt;span class=&quot;fld-input&quot;&gt;&lt;input type=&quot;checkbox&quot; id=&quot;fld&#039;.(++$forum_page[&#039;fld_count&#039;]).&#039;&quot; name=&quot;hide_smilies&quot; value=&quot;1&quot; /&gt;&lt;/span&gt; &lt;label for=&quot;fld&#039;.$forum_page[&#039;fld_count&#039;].&#039;&quot;&gt;&#039;.$lang_post[&#039;Hide smilies&#039;].&#039;&lt;/label&gt;&lt;/div&gt;&#039;;

// Check/uncheck the checkbox for subscriptions depending on scenario
if (!$forum_user[&#039;is_guest&#039;] &amp;&amp; $forum_config[&#039;o_subscriptions&#039;] == &#039;1&#039;)
{
    $subscr_checked = true;

    // If auto subscribed
    if ($forum_user[&#039;auto_notify&#039;])
        $subscr_checked = true;
    // If already subscribed to the topic
    else if ($cur_topic[&#039;is_subscribed&#039;])
        $subscr_checked = true;

    $forum_page[&#039;checkboxes&#039;][&#039;subscribe&#039;] = &#039;&lt;div class=&quot;mf-item&quot;&gt;&lt;span class=&quot;fld-input&quot;&gt;&lt;input type=&quot;checkbox&quot; id=&quot;fld&#039;.(++$forum_page[&#039;fld_count&#039;]).&#039;&quot; name=&quot;subscribe&quot; value=&quot;1&quot;&#039;.($subscr_checked ? &#039; checked=&quot;checked&quot;&#039; : &#039;&#039;).&#039; /&gt;&lt;/span&gt; &lt;label for=&quot;fld&#039;.$forum_page[&#039;fld_count&#039;].&#039;&quot;&gt;&#039;.($cur_topic[&#039;is_subscribed&#039;] ? $lang_post[&#039;Stay subscribed&#039;] : $lang_post[&#039;Subscribe&#039;]).&#039;&lt;/label&gt;&lt;/div&gt;&#039;;
}</code></pre></div><p>after hook &quot;vt_quickpost_pre_display&quot;. And this <br /></p><div class="codebox"><pre><code>&lt;?php
if (!empty($forum_page[&#039;checkboxes&#039;]))
{

?&gt;
            &lt;fieldset class=&quot;mf-set set&lt;?php echo ++$forum_page[&#039;item_count&#039;] ?&gt;&quot;&gt;
                &lt;legend&gt;&lt;span&gt;&lt;?php echo $lang_post[&#039;Post settings&#039;] ?&gt;&lt;/span&gt;&lt;/legend&gt;
                &lt;div class=&quot;mf-box checkbox&quot;&gt;
                    &lt;?php echo implode(&quot;\n\t\t\t\t\t&quot;, $forum_page[&#039;checkboxes&#039;]).&quot;\n&quot;; ?&gt;
                &lt;/div&gt;
            &lt;/fieldset&gt;
&lt;?php

}?&gt;</code></pre></div><p>after hook &quot;vt_quickpost_pre_fieldset_end&quot;. Or you can create an extension based on this code. There is also an option &quot;Subscribe to topics by default when posting&quot; in user&#039;s profile. Another solution of your first problem can be setting this option as checked by default.</p>]]></content>
			<author>
				<name><![CDATA[Slavok]]></name>
				<uri>http://punbb.informer.com/forums/user/13265/</uri>
			</author>
			<updated>2009-06-02T07:19:03Z</updated>
			<id>http://punbb.informer.com/forums/post/128127/#p128127</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can I make "Subscribe to this topic" checked by default?]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128119/#p128119"/>
			<content type="html"><![CDATA[<p>Thanks again Slavok, but I noticed another issue:</p><p>I just noticed that the &quot;Subscribe to this topic&quot; check box only appears when a new post is created - if I use the &quot;Quick reply to this topic&quot; text box in an existing post there is no way to have it subscribe the user to the post. </p><p>I would like this subscribe check box and option to also appear every time someone replies to an existing post. Is this possible? If so, how can I do this?</p>]]></content>
			<author>
				<name><![CDATA[charless]]></name>
				<uri>http://punbb.informer.com/forums/user/15560/</uri>
			</author>
			<updated>2009-06-01T16:26:14Z</updated>
			<id>http://punbb.informer.com/forums/post/128119/#p128119</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can I make "Subscribe to this topic" checked by default?]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128116/#p128116"/>
			<content type="html"><![CDATA[<p>Excellent! I had a feeling it was a simple task, but this is even easier than I thought. Thanks.</p>]]></content>
			<author>
				<name><![CDATA[charless]]></name>
				<uri>http://punbb.informer.com/forums/user/15560/</uri>
			</author>
			<updated>2009-06-01T14:22:55Z</updated>
			<id>http://punbb.informer.com/forums/post/128116/#p128116</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can I make "Subscribe to this topic" checked by default?]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128097/#p128097"/>
			<content type="html"><![CDATA[<p>You just need to edit the line 495 of &quot;&lt;FORUM_ROOT&gt;/post.php&quot;, it should be:<br /></p><div class="codebox"><pre><code>$subscr_checked = true;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Slavok]]></name>
				<uri>http://punbb.informer.com/forums/user/13265/</uri>
			</author>
			<updated>2009-06-01T07:56:17Z</updated>
			<id>http://punbb.informer.com/forums/post/128097/#p128097</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can I make "Subscribe to this topic" checked by default?]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128086/#p128086"/>
			<content type="html"><![CDATA[<p>Hi Colak, </p><p>There is an overlap between our requests, but I think my request is much easier. I don&#039;t want every user to be subscribed to all threads, I just want the &quot;Subscribe to this topic&quot; check box in each post to be checked by default, so that users are auto-subscribed to any topics where they have posted (or they can uncheck the box if they do not want this). Your request would require an extension, but I have a feeling that mine is just a small change to a config file since the functionality is already built into the app.</p><p>-Charles</p>]]></content>
			<author>
				<name><![CDATA[charless]]></name>
				<uri>http://punbb.informer.com/forums/user/15560/</uri>
			</author>
			<updated>2009-05-31T13:53:43Z</updated>
			<id>http://punbb.informer.com/forums/post/128086/#p128086</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Can I make "Subscribe to this topic" checked by default?]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128084/#p128084"/>
			<content type="html"><![CDATA[<p>Hi charles,</p><p>This is very similar to my <a href="http://punbb.informer.com/forums/topic/21699/email-posts/">request</a> a few days ago:)</p>]]></content>
			<author>
				<name><![CDATA[colak]]></name>
				<uri>http://punbb.informer.com/forums/user/2783/</uri>
			</author>
			<updated>2009-05-31T10:29:31Z</updated>
			<id>http://punbb.informer.com/forums/post/128084/#p128084</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Can I make "Subscribe to this topic" checked by default?]]></title>
			<link rel="alternate" href="http://punbb.informer.com/forums/post/128078/#p128078"/>
			<content type="html"><![CDATA[<p>Is it possible to make the default setting for &quot;Subscribe to this topic&quot; checked instead of unchecked?</p><p>I find that many people do not check this box, so they do not know if someone has responded to the post. It would also generate more forum activity. </p><p>If this is possible, please let me know how I would do this. </p><p>Thanks for your help!</p><p>-Charles</p>]]></content>
			<author>
				<name><![CDATA[charless]]></name>
				<uri>http://punbb.informer.com/forums/user/15560/</uri>
			</author>
			<updated>2009-05-31T00:08:00Z</updated>
			<id>http://punbb.informer.com/forums/post/128078/#p128078</id>
		</entry>
</feed>
