Description
Noty_messages implements Noty Library inside of the Drupal system, allowing the user to overtake some or all messages and display them similar to the growl messaging system. Normally it was meant for JQuery 1.7, but I wrote an addon to be able to use it with older jquery versions.

Similar Projects
There are no other modules for drupal that allow to use this specific library. A full project has been started by iler but he has graciously agreed to let me go through the review process in order to become a vetted user and has been added as the maintainer to this project instead.

However, there are similar modules that implement this kind of functionality:
Purr Messages
Besides implementing a different library, this module does not provide the per - message type flexibility that this module does. It also provides rules integration which is on the roadmap for this module. It also does not use the queue or or delay systems in jQuery. Furthermore, there is no capability to provide custom buttons or callbacks (which while undocumented at the moment is possible to do in this module). I really like this module and believe it be a strong solution, however this module implements a different solution to a similar problem.

Growl Notify
I did not do heavy research into this module's code, but it does rely heavily on notifications modules and messaging modules which is different than what this module is working to accomplish. Also there is no Drupal 7 Port.

jGrowl
This implements the jGrowl library which is also a different beast. There is also no Drupal 7 port at the moment.

Better Messages
I saved the best for last. This module also does not implement the noty library, but is a worthy competitor indeed. The same level of customization can be achieved and you can even alter the template files. However, this library uses php templating for theming the messages which makes it much more robust. In noty messages, all the theming is done with CSS and the variables are passed directly through the message. PHP's involvement ends after the scripts are on the page which makes the messages much more flexible and callable. There are much more differences here, and I truly do not consider this module to be in the same category. Also there's no stable Drupal 7 Port.

Review Bonus
Run 1

Run 2

Project Links
Sandbox
git repository viewer: http://drupalcode.org/sandbox/MrMaksimize/1449608.git
git clone url: http://git.drupal.org/sandbox/MrMaksimize/1449608.git

Comments

chi’s picture

[EDIT] Oops, It seems I cloned default branch.

chi’s picture

Status: Needs review » Needs work

There are some issues you can work:
http://ventral.org/pareview/httpgitdrupalorgsandboxmrmaksimize1449608git

  // Check for lib path existence.
  if (!is_file(libraries_get_path('noty') . '/js/jquery.noty.js')) {
    return FALSE;
  }

I think it's a not good idea to check libraries for every message. Use hook_system_requirements() instead.


dependencies[] = ctools
Please clarify me by which way it used in your module.

MrMaksimize’s picture

Oh interesting.... good catch! Will fix that up...

Also, noticed that ventral is freaking out about the promise.js which is really just a small jquery port and has already been merged into noty. I think i'll just dump it from the repo

As for ctools, you're absolutely right - it's not being used and that dep is going away. I think i just put it there because I was working with js and *thought* I would use it :)

One other thing - do you have any idea what this means? +12: [critical] Potential problem: drupal_set_message() only accepts filtered text, be sure all !placeholders for $variables in t() are fully sanitized using check_plain(), filter_xss() or similar.

this is the line it's talking about:

drupal_set_message(t('Please install noty library'), $type = 'warning');

MrMaksimize’s picture

Yay!! Good call on hook_requirements. I always wondered how that was being done. pushed up a fix.

This is the only thing left in ventral

sites/all/modules/pareview_temp/./test_candidate/noty_messages.install:
+12: [critical] Potential problem: drupal_set_message() only accepts filtered text, be sure all !placeholders for $variables in t() are fully sanitized using check_plain(), filter_xss() or similar.

sites/all/modules/pareview_temp/./test_candidate/noty_messages.admin.inc:
+104: [minor] in most cases, replace the string function with the drupal_ equivalent string functions

I'm not sure how to fix either one of those. The related lines are:

 drupal_set_message(t('Please install noty library'), $type = 'warning');

and

'#title' => t('@type messages', array('@type' => ucfirst($message_type))),
chi’s picture

As stated in documentation hook_system_requirements() should be placed in module_name.install file.

