<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
		>
	<channel>
		<title>bbPress Plugin Browser &#187; Topic: Subscribe To Topic</title>
		<link>http://bbpress.org/plugins/topic/subscribe-to-topic/</link>
		<description>bbPress Plugin Browser &#187; Topic: Subscribe To Topic</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 07:18:32 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
				<atom:link href="http://bbpress.org/plugins/rss/topic/subscribe-to-topic" rel="self" type="application/rss+xml" />

		<item>
			<title>iPad 2 kopen on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/6/#post-6543</link>
			<pubDate>Wed, 22 Jun 2011 20:39:32 +0000</pubDate>
			<dc:creator>iPad 2 kopen</dc:creator>
			<guid isPermaLink="false">6543@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Thanks. I could use part of the code.
</p>]]></description>
					</item>
		<item>
			<title>trippygrape on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/6/#post-6366</link>
			<pubDate>Wed, 09 Feb 2011 20:25:43 +0000</pubDate>
			<dc:creator>trippygrape</dc:creator>
			<guid isPermaLink="false">6366@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>@naviathan</p>
<p>I think the problem you encountered is ALMOST EXACTLY the same as I experienced. This is the solution I applied to get the code working - please bear in mind, I was using two separate hosts, however you can use my solution as a guide.</p>
<p>First of all, ensure your subscribe table exists on the same installation as your forum.</p>
<p>Find function "stt_notify", I've modified it to be like</p>
<p>function stt_notify($post_id = 0) {<br />
    //remove_action('bb_new_post', 'stt_notify');	// bbpress bug, fires multiple times?<br />
    global $bbdb, $topic_id, $bb_current_user, $subscribe_to_topic; $time=time()-60;<br />
    $topic=get_topic($topic_id); if (empty($post_id) &#124;&#124; empty($bb_current_user-&#62;ID) &#124;&#124; ($topic-&#62;topic_posts&#60;2)) {return;}<br />
    $query = "SELECT username, useremail as user_email FROM subscribe_to_topic WHERE topic = ".$topic_id." AND type = 2 AND time &#60; ".$time." AND post &#62; last";</p>
<p>    $emails=$bbdb-&#62;get_results($query); if (empty($emails)) {return;}</p>
<p>    $topic_link=get_post_link($post_id);<br />
    $unsubscribe=add_query_arg( 'unsubscribe', $topic_id, $topic_link);<br />
    $from=bb_get_option('from_email'); if (empty($from)) {$from=bb_get_option('admin_email');}<br />
    $from_email='From: ' .$from;<br />
    $user_name=get_user_name($bb_current_user-&#62;ID);<br />
    $subject="[".bb_get_option('name') . ']' ." ". __('new post notification');<br />
    $message = __("There is a new post on [%1\$s] \n\nReply by: %2\$s \n%3\$s \n\n\nUnsubscribe: \n%4\$s \n");</p>
<p>    foreach ($emails as $email){<br />
            mail($email-&#62;user_email, $subject, sprintf($message, $topic-&#62;topic_title, $user_name, $topic_link, $unsubscribe), $from_email);</p>
<p>            $ids[$email-&#62;user_id]=$email-&#62;user_id;<br />
            // print "$email-&#62;user_email <br />\n";<br />
    }<br />
    if (!empty($ids)) {<br />
            $ids=implode(',',$ids); $time=time();<br />
            $bbdb-&#62;query("UPDATE ".$subscribe_to_topic['db']." SET last=$post_id,time=$time WHERE topic=$topic_id AND user IN ($ids)");<br />
    }<br />
}</p>
<p>find function "stt_change_level", I've modified it so it like:</p>
<p>function stt_change_level($user_id=0,$topic_id=0,$level=0, $user_info = "") {<br />
    global $bbdb, $subscribe_to_topic, $bb_current_user;<br />
    // print("&#60;hr&#62;<br />
<pre>");
    // print_r($user_info);
    // print("</pre>
&#60;hr&#62;");<br />
    if (empty($user_id) &#124;&#124; empty($topic_id)) {return;}<br />
    if ($level===0) {return $bbdb-&#62;query("DELETE FROM ".$subscribe_to_topic['db']." WHERE user=$user_id AND topic=$topic_id LIMIT 1");}<br />
    $topic=get_topic($topic_id);<br />
    $query="INSERT INTO ".$subscribe_to_topic['db']." (<code>user</code>, <code>topic</code>, <code>post</code>, <code>type</code>, <code>username</code>, <code>useremail</code>)<br />
                VALUES ('".$user_id."', '".$topic_id."', '".$topic-&#62;topic_last_post_id."', '".$level."', '".$bb_current_user-&#62;user_login."', '".$bb_current_user-&#62;user_email."')<br />
                ON DUPLICATE KEY UPDATE <code>post</code> = VALUES( <code>post</code>), <code>type</code> = VALUES( <code>type</code>)";<br />
    return $bbdb-&#62;query($query);<br />
}</p>
<p>if you're still battling, email me: trippygrape [AT] gmail dot com and i'll send you my modified code which you can work on as a guide</p>
<p>cheers,<br />
John
</p>]]></description>
					</item>
		<item>
			<title>naviathan on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6365</link>
			<pubDate>Wed, 09 Feb 2011 17:58:53 +0000</pubDate>
			<dc:creator>naviathan</dc:creator>
			<guid isPermaLink="false">6365@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Just had a thought.  bbpress is using my wpress db for user accounts, but the subscribe_to tables are in the bbpress db where the topics and posts are stored.
</p>]]></description>
					</item>
		<item>
			<title>naviathan on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6364</link>
			<pubDate>Wed, 09 Feb 2011 15:37:51 +0000</pubDate>
			<dc:creator>naviathan</dc:creator>
			<guid isPermaLink="false">6364@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>I'm still not getting emails from this plugin.  I noticed the plugin is using bb_mail, how does bb_mail send its traffic?
</p>]]></description>
					</item>
		<item>
			<title>naviathan on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6358</link>
			<pubDate>Sun, 06 Feb 2011 02:22:41 +0000</pubDate>
			<dc:creator>naviathan</dc:creator>
			<guid isPermaLink="false">6358@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Scratch that part about sending mail just fine.  My WordPress sends mail just fine, I don't think I've received a thing from the bbpress forum.
