Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Notifi

SubJunkSubJunk ✭✭
edited November 2009 in Vanilla 1.0 Help
Notifi
«13456715

Comments

  • Uploaded version 1.3.1 of Notifi.
  • Hello, Klaus. First of all thanx for your efforts. I added this extension to my forum but when I try to subscribe for a discussion or a category, it simply cannot. I created a user for you in my forum. Could you please have a look at the situation. Thanx.
  • We have identified the problem and it is an incompatibility with another extension called Low-Cal Vanilla. I will attempt to find a fix but in the meantime I have made an "Incompatibilities" section in this extension's description to let people know.
  • I have "Notify" extension on my internal forum. If I upgrade to your extension, will it keep all my existing notification subscribed by users? Is it still using same tables? I want to upgrade to this one rather than having an inactive extension (if I can), but I don't want to loose my existing subscriptions for notifications. That will just be a hassle for users.

    Thanks
  • I've made no changes to the tables except for the name of the main one, because I didn't want any conflicts with Notify.
    It used to be called prefix_Notify, now it's called prefix_Notifi, where "prefix_" is of course your Vanilla table prefix, which I think is "LUM_" by default.
    But what you can do is easily get an export of your current database, grab the part with the Notify table, then just replace "Notify" with "Notifi" and run the code to insert it, effectively copying the Notify table to the Notifi one.
    If you want more specific instructions my email address is in the extension, it would be easier to help if I can ask questions about your setup. It should be very simple, though.
  • Hm. Is it possible to extend this to both sending out the new post and having an option as to weather or not it should send out for every new post in the subscribed forum - and not only once?

    I would love to have a plugin for subscribing via e-mail.
  • I've just tried installing this extension, and am not having too much luck. Basically, I click on a discussion to be subscribed, and the little swirly loading thing just spins for ever (or at least, as long as I waited) :) It hasn't made any difference to the settings and when I reload, or view my notification settings under my account settings, everything is unticked. any help appreciated.. thanks
  • To Daniel_SJ:
    That is a good idea, I will try to implement that in the next release.

    To tekhammer:
    What other extensions do you have? That is the same thing that happens if you have the extension Low-Cal Vanilla 0.4.3 enabled. This plugin has been tested on fresh installations of Vanilla and it works perfectly, so the only thing that can be interfering is other extensions.
    Try disabling your extensions one by one, each time checking if Notifi works. When it works you will know which extension is causing the problem, then if you can tell me which one it is that will be very helpful for me.
  • disabled all others, and still not working. just twirls forever.. the other extensions are Buy A Drink 1.1, Discussion Filters 2.0, and Preset Avatars 1.0.
  • I just added this discussion and did the following to use this extension rather than "Notify":

    - Renamed PREFIX_Notify table to PREFIX_Notifi (backed up old table)
    - Renamed NotifyId to NotifiId in new table

    I found following statement in line 152 of default.php

    [code]
    mysql_query("UPDATE `LUM_User` SET SubscribeOwn = $Switch WHERE UserID = $UserID",$Context->Database->Connection);
    [/code]

    I changed it to following to have my prefix as it is different from "LUM_"
    [code]
    mysql_query("UPDATE ".$Context->Configuration['DATABASE_TABLE_PREFIX']."User SET SubscribeOwn = $Switch WHERE UserID = $UserID",$Context->Database->Connection);
    [/code]

    In any case, this wont work for me as I dont have SubscribeOwn column in User table. can you please explain what it is?



    Also, I want to be able to add Comment added (because of which notification is generated) in the email body. I noticed that you have $mComment in the array. I tried adding {comment} in the email body but it's adding nothing and when I tried to find where $mComment is defined, I couldn't find anything.

    How can I put comments in the body? Please help.


    EDIT: I have some categories which are only available to certain roles. Some of the users on my forum have subscribed to ALL discussions. Will they get notification even if they can't see this category where a new comment is posted? I can ask some of the users to make sure but I want to ask you, as author of this extension, to confirm.

    Thanks
  • To iamspammer:
    The SubscribeOwn column is just a switch that when enabled (by entering "1") means that user will be automatically subscribed to discussions they start. It isn't a fully implemented feature, but I plan to make a better control panel for the next release, which will allow users to use that feature, among others.
    Users will only be notified if they have permission to view that category.
    I might add the ability to put more information in the email body at a later date, once I have finished with some other new features.

    To tekhammer:
    I don't know what the problem could be, it has worked for many others so maybe an old extension left something over that is breaking it, or you/someone have edited the code manually. Maybe you should try a fresh install.
  • Uploaded version 1.4 of Notifi.
  • To iamspammer:
    The SubscribeOwn functionality now works (when the user has the SubscribeOwn column, of course :))
  • Sub Junk: That is a good idea, I will try to implement that in the next release.
    Cool! Please tell me if you want any help or ideas, would love to see this but ain't too good at php myself.
  • I didn't put it in this release as you can see, but definitely in the next one which won't be too far away, probably next weekend as that seems to be the only time I can work on this at the moment.
    Also, at the risk of opening Pandora's Box by posting this publicly, sure I am always happy for help and ideas. Vanilla is used so differently by everyone I'm sure there are great features I have never even considered.
    • I don't know what the problem could be, it has worked for many others so maybe an old extension left something over that is breaking it, or you/someone have edited the code manually.
    it's only been running 4 days.. no old extensions..
      Maybe you should try a fresh install.
    you're a windows user aren't you? :)

    hitting it in the face with a sledgehammer isn't a solution.

    No big deal though, I don't need Notifi. It's not a show stopper for me.
  • I run 4 OS's; 2 Linux distros, XP and Vista.
    Sorry to lose you and your helpful opinions.
  • I have updated to new version. I have also checked that, those new columns (SubscribeOwn and SubscribedEntireForum) are added to table.

    But, how do we turn these on? I looked inot "Forum preferences" but couldn't find anything which says to subscribe to your own discussion.

    Also, any ETA when you will add that "comment in email" feature? I was hoping soon but I understand it will be on your own schedule.

    BTW, thanks for all the updates and fixing bugs.


    You asked for new features. One of the users requested that it'd be good if they continue to get emails even if they don't visit forum after getting one notification. It can be configurable and by default users will only get one email and until they visit forum, they won't get any other emails. But, they can go to "Forum Preferences" and then turn on notification even if they don't visit forum.

    Users claim that they sometimes forget that they received email and then they keep on waiting for another email but they won't get any because they forgot that they have to visit forum once after a notification.

    Thanks
  • I added following code at line 143. This is work around to add comment in the email until you come up with the solution. Just wanted to post it here in case anybody needed it now.

    [code]
    $result = mysql_query("SELECT Body FROM ".$DiscussionForm->Context->Configuration['DATABASE_TABLE_PREFIX']."Comment WHERE CommentID = '$CommentID'");
    $row = mysql_fetch_row($result);
    $mComment = str_replace('
    ',"\n",strip_tags($row[0]));
    [/code]

    Problem is that Vanilla Email only supports plain text now. I can change it to HTML but then I'll have to your email_notify.txt to include
    for new line and other HTML code for link.

    I din't want to do this because if you submit any updates, and if I forgot to change it then all users will complain.

    So, work around for now is

    $mComment = str_replace('
    ',"\n",strip_tags($row[0]));

    This will change
    to new line and strip all html tags like

    and so on. This will loose all formatting in the email but this is the workaround for now. Hopefully you have something else planned.


    -----

    To send an HTML email, you can ask users to change library/Framework/Framework.Class.Email.php line.


    They can ADD following at line 33

    var $ContentType = 'text/plain';


    ADD Following at 103
    $this->ContentType = 'text/plain';


    and UPDATE following with 144

    .'Content-type: '.$this->ContentType.'; charset='



    All it does is, change Static content type to variable based.

    Then you can change it from your class like $e->ContentType = 'text/html';




    Like I said, I din't do this on my forum in the hopes that you'll have another sophiticated work around this problem.

    Thanks

  • To iamspammer:
    I will hopefully release the new version, 1.5, in a few hours. I have made a lot of changes for this version (I think a .5 version should always mean pretty big changes, I'm just a romantic like that :p) and I wouldn't be surprised if the feature of having the comment in the email is in this version.
    Oh and the setting SubscribeOwn setting is controlled by each user by going to the Notification section in the Account tab. There, the option is "Automatically subscribe me to discussions I have started "
Sign In or Register to comment.