Note that this hook, like all others dealing with installation and updates, must reside in a module_name.install file, or it will not properly abort the installation of the module if a critical requirement is missing.

chi’s picture

function noty_messages_enable() {
  if (!is_file(libraries_get_path('noty') . '/js/jquery.noty.js')) {
    drupal_set_message(t('Please install noty library'), $type = 'warning');
  }
}

It looks as $type variable is not used.

chi’s picture

'#title' => t('@type messages', array('@type' => ucfirst($message_type))),

As ucfirst() is not multibyte-compatible Drupal has custom implementations of the function.
drupal_ucfirst()

patrickd’s picture

@Chi, thanks for your help, but would you mind to edit your last comments instead of posting a new one for every issue you find? (Just for readability) ;-)

christianchristensen’s picture

This looks like a really useful module - I would love to start using this in place of something like Better Messages as this certainly seems to provide more visual configuration options and a "more current" UI. Very neat!

iler’s picture

Status: Needs work » Needs review

Changing status as these things seem to be fixed.

MrMaksimize’s picture

D'oh. Late night coding = i thought the docs said NOT to put it into the install file. /me slaps self with fish. Thanks @iler for fixing that up!

targoo’s picture

Hi

1) noty_messages.admin.inc
You can use $form['#attached']['js'] instead of drupal_add_js() in your forms (like noty_messages_admin_settings) so others can easily manipulate it.

2) noty_messages.admin.inc
t() should not contain tags.

http://drupal.org/node/322731

$message = t("If you don't want to receive such e-mails, you can change your settings at !url.", array('!url' => l(t('My account'), "user/$account->uid")));
$title = t("@name's blog", array('@name' => $account->name));
$message = t('%name-from sent %name-to an e-mail.', array('%name-from' => $user->name, '%name-to' => $account->name));

3) noty_messages.admin.inc
Do you always need the variable $disabled in noty_messages_admin_settings ? If the js is not present you will not display some of these fields anyway ? And in 'noty_messages_generate_settings_form' it seems $disabled is always FALSE ?

I will leave it to needs review as I didn't spot anything critical so you can get other reviews. But we do really need more hands in the application queue and it is highly recommend to get a review bonus so we will come back to your application sooner.

Check : http://drupal.org/node/1011698

See also #1410826: [META] Review bonus

Thanks,

MrMaksimize’s picture

@targoo

Thanks for the review! The last commit fixes all the issues you mentioned above. Good call on the disabled - that was left over from before I discovered states :) I was thinking at first of using it to control which menu items would be disabled, but it feels more like a UI hassle than help.

I also will get on reviewing some other people's stuff :)

chi’s picture