</p>]]></description>
					</item>
		<item>
			<title>naviathan on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6357</link>
			<pubDate>Sun, 06 Feb 2011 01:44:05 +0000</pubDate>
			<dc:creator>naviathan</dc:creator>
			<guid isPermaLink="false">6357@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>@trippygrape<br />
Here's what I can tell you.  I know my forum sends mail just fine, I get user account notices and comment verifications from WordPress.  The bbpress installation is on the same server under a forum subdirectory with my wordpress install. I ran the query listed in this thread when I first installed the plugin and it created the tables for subscribe_to_topic. From what I can discern the tables are populating appropriately.  It looks like it uses users, topics, posts and type all referenced by ID numbers.  User listed as 1 is admin and 3 is a user I created for testing, there are table entries for each.  I assume this takes us down to just the method used to send mail.  My wordpress is using an smtp relay host to send mail, could this be what's mucking up the mail functions?
</p>]]></description>
					</item>
		<item>
			<title>trippygrape on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6356</link>
			<pubDate>Sat, 05 Feb 2011 19:25:13 +0000</pubDate>
			<dc:creator>trippygrape</dc:creator>
			<guid isPermaLink="false">6356@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>@naviathan (<a href="http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/?replies=95#post-6353" rel="nofollow">http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/?replies=95#post-6353</a>)<br />
Check if subscribe_to_topic table has been populated when you installed the plugin. Also, the function that fires the emails, output the results (or create some debug) and check if the record is written to the database. </p>
<p>Also is this installation running off the same wordpress or are you allowing access from a user base on another host? I ran into a couple of walls with this plugin as bbpress lives on a subdomain on it's own and shares the user tables from our main site, but with some modifications works like a dream.
</p>]]></description>
					</item>
		<item>
			<title>trippygrape on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6355</link>
			<pubDate>Sat, 05 Feb 2011 19:18:48 +0000</pubDate>
			<dc:creator>trippygrape</dc:creator>
			<guid isPermaLink="false">6355@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>@PropaneFitness (<a href="http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6326" rel="nofollow">http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6326</a>)<br />
