bbPress Plugin Browser »

Subscribe To Topic (0.0.6)

Download

Version: 0.0.6

Last Updated: 2009-6-7

Requires bbPress Version: 0.9 or higher

Compatible up to: 0.9

Author Homepage »

Plugin Homepage »

Donate to this plugin »

Average Rating

5 stars
4 stars
3 stars
2 stars
1 star
(7)

Your Rating

Author: _ck_


  1. > I just noticed you are reporting several mysql errors/issues and now
    > it seems you have an unusual mysql database structure of some sort.
    > What is this "Sql58418_2." ?

    It is the database name (*without* the point): Sql58418_2

    > This unusual configuration is probably causing the related topics error too somehow.

    I have been using such database for years with many different softwares without any flaw and bbpress itself seems to run fine, overall.

    > Did you set that up or is your host doing strange things.

    I am on a shared hosting. No way to change the database name :-)
    Do you really feel that such a name might bear issues? Is it the underscore which is not fine as a character in database names?
    Or, what do you think the issue is, please? As I first installed bbpress (the same was true for many other programs) tables were created straight and fine.
    What do you mean by "strange things", please?

    Posted: 3 years ago #
  2. kirpi.it, do you have phpmyadmin installed ?
    If so, first check if subscribe_to_topic exists in your bbpress db.
    Then, assuming it's not there, try running this SQL query and see if it gives you an error or not:

    CREATE TABLE IF NOT EXISTS subscribe_to_topic (
    user int(10) UNSIGNED NOT NULL default '0',
    topic int(10) UNSIGNED NOT NULL default '0',
    post int(10) UNSIGNED NOT NULL default '0',
    last int(10) UNSIGNED NOT NULL default '0',
    time int(10) UNSIGNED NOT NULL default '0',
    type tinyint UNSIGNED NOT NULL default '0',
    PRIMARY KEY (user,topic),
    INDEX (user),
    INDEX (topic)
    ) CHARSET utf8 COLLATE utf8_general_ci

    Posted: 3 years ago #
  3. No such table was there.
    I run your query but specified "bb_subscribe_to_topic" instead of just "subscribe_to_topic" as all the other tables are prefixed that way.

    I got an error:
    #1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'COLLATE utf8_general_ci' at line 11

    There is also a small button which links to this page http://dev.mysql.com/doc/refman/4.1/en/error-messages-server.html

    I know nothing about databases and have no clue at all.

    I can witness, though, that your "history" plug-in installed and runs smooth: this is an occasion for me to praise your work and also it lets me guess that the database itself is fine. Perhaps there is some problem *between* the database and your script. Maybe SQL syntax? Or, what is that "utf8" thing?

    Posted: 3 years ago #
  4. Well you just answered the question why it's not working and why it's not there, you're getting an error during the creation. I do not use the bb_ prefix on this plugin's table but that's not an issue here (be sure to delete any extra table you made).

    Apparently your mysql doesn't like the collate which is strange because I've tested it fine on mysql 4.1

    Until I have time to figure out what's wrong on your particular server, simply edit the plugin and remove the part that says "COLLATE utf8_general_ci "

    Then activate the plugin and it should create the table and function normally.

    Posted: 3 years ago #
  5. Hi _ck_!
    Sorry for being late in giving you a feedback :-)

    As pages load I get no more errors.
    Yet *no* email is sent.

    Also: how is that menu to be used, please? What does "subscribe without mail" mean? It is not clear how to use... Wouldn't it be more useable if it were like "Add this topic to your favorites" which changes into "This topic is one of your favorites [×]"?

    Anyway, the main issue is that really I get no email on testing...
    It seems that emails are sent correctly by the system, i.e. as a new user registers. Also, as an example, the New User Notification Email plug-in correctly sends emails.
    What could it be?

    Posted: 3 years ago #
  6. DavidJMartin

    Member

    It would be great if you could extend this so that it is possible to Subscribe to a whole Forum. I use this for an outdoors club and some members would liketo get an email every time someone advertises a new trip in the Trips Forum, for example.

    Posted: 3 years ago #
  7. Anyway, the main issue is that really I get no email on testing...
    It seems that emails are sent correctly by the system, i.e. as a new user registers. Also, as an example, the New User Notification Email plug-in correctly sends emails.
    What could it be?

    I too am having this problem. I am trying to figure out what could be causing it; especially based on what kirpi.it and I might have in common. Could it be related to timezones? I'm in Germany and my bbPress installation's timezone offset is UTC +1. The MySQL server appears to be set to UTC. Would that cause a problem?

    Posted: 3 years ago #
  8. Sorry for the double. I might have found the bug.

    I see the SQL is searching for "bb_capabilities" in the meta data for users, but that doesn't exist for any of my users. They all have "webmbb_capabilities" — looks like the table prefix has crept into the user meta table.

    Additionally, my host runs PHP5 in safe mode, and when I hard-code the SQL statement to use "webmbb_capabilities" instead of "bb_capabilities" then I get a safe mode error like this:

    Warning: mail() [function.mail]: SAFE MODE Restriction in effect. The fifth parameter is disabled in SAFE MODE in /f1/content/webmu/public/meetup/my-plugins/subscribe-to-topic/subscribe-to-topic.php on line 172

    So I took that 5th parameter out...and so far no notifications. I'm at a loss. Any ideas?

    Posted: 3 years ago #
  9. There are so many things that don't work in safe mode I am surprised bbPress is working for you.

    There are plenty of hosts without it, you might want to shop around.

    For those that are having trouble, try changing line 172 from this:

    mail($email->user_email,$subject,sprintf($message,$topic->topic_title,$user_name,$topic_link,$unsubscribe),$from_email,"-odb");

    to this:

    mail($email->user_email,$subject,sprintf($message,$topic->topic_title,$user_name,$topic_link,$unsubscribe),$from_email);

    I try to queue the messages so php comes back instantly instead of waiting.

    The bb_capabilities thing should not be a problem as it's done through the API so whatever bbPress calls it, is fine.

    If you are trying to use this with alpha 1.0, I no longer support 1.0 until it goes final.

    Posted: 3 years ago #
  10. Well, it's working fine for me now on

    FreeBSD webmu.nfshost.com 7.1-RELEASE-p2 FreeBSD 7.1-RELEASE-p2 #2: Fri Jan 30 04:25:26 UTC 2009

    on PHP5 running in safe mode with a MySQL 5.0.something backend on bbPress v. 0.9.0.4 - both the plugin and bbPress itself. I guess I must amend my earlier statement; removing the parameter for queuing the mail (good idea, just not right for my particular host) and hard-coding the table-previx into the bb_capabilities meta key seems to have gotten it working.

    The bb_capabilities thing should not be a problem as it's done through the API so whatever bbPress calls it, is fine.

    Are you sure about that?

    mysql> select * from webmbb_usermeta where user_id in (1, 3,4,5) order by user_id;
    +----------+---------+-----------------------+---------------------------------+
    | umeta_id | user_id | meta_key | meta_value |
    +----------+---------+-----------------------+---------------------------------+
    | 1 | 1 | webmbb_capabilities | a:1:{s:9:"keymaster";b:1;} |
    | 2 | 1 | webmbb_topics_replied | 8 |
    | 3 | 1 | from | Regensburg, Germany |
    | 4 | 1 | occ | Consultant |
    | 6 | 3 | webmbb_capabilities | a:1:{s:6:"member";b:1;} |
    | 7 | 3 | from | Regensburg, Germany |
    | 12 | 3 | webmbb_topics_replied | 4 |
    | 13 | 3 | last_posted | 1235676894 |
    | 14 | 3 | webmbb_title | Gate Keeper |
    | 16 | 3 | favorite_notification | |
    | 8 | 4 | webmbb_capabilities | a:1:{s:13:"administrator";b:1;} |
    | 9 | 4 | from | Germany |
    | 10 | 4 | webmbb_topics_replied | 6 |
    | 11 | 4 | last_posted | 1235311753 |
    | 20 | 4 | favorite_notification | |
    | 15 | 5 | webmbb_capabilities | a:1:{s:6:"member";b:1;} |
    | 17 | 5 | webmbb_topics_replied | 3 |
    | 18 | 5 | last_posted | 1235684305 |
    | 19 | 5 | favorite_notification | |
    +----------+---------+-----------------------+---------------------------------+

    Looks to me like the meta-key name is hard-coded at line 160.

    160:	     AND (meta_key='bb_capabilities' AND NOT (meta_value LIKE '%inactive%' OR meta_value LIKE '%blocked%'))";

    But anyway, I'm glad it's working now and very thankful for the plugin!

    Posted: 3 years ago #
  11. Hey, _ck_.

    As usual, your plugins are the best!

    I'm running bbPress 0.9.0.2 on a Linux server (1&1) and everything is working great except for two issues. I can't seem to get the "Subscribed" tab to appear in the profile menu for any user except the admin. Users can only get to their subscriptions through the Views. Is there an option to turn on the tab in the code?

    Along the same lines, whenever I add a new subscription, I still get the notice "No new Subscribed Topics yet" on the Subscribed tab. When I click "
    Show All Subscribed Topics", the thread appears there just fine.

    Finally, I notice there appears to be an option to turn on daily and weekly email updates by uncommenting lines 33 and 34 in the code. Since I didn't find these mentioned in the documentation, do these options work with this version or are these there for future development? Just wanted to check to be sure.

    Just in case, here is the forum if you need to have a look: http://agitainment.com/ics/forum.

    Thanks for your help!

    Cheers.

    Posted: 3 years ago #
  12. Thanks for reporting the tab bug, I'll post a fix for it in a few moments (0.0.3)

    There is no support for daily/weekly yet, I haven't had the time to write it and they are much more complex than instant emails - so don't uncomment those lines.

    The logic with the new subscribed topics is that if there is no reply yet since you last viewed the topic, they will be hidden in the list. Hence the link to show all the subscribed topics. That way you can have a hundred subscriptions and only the active ones will show up.

    Posted: 3 years ago #
  13. The tab now appears properly in the profile menu.
    Thanks, _ck_!

    Cheers.

    Posted: 3 years ago #
  14. I think I finally got the plugin working. Couple of notes:

    *) I use a custom table prefix for my bbpress. It seems that the meta_key is not "bb_capabilities" but $bbdb->prefix."capabilities".

    *) The emails were not sent. I changed the mail() function to bb_mail() function.

    Thanks for the plugin

    Posted: 3 years ago #
  15. Thanks for reporting that toomasr, I'll make those changes.

    Posted: 3 years ago #
  16. frucot

    Member

    Nice plugin !
    Is there any way to translate it ?
    I see that you've allowed translation. Is that right ? With a little help, that's something i can do in French.
    This i can do for other of your plugins.

    Thanks for all your work

    Posted: 3 years ago #
  17. frucot

    Member

    I also had to change mail() to bb_mail()

    Now it works fine

    Posted: 3 years ago #
  18. The current version (0.0.4) has already been switched to bb_mail.

    Posted: 3 years ago #
  19. jfcarter

    Member

    This plugin works great for me. Only problem is that the drop down box shows up in really light grey on the site with light blue lettering (in Safari) and a white background with light blue lettering (in Firefox), so it's hard to see.

    Where can I change the color of the drop-down box and text color?

    Thanks again for a useful plugin.

    Posted: 3 years ago #
  20. Ah I tried to use system colors but I guess that's not working in all cases.
    You'll have to edit the plugin directly, around line 210

    I'll have to pick more standard colors in the next update.

    Posted: 3 years ago #

RSS feed for this topic

Add a Comment »

You must log in to post.