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

1910121415

Comments

  • I've been notified by one of our endusers that Whispers messages to one user are being sent via email to ALL users who have notifications set for that discussion. This is NOT good. How do I stop that? Thanks in advance!
  • It's a bug I'm working on, should be fixed very soon. I was only made aware of it yesterday and was hoping to have it fixed by now. It only happens when they are subscribed to that specific discussion though, not with category or forum subscriptions.
  • I found the bug entered by Siddall above in the section under the comment #Add all users who have subscribed to this discussion , aren't already notified except the posting user:

    The line

    if (($Whispered == 1 AND $WhisperUserID = $row2[0]) OR ($Whispered == 0))

    should be changed to use the boolean equals operator to compare $WhisperUserID:

    if (($Whispered == 1 AND $WhisperUserID == $row2[0]) OR ($Whispered == 0))


    Also, near line 208, this needs to be fixed:

    if ($Whispered == 0) { $result = mysql_query("SELECT WhisperUserID FROM ".$DiscussionForm->Context->Configuration['DATABASE_TABLE_PREFIX']."Comment WHERE CommentID = '$CommentID'"); $row = mysql_fetch_row($result); if ($row[0] > 0) { $Whispered = 1; } else { $Whispered = 0; $WhisperUserID = $row[0]; } }
    to this (move the setting of $WhisperUserID up underneath $Whispered = 1):

    if ($Whispered == 0) { $result = mysql_query("SELECT WhisperUserID FROM ".$DiscussionForm->Context->Configuration['DATABASE_TABLE_PREFIX']."Comment WHERE CommentID = '$CommentID'"); $row = mysql_fetch_row($result); if ($row[0] > 0) { $Whispered = 1; $WhisperUserID = $row[0]; } else { $Whispered = 0; } }

    Thanks for this plugin, by the way!
  • I've just confirmed that the bug was carried over from Notify (the extension this is based on). It is amazing that this bug has existed since at least 2007 and no one has reported it until now. So at least I know it wasn't me who introduced the bug!
  • Thanks for that, hadfieldn, that was exactly it :) In a few minutes I will release a new version with your fixes and a few others. Thanks again :)
  • Uploaded version 2.0.1 of Notifi.
  • Uploaded version 2.0.2 of Notifi.
  • Hi SubJunk, Can you point me any ideas why my HTML emailings arrive as plaintext? I've turned HTML off, but I did like the formatting... Furthermore, you say (in the 2.0.2 changelog) that you've added quotations support, but my plaintext email doesn't parse the <blockquote> & <cite> elements (they show up). How is it supposed to work? Thanks. :)
  • Uploaded version 2.0.3 of Notifi.
  • @Subjunk (and others)

    I'm trying to optimize my forum speed/load time. The YSlow add-in to FireBug tells me my page uses a lot of
    external JS files. Upon closer inspection, the main problem is the huge and numerous scriptaculous/prototype-
    related libraries.

    Just happened to read another thread where the user mentions that Notify/Notify is the "culprit" adding this
    library on every comments/category/discussion page. I check my extensions folder (41+, 30+ activated) and
    see the only two add-ons including scriptaculous/prototype are pagemanager and notifi.

    Pagemng uses the libraries only in the settings pages, i.e. load tim affects admins. Notifi however inserts
    them on nearly every page:
    if (in_array($Context->SelfUrl, array('comments.php','index.php','account.php','categories.php'))) { $Head->AddScript('js/prototype.js'); $Head->AddScript('js/scriptaculous.js'); $Head->AddScript('extensions/Notifi/functions.js'); }
    When I disabled notifi, my external JS files go from 12 to 4, and page size is reduced by *40kB* (or 40%)
    to just 60kB. My discussion list loads blazingly fast (disclaimer: I have whispers turned off)

    Now why does Notifi need 40k in JS files? Nothing moves, animates, fades, etc. A quick peek through
    the code seems to indicate that the only spot JS is needed is for the little 'ajaxy' buttons that appear in
    the panel, which allow the user to manually turn on/off tracking discussions, categories, etc.

    I love this add-on, I think it's one of the must-have add-ons on the site, but 40k and 8 extra JS files
    makes me wonder if there isn't a little optimization we can apply? (yes I know Vanilla's admin section
    uses the scriptaculous library too, and I even know about browser caching etc. etc.)

    Am I missing something here? If I'm correct, can anyone offer some tips?

    S.
  • You're very correct that Notifi is bloated. It was like that before I started developing it, and I have always meant to address it more. I have made a lot of speed increases since I started developing it but it can get better, unfortunately I have a lot of things to do with Notifi and Whisperfi and Vanilla itself, and that's on top of all the other work and hobby coding I do every day so I am strapped for time. If you do come up with ways to make it faster, please email me with them so I can add the changes
  • I've used the following dirty hack: - Turned on MOD Deflate in .htaccess for .JS (and .html .php .xml .txt etc.) - Manually merged ALL scriptaculous scripts into one big JS include called scriptaculous.mergedmini.js - Revised the head.php file in my theme directory to scan the scripts array for scriptaculous.js, and replace it with scriptaculous.mergedmini.js Now I have just ONE external script call (vs 5), which can be cached. It always includes all scriptaculous modules. Mod-deflate will seriously reduce the required bandwidth. Since various Vanilla admin pages as well as PageMngr use scriptaculous as well, those pages are speedier too. Next step: scriptaculous never shows up by itself as it requires prototype.js. A review of the Vanilla 1.1.5a code reveals, prototype.js is never used by itself either, so my next step is to replace both prototype and scriptaculous with one call using the 'protaculous' script I discovered: http://groups.google.com/group/prototype-core/files (this will save me another connection, and MOD Deflate will need to compress one file less too). Yslow will love me! NOTE: All of these are hacks at best though. If I am correct that the scriptaculous code is used ONLY for the ajaxy buttons, there must be a way to re-implement that feature (after all, make sticky, sink etc. uses the same toggle functionality, without the heavy JS bagage) PS I'm mostly a PHP noob, so don't expect any major add-on contributions from me ;-) Appreciate all you experts out there, especially you and this add-on subjunk!
  • RaizeRaize vancouver ✭✭
    Is there an easy way to move the sidebar text "subscribe to this discussion" from it's own section in the sidebar to the rest of the "options" section?
  • I just installed the latest Notifi. But I am not getting any e-mails but the following warnings:- Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/rts/www/Vanilla-1.1.4/extensions/Notifi/_includes/install.php on line 13 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/rts/www/Vanilla-1.1.4/extensions/Notifi/_includes/install.php on line 22 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/rts/www/Vanilla-1.1.4/extensions/Notifi/_includes/install.php on line 31 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/rts/www/Vanilla-1.1.4/extensions/Notifi/_includes/install.php on line 40 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/rts/www/Vanilla-1.1.4/extensions/Notifi/_includes/install.php on line 49 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/rts/www/Vanilla-1.1.4/extensions/Notifi/_includes/install.php on line 58 Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/rts/www/Vanilla-1.1.4/extensions/Notifi/_includes/install.php on line 68 Any help is greatly appreciated.
  • SubJunkSubJunk ✭✭
    Are you still using version 1.1.4 of Vanilla? Because Notifi only supports version 1.1.5 and above
  • SubJunk: I am running Vanilla-1.1.8. I did not rename the folder yet. But it actually contains vanilla.1.18.
  • SubJunkSubJunk ✭✭
    Hmm then the error could indicate that your hosting account doesn't allow extra MySQL connections, do you use a shared hosting account?
  • is there a workaround to be able to use jquery while having notifi enabled?
  • SubJunk: We maintain our own host. We are in complete control of our MySQL configuration. Is there a specific MySQL configuration option that we should apply ?
  • SubJunkSubJunk ✭✭
    @basb:
    I don't think that would be possible because jquery is a conflicting library to the one Vanilla includes, so when extensions require you to use jquery or mootools that means any extensions that use Vanilla's built-in JavaScript libraries will break

    @nkapoor1:
    Is the core modified at all? Because those queries are pretty standard and use the same connection as Vanilla does so I don't see what there is to throw an error about
Sign In or Register to comment.