Yup, each time a post is made to the particular thread that you subscribed to. You can unsubscribe at any time by clicking on the unsubscribe url too.
</p>]]></description>
					</item>
		<item>
			<title>naviathan on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6353</link>
			<pubDate>Sat, 05 Feb 2011 02:04:48 +0000</pubDate>
			<dc:creator>naviathan</dc:creator>
			<guid isPermaLink="false">6353@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Ok it's official.  No emails.  Any thoughts?  I really would like this plugin to work as I use it a lot on the other forums I frequent.
</p>]]></description>
					</item>
		<item>
			<title>naviathan on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6352</link>
			<pubDate>Sat, 05 Feb 2011 01:23:51 +0000</pubDate>
			<dc:creator>naviathan</dc:creator>
			<guid isPermaLink="false">6352@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>A small note for those that are using bbpress in conjunction with wordpress and are using wp-cache or similar caching plugin.  You will want to exclude the forum pages from being cached.  I thought this plugin wasn't working at first then I realized wp-cache was caching the page making it look like the subscribe options weren't changing when the page refreshed.  Turns out they were, although I still have not received an update email.
</p>]]></description>
					</item>
		<item>
			<title>PropaneFitness on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6326</link>
			<pubDate>Tue, 11 Jan 2011 22:04:40 +0000</pubDate>
			<dc:creator>PropaneFitness</dc:creator>
			<guid isPermaLink="false">6326@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Does this plugin send an email EACH time something new is posted in a topic, provided they are more than 1 minute apart?<br />
Is there a way to send only one per topic?<br />
Thanks
</p>]]></description>
					</item>
		<item>
			<title>trippygrape on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6323</link>
			<pubDate>Fri, 07 Jan 2011 14:48:35 +0000</pubDate>
			<dc:creator>trippygrape</dc:creator>
			<guid isPermaLink="false">6323@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>@nolash: you're most likely missing the following table, this worked for me</p>
<p>CREATE TABLE IF NOT EXISTS subscribe_to_topic (<br />
user int(10) UNSIGNED NOT NULL default '0',<br />
topic int(10) UNSIGNED NOT NULL default '0',<br />
post int(10) UNSIGNED NOT NULL default '0',<br />
last int(10) UNSIGNED NOT NULL default '0',<br />
time int(10) UNSIGNED NOT NULL default '0',<br />
type tinyint UNSIGNED NOT NULL default '0',<br />
PRIMARY KEY (user,topic),<br />
INDEX (user),<br />
INDEX (topic)<br />
) CHARSET utf8 COLLATE utf8_general_ci</p>
<p>Although the subscribe options with email work visually, but I don't receive any emails, I've checked the tables and records are being inserted. No email though - if anyone knows, please give me a heads up.</p>
<p>cheers
</p>]]></description>
					</item>
		<item>
			<title>nolash on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6322</link>
			<pubDate>Fri, 07 Jan 2011 10:40:18 +0000</pubDate>
			<dc:creator>nolash</dc:creator>
			<guid isPermaLink="false">6322@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>It seems broken for v1.0.2. Clicking or selecting subscribe doesn't work, it just "insists" on no subscribe. Is there a quick fix to this?