Status: Needs review » Needs work
  1. Why did you defined these constants? I found only three used in the rest of the code.
    // Passed to JS.
    define('NOTY_LAYOUT', 'topRight');
    define('NOTY_TEXT_ALIGN', 'left');
    define('NOTY_SPEED', 500);
    define('NOTY_TIMEOUT', 5000);
    define('NOTY_CLOSABLE', TRUE);
    define('NOTY_CLICK_CLOSE', TRUE);
    define('NOTY_MODAL', FALSE);
    define('NOTY_TYPE', 'success');
    define('NOTY_THEME', 'noty_theme_default');
    
    // Config.
    define('NOTY_ADMIN_PATH_DISABLE', FALSE);
    define('NOTY_IS_NOTY', FALSE);
    define('NOTY_USE_GLOBAL', TRUE);
  2. Also, I found many unused variables:
    -  noty_messages_messages_setup($admin = TRUE);
    +  noty_messages_messages_setup(TRUE);
    -   $disabled = TRUE;
        return $form;
    function noty_messages_generate_settings_form(&$form, $message_type, $defaults, $disabled = FALSE) {
      $settings_key = $message_type;
    -  $disabled = FALSE;

    -  $custom_css = noty_messages_get_custom_css($themelayer = TRUE);
    +  $custom_css = noty_messages_get_custom_css(TRUE);
    -  $custom_css = noty_messages_get_custom_css($themelayer = TRUE);
    -  if (!empty($custom_css)) {
    +  if (!noty_messages_get_custom_css(TRUE)) {
        drupal_add_css($custom_css);
      }
  3. You are using empty function everywhere but actually it isn't required for bool values.
    - if (empty($admin)) 
    + if (!$admin)
    
  4. As you said promise.js makes it possible to use Noty Library with older jQuery versions but the module still has a dependency on jquery_update module. Are there any reasons for this?
    dependencies[] = jquery_update
    
  5. Do not use newlines and multiple spaces inside t() it makes the string untranslatable. Also seems that's incorrect path "admin/settings/noty"
      if ($path == 'admin/settings/noty') {
        return t('Set your options and decide whether you want the noty styled messages
          to appear on admin pages or not.');
      }
MrMaksimize’s picture

Hi Chi!

Thanks for the thoroughness. To answer your questions:

  1. The constants that are defined are actually used several times, just not referred to directly. This is line 412 in the .module file
    $config_keys[$value] = variable_get('noty_messages_' . $value, _noty_messages_get_default($message_types, constant(strtoupper('noty_' . $value)))); that uses the constants. And there are numerous functions calling back to this one.
    • I'm assuming you're talking about the admin variable in noty_messages_setup. That is actually used within the function to determine whether to preload multiple css themes for previewing.
    • I got rid of the $disabled in admin.inc with the code I pushed last night
    • $custom_css = noty_messages_get_custom_css(TRUE); custom_css is used as a css override as needed and gets put into drupal_add_css()
  2. empty() usage if just something I'm used to using to do what I believe are safe checks with booleans. I had bad experience with !$variable checks before. Unless it's a performance issue or a code standards issue that I'm not aware of, I'd like to keep the emptys
  3. The Deferred object - http://api.jquery.com/category/deferred-object/ was introduced in Jquery 1.5, and sine Noty relies heavily on it, promise.js only adds the promise functionality not deferred.
  4. Good catch on that string!!! And the path!! Will fix that right up!
  5. Whew that was long :)

MrMaksimize’s picture

Just pushed up a fix for that hook help :)

MrMaksimize’s picture

Status: Needs work » Needs review

Forgot to set needs review

MrMaksimize’s picture

Issue summary: View changes

Added a space

MrMaksimize’s picture

Issue summary: View changes

Adding one project for review bonus

chi’s picture

Status: Needs review » Needs work

I'm assuming you're talking about the admin variable in noty_messages_setup.

I mean noty_messages_admin_settings(). I cannot find $admin variable within the function. Here is the code.

function noty_messages_admin_settings() {
  // Per message configs
  // Clear out the form first.
  noty_messages_messages_setup($admin = TRUE);


There is another unused variable $themelayer inside noty_messages_messages_setup():
$custom_css = noty_messages_get_custom_css($themelayer = TRUE);

Always check $is_noty in noty_messages_type() it seems that the variable will never change. $message_types in noty_messages_settings_reset() seems as unused.


empty() usage if just something I'm used to using to do what I believe are safe checks with booleans. I had bad experience with !$variable checks before.

There are no any reasons to use empty() if you are sure that a variable is set and it can be evaluated to TRUE or FALSE.


Here some other examples:

-  if (empty($theme)) {
-    // We're looking for core noty css additions.
-    $file = 'noty.css';
-  }
-  else {
-    $file = $theme . '.css';
-  }
+  $file = $theme ? $theme . '.css' : $theme . '.css';
-      '#default_value' => empty($defaults['use_global'][$message_type]) ? FALSE : TRUE,
+      '#default_value' => !empty($defaults['use_global'][$message_type]) ,
-  if (strstr($message, '<pre>') || strstr($message, '<textarea') ||
-    strstr($message, 'krumo')) {
-    // Devel message found.
-    return TRUE;
-  }
-  else {
-    return FALSE;
-  }
+  return preg_match('/<pre|<textarea|krumo/', $message);
-  $output = '';
-  $output .= "<div class=\"messages $type\">\n";
+  $output = "<div class=\"messages $type\">\n";
-  if ($themelayer == TRUE) {
+  if ($themelayer) {

There is a lot of such similar micro issues in your code. It isn't a performance issue or a code standards issue it just makes your code clear and unambiguous.

pdrake’s picture

I would not recommend changing from strstr() to preg_match() for performance reasons, though switching to strpos() would be advisable (see the note on http://www.php.net/manual/en/function.strstr.php).

chi’s picture

$message = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.';
$start = microtime(1);
$result =  preg_match('/<pre|<textarea|krumo/', $message);
$end = microtime(1);
echo round(1000*($end - $start), 3) . ' ms';

I got about 0.03 ms. It's too little to take into account (especially in Drupal).

But actually it doesn't matter what are you using preg_match or strpos. I just pointed on code style.

-  if ($bool_value) {
-    return TRUE;
-  }
-  else {
-    return FALSE;
-  }
+  return $bool_value;
MrMaksimize’s picture

Status: Needs work » Needs review

@Chi @pdrake,

Thanks again for taking the time to review and post here guys :) Much appreciated.

I found a nice set of performance tests for functions here, and made some decisions based off of this:

for the strpos/strstr/preg_match dilemma, the devel_check now looks like this:

function _noty_messages_devel_check($message) {
  // Check for devel messages.
  // @todo some further checking will probably happen in the future.
  // If checking more than this, use regex and be done with it.
  return (bool) (strstr($message, "<pre>") || strstr($message, '<textarea') ||
    strstr($message, 'krumo'));
}

The reason is strpos is acting weird within an OR statement like this (returning BOOL 0), preg_match would be too much of a performance hit, and strstr seems like a nice compromise

I've gotten rid of all the function($var=something) calls I could find, that's a great point, although if the goal is to improve readability leaving them may be better. But no use taking up a pointer if the variable isn't reused (yes I do write some objective c :))

I've also cleaned up the micro issues I could find in my code, and followed @Chi's suggestions.

However, I still have a major problem switching from empty(); I don't think it cleans up the code, I actually think it improves readability, and seems to be a small performance win for undefined variables. (but a minor 2ms loss for false / true, but I'd rather be safe than sorry).

Pushing up latest and running through ventral - http://ventral.org/pareview/httpgitdrupalorgsandboxmrmaksimize1449608git. Setting to needs review :)

chi’s picture

What about $is_noty variable in this function? It seems that the variable will never change.
Also did not found by which way $messages parameter is used.

function noty_messages_type($type, $messages) {
  // Assume TRUE.
  $is_noty = TRUE;
  // Check type visibility.
  $active_types = variable_get('noty_messages_is_noty', _noty_messages_get_default(array($type), NOTY_IS_NOTY));
  if (empty($active_types[$type])) {
    return FALSE;
  }
  // Should the messages be shown on admin paths?
  if (path_is_admin(current_path())) {
    $admin_path_settings = variable_get('noty_messages_admin_path_disable', _noty_messages_get_default(array($type), NOTY_ADMIN_PATH_DISABLE));
    if (!empty($admin_path_settings[$type])) {
      return FALSE;
    }
  }
  // If no other conditions have return FALSE by now, show type.
  return $is_noty;
}




Sometimes it is good practice to pre-initialize your arrays when applicable so you don't accidentally populate data to an existing array with the same name defined elsewhere in the code. I didn't find any information about it in Drupal code standards but core modules don't use this practice. See node_block_info() for example.

 function noty_messages_admin_settings() {
   // Per message configs
   // Clear out the form first.
   noty_messages_messages_setup(TRUE);
-  $form = array();


Take look at the noty_messages_status_messages() seems as $output was initialized twice. Also check $noty_out that seems to be unused.

 function noty_messages_uninstall() {
-  module_load_include('module', 'noty_messages', 'noty_messages');
+  module_load_include('module', 'noty_messages');
-   $config_keys = _noty_messages_get_config();
-   foreach ($config_keys as $key) {
+   foreach (noty_messages_get_config() as $key) {
     variable_del('noty_messages_' . $key);
   }
 }

There is discussion about deletion of variables prefixed with your module's name.
http://drupal.stackexchange.com/a/2476/432

MrMaksimize’s picture

@Chi if didn't know better, I'd say you have an automated tool I don't know about :p

Removed is_noty variable and $messages from noty_messages_type();

Cleaned up noty_messages_status_messages from unneeded variables and functions
Cleaned up hook_uninstall

RE: Deleting variables - great point! And I didn't even think about that, but I'm already implementing that kind of functionality. By iterating only through the return of _noty_messages_get_config, I'm limiting the deletion only to my modules' variables.

As for initializing arrays, I think I'll keep them around, I do feel like it is good practice and it gives me more granular control :)

Latest fixes are up there and thanks for the review! (ventral is clean)

chi’s picture

Yup, about variables you are right. 'noty_messages_' . $key seems to be safe.

luxpaparazzi’s picture

Shouldn't you use http://git.drupal.org/sandbox/MrMaksimize/1449608.git as your GIT-URL?

Respect for your inline-documentation, I should probably hire your for documenting my own code ;)

I did not see any major problems, but I'll definetly correct the following:

I'll put an empty line between function calls

}
/**

found before:
- before noty_messages_build_messages()
- noty_messages_generate_settings_form()

HTML should not be put into t() function:

      $requirements['noty_messages_js'] = array(
        'value' => $t('Missing!'),
        'severity' => REQUIREMENT_ERROR,
        'description' => $t('Noty library missing. Download the Noty library from <a href="@url">http://needim.github.com/noty/</a> and place in in to sites/all/libraries/noty', array('@url' => 'http://needim.github.com/noty/')),
      );

I let the status "needs review" for other people having a look at it.

patrickd’s picture

btw, it's kind of allowed to put a-tags this way into t() functions (just have a look at core hook_help implementations [I don't like that either])

patrickd’s picture

Issue summary: View changes

Formatting

MrMaksimize’s picture

@luxpaparazzi and @patrickd, thanks for the review!

Just added the proper clone url - for some reason I thought it should point to the repo viewer. D'oh.

Also fixed spacing :)

This t() thing, seems to be weird. It was mentioned before in this comment, but then I looked up this handbook page and that's exactly what it tells people to do. I already changed one line like that, so I just made this the same. Thanks for the catch.

Also added Drupal.t to the test messages :)

And @luxpaparazzi I do love my inline docs :) Perhaps even overuse them. But if not for them, I wouldn't know what half my code does lol :)

MrMaksimize’s picture

Ignore this one. I posted another review comment in the wrong issue.

MrMaksimize’s picture

Issue summary: View changes

adding proper clone url

MrMaksimize’s picture

Issue summary: View changes

Adding review bonus 2

MrMaksimize’s picture

Issue summary: View changes

Missed a tag

MrMaksimize’s picture

Issue summary: View changes

one more review

MrMaksimize’s picture

Issue tags: +PAreview: review bonus

Setting tag for PARreview: review bonus

chi’s picture

Status: Needs review » Needs work

I suppose that submit handler will not be executed if form validation failed.

 function noty_messages_admin_settings_submit($form, &$form_state) {
-  if (!form_get_errors()) {





It seems you reinvent the wheel. There is a simple drupal function which can help you add default buttons and reset module settings.
system_settings_form

- 'reset' => array(
-   '#type' => 'submit',
-  '#value' => t('Reset all settings'),
-  '#submit' => array('noty_messages_settings_reset'),
- ),

- function noty_messages_settings_reset($form, &$form_state) {
-   $defaults = _noty_messages_get_config();
-   foreach ($defaults as $key => $value) {
-    variable_del('noty_messages_' . $value);
-  }
- }

I am wondering is there a real need to have "global messages settings"? I think it doesn't bring any UX profits for such simple module as noty_messages.
The same question about custom css functionality. There is a lot of ways to add custom css. Why do you want to make your own method for this?
Removal of these features make your module more maintainable.
Of course it is my subjective opinion :-)

MrMaksimize’s picture

@chi
Hmm good point!! I'll check out this system_settings_form tomorrow morning - I'm pretty much brain dead for the day :) Lol love that node though - "Let's face it. You're smart, but it's really good odds that someone else in the world has tried this before, and then written it into an API." That's Drupal in a nutshell :)

OH wait, couldn't resist looking at the form. It won't do the reset though - or is there something I missed?

I do agree with you - there are multiple ways to add custom css. But the noty library provides a custom theming system which is pretty nice, and while - yes, i can write in my own css in a random file provided by this theme, consider multi - theme sites, theme switching, or say you want to have pre-defined system messages in different sections of the site (theme switching is on my todo list). I just think it gives more flexibility that way.

Global settings - also a good point, they could be removed. But as we know, Drupal can sometimes be a headache to administer. So I do wanna give the option - set it and it'll work of all of 'em, or customize it.

I don't believe removing either one would make it more maintenable, but keeping them would make it more flexible. I also want to integrate this with rules at some point at which point i think these features would come in handy :)

I mean - to be honest, I think this discussion is meta ;) It's either your subjective opinion or mine, or someone else's on the queue. And we've had quite a few people check this module out, but no one has actually used it in a production site, and the number (compared to the larger community) is small. I think the real answers to these questions will come about when there are people actually using this module and posting in the issue queues.

chi’s picture

Status: Needs work » Needs review

Oops, in D7 the reset button has been removed, but it is not documented yet.
#518750: Rethink the system settings form

MrMaksimize’s picture

StatusFileSize
new1.25 KB

Cool cool. So I switched to system_settings_form, I'm a bit iffy though if that's a win. I added a rough patch of the last commit so you guys can see what changed.

I kept it contained so i can always just revert.

patrickd’s picture

Assigned: Unassigned » patrickd
patrickd’s picture

Assigned: patrickd » Unassigned
Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: review bonus
  1. now as the d.o/project/noty namespace already exists, why don't merging the code in there to prevent duplicating namespaces and confusion?
  2. php = 5.1 drupal7 requires 5.2, therefore senseless here
  3. Your readme contains good information but looks very unstructured, have a look at typical readme styles
  4. use /**/ comment style instead of // when your commenting in global space
  5. begin all comments uppercase and end them with fullstop / ? / !
  6. use the full module name when prefixing variables
  7. wrap translatable test in t(), also in hook_permission (but not in hook_menu or watchdog())
  8. IMHO your hook_help implementation is not very helpful (at least not worth spending runtime with), maybe you either remove it or provide more help
  9. 'access callback' => 'user_access', this is a default value, you don't have to set it
  10. 'original_status_messages' you probably should also prefix that theme function with your full module name
  11. function noty_messages_uninstall() {
      module_load_include('module', 'noty_messages');

    (not tested it) but are you sure this is necessary ?

  12. is it really necessary to reinvent the configuration system ? ^^ but okay, if you want it that way, why not
  13. array('type' => 'setting', 'cache' => FALSE)cache key only works for added files, neither for settings nor for inline js
  14. I'm also not sure whether noty_messages_get_custom_css() is really needed, maybe I missed it but why exactly are you doing it that way? wouldn't just overriding it by the theme's css not work?
  15. add your configuration page with "configure = " (https://drupal.org/node/542202) to your .info file
  16. It's a little hard to find the actual download page of noty from the current link, maybe you use http://needim.github.com/noty/#installation instead
  17. make sure to check that speed and timeout settings are positive integers (eg. by element validation and element_validate_integer_positive)

but this looks all pretty good to me, we'll get this done soon ;)

I've removed the "review bonus" tag, you can add it again after 3 more reviews, remember to pick old issues first
thanks

regards

MrMaksimize’s picture

Whoa awesome patrickd! Thanks for the review!! I'm so excited!!

Just giving this a quick look (will dive in deeper tonight / tomorrow), but a few questions about your notes:

6. use the full module name when prefixing variables - would this include globals too that I define at the top of the .module file?

12. is it really necessary to reinvent the configuration system ? ^^ but okay, if you want it that way, why not - would you mind elaborating on this a bit? Is this in relation's to Chi's comment here - http://drupal.org/node/1510938#comment-5835182?

Re: review bonus - sorry about that :) I just saw the note about picking older issues on the doc page after I did the reviews. Will pick older ones next time :)

MrMaksimize’s picture

StatusFileSize
new27.41 KB

Hi Patrick!!

Went through the code and made (most) of the changes:

1. RE: Namespace - I've been working on noty_messages for a while, and close to the end Iler pinged me and said he saw my project after he already created the namespace. I asked him if it would be ok if I bring him in as collaborator so I could go through code review on this module, get vetted status and have my first project up on d.o. He agreed and said he was willing to deprecate / remove the namespace in favor of this one. (Drupal community love right there!) Also, this one is a bit different (noty vs noty_messages). Lol I know it's kind of dumb, but I've been wanting to get a project on d.o for a while and if possible that's the way I'd like to go.

2. Removed php version from info file

3. Fixed README

4. Adjusted global space comments from // to /* */

5. Went through all the comments and adjusted for capitalization and fullstops.

6. Changed global defined variables to noty_messages namespace

7. Wrapped the text in t() where missed

8. Wrote a better hook_help

9. Removed access_callback key from menu item

10. Prefixed original_status_messages to be noty_messages_original_status_messages

11. Yeah the module_load_include is needed, otherwise it won't find the function :(

12. Still not sure what you mean here :)

13. Removed cache from $options array for drupal_add_js

14. Ended up removing get_custom_css. Overriding css in the theme makes sense. I'm only doing some switching for when the user picks a custom theme, otherwise, they can just put overrides into a css file like normal

15. Added configure link

16. Changed all links to noty messages into the actual repository

17. Added element validation

MrMaksimize’s picture

Issue summary: View changes

one more

MrMaksimize’s picture

Issue summary: View changes

adding another review

MrMaksimize’s picture

Issue summary: View changes

Updated issue summary.

MrMaksimize’s picture

Issue tags: +PAreview: review bonus

I updated the issue with 3 more reviews, but I got a little confused. Not sure if I should change RTBC or leave it... Doesn't say anything in the process doc about this :)

So I'll just leave the RTBC and add the tag :)

klausi’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -PAreview: review bonus

manual review:

  1. noty_messages_admin_settings(): do not check for the library here again, this should be done only once in hook_requirements().
  2. noty_messages_admin_settings_submit(): why do you check form_get_errors() here? You never use form_set_error(), so there will never be errors?
  3. theme_noty_messages_original_status_messages(): don't create list markup yourself, use theme('item_list', ...) instead. Hm, I see that drupal core does not use it, so this is just a suggestion.

But that are just minor issues, so ...

Thanks for your contribution, MrMaksimize! Welcome to the community of project contributors on drupal.org.

I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.

Thanks to the dedicated reviewer(s) as well.

MrMaksimize’s picture

Aaaah!!! Thanks klausi and all the people that took time to review!! I'm very excited and am looking forward to being a good maintainer and contributor.

Re: manual review

1. noty_messages_admin_settings(): do not check for the library here again, this should be done only once in hook_requirements().
I'm not sure what a better way would be. If I don't check for the lib, the form will show up... And I don't want people to be misled thinking they can use the functionality when the library is not in place. Should i use something like drupal_check_module instead?

2. I am doing element validation for speed and delay using element_validate_integer_positive which would set a form_error. Or would that not even let it get to the submit function anyway?

3. I checked out theme_item_list, and I saw that it wraps it in

. I think that's why core doesn't use it, and same reason I can't :(

I do want to say I've really enjoyed the review process and will probably come back to participate in the review queues. I think the process is great and on the right track. Also I think you guys are doing an amazing job, keep it up. Thanks to all the reviewers once again!!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Updated issue summary.