</p>]]></description>
					</item>
		<item>
			<title>webmacho on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6273</link>
			<pubDate>Wed, 15 Dec 2010 08:35:19 +0000</pubDate>
			<dc:creator>webmacho</dc:creator>
			<guid isPermaLink="false">6273@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>it subscribes but email does not arrive, what could it be?
</p>]]></description>
					</item>
		<item>
			<title>chengdu living on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6077</link>
			<pubDate>Sun, 22 Aug 2010 09:56:26 +0000</pubDate>
			<dc:creator>chengdu living</dc:creator>
			<guid isPermaLink="false">6077@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>does this work on bbPress 1.0? this is a feature I would love to integrate!
</p>]]></description>
					</item>
		<item>
			<title>Blutch123 on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6068</link>
			<pubDate>Wed, 18 Aug 2010 12:07:44 +0000</pubDate>
			<dc:creator>Blutch123</dc:creator>
			<guid isPermaLink="false">6068@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>i tried many times and it works now :) thank you !!
</p>]]></description>
					</item>
		<item>
			<title>_ck_ on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6067</link>
			<pubDate>Wed, 18 Aug 2010 12:05:15 +0000</pubDate>
			<dc:creator>_ck_</dc:creator>
			<guid isPermaLink="false">6067@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Blutch123, if you mean you are getting an error when trying to download here, the servers sometimes go wonky. Try clicking the download link a few times even if it fails the first few. Or wait an hour.
</p>]]></description>
					</item>
		<item>
			<title>Blutch123 on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6066</link>
			<pubDate>Wed, 18 Aug 2010 11:31:02 +0000</pubDate>
			<dc:creator>Blutch123</dc:creator>
			<guid isPermaLink="false">6066@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Hi CK, the file is missing :(
</p>]]></description>
					</item>
		<item>
			<title>Alex Luft on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-6001</link>
			<pubDate>Thu, 15 Jul 2010 20:10:00 +0000</pubDate>
			<dc:creator>Alex Luft</dc:creator>
			<guid isPermaLink="false">6001@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>@keithck73 You should take a look at _ck'_ reply here:</p>
<p><a href="http://bbpress.org/plugins/topic/subscribe-to-topic/page/2/#post-2648" rel="nofollow">http://bbpress.org/plugins/topic/subscribe-to-topic/page/2/#post-2648</a></p>
<p>You'll need to go into your SQL admin interface and run the following query (done by clicking on "SQL' on the top and pasting it in the box below that):</p>
<p>CREATE TABLE IF NOT EXISTS subscribe_to_topic (<br />
user int(10) UNSIGNED NOT NULL default '0',<br />
topic int(10) UNSIGNED NOT NULL default '0',<br />
post int(10) UNSIGNED NOT NULL default '0',<br />
last int(10) UNSIGNED NOT NULL default '0',<br />
time int(10) UNSIGNED NOT NULL default '0',<br />
type tinyint UNSIGNED NOT NULL default '0',<br />
PRIMARY KEY (user,topic),<br />
INDEX (user),<br />
INDEX (topic)<br />
) CHARSET utf8 COLLATE utf8_general_ci </p>
<p>Hope that helps.
</p>]]></description>
					</item>
		<item>
			<title>keithck73 on "Subscribe To Topic"</title>
			<link>http://bbpress.org/plugins/topic/subscribe-to-topic/page/5/#post-5850</link>
			<pubDate>Wed, 26 May 2010 17:52:33 +0000</pubDate>
			<dc:creator>keithck73</dc:creator>
			<guid isPermaLink="false">5850@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>I have installed the plugin, activated it and see it on my site. However, when I change the status from "Don't Subscribe" to "Instant Email Notification" the page processes but the status returns to "Don't Subscribe"</p>
<p>I tested by posting a reply and I did not receive an email notification. </p>
<p>Any thought s as to what the issue is?</p>
<p>bbPress 1.0.2</p>
<p>Thanks.
</p>]]></description>
					</item>

	</channel>
</rss>

