A Hello Bar is a simple notification bar to deliver a message and drive traffic to a specific call to action.

It inserts a DIV at the top of the HTML markup with a message and a link.
The Hello Bar code snippet grabs the user’s Hello Bar Messages and then loads it into the page in a DIV at the top of the document.

Video preview here!

Features

  • HelloBar's message is nodes.
  • Style presets.
  • Integration with Views.

Project page: http://drupal.org/sandbox/mrded/1793538
D7 version: git clone --recursive --branch 7.x-1.x http://git.drupal.org/sandbox/mrded/1793538.git hellobar

Thank you!

CommentFileSizeAuthor
hellobar.PNG89.94 KBmrded

Comments

mrded’s picture

Issue summary: View changes

fix parser mistake

cubeinspire’s picture

Status: Needs review » Needs work
Issue tags: +PAreview: security

Very nice module and video also ! Congrats :-)

Automatic review

1. http://ventral.org/pareview/httpgitdrupalorgsandboxmrded1793538git
There quite a lot of code standard errors.

Manual review

2. Javascript error: The js file defining helloBar is missing, maybe not commited ?

ReferenceError: HelloBar is not defined
[Break On This Error]
new HelloBar(message, options);

3. Line 25 of module file. As I understand from http://drupal.org/node/28984 there is a security issue here.
The url is an user entered value and it should be checked with check_url().

4. Line 25 of module file. The correct way to display a field is using this function field_view_value().
See: http://api.drupal.org/api/drupal/modules!field!field.module/function/fie...

Hope you will repair this js missing file so I can test this !

Bye,

Sergio

mrded’s picture

Hi logicdesign,
I am very glad, that you are started to review my module!

1. In process =)
2. Unfortunately, I cannot attach this JS because it's not free..
So now HelloBar JS is not attached, if it does not exist.
3. Fixed, sorry about that.
4. Could you tell me more in detail about it? (filename/part of code)

Thank you!

cubeinspire’s picture

hellobar.module line 25

4. Line 25 of module file. The correct way to display a field is using this function field_view_value().
See: http://api.drupal.org/api/drupal/modules!field!field.module/function/fie...

mrded’s picture

hellobar.module doesn't work with fields.

cubeinspire’s picture

True, is not on hellobar.module but hellobar_content.module line 25.

mrded’s picture

Status: Needs work » Needs review

Ok, it makes sense.

So,
1) Code style is fixed.
2) I've added validation for HelloBar js.
3) Fixed.
4) Fixed.

Thank you!

cubeinspire’s picture

I hope you will find a solution to avoid people coping the hellobar.js file, as it stays on client side...

Can I copy it for the purpose of this review and delete it after ?

cubeinspire’s picture

Status: Needs review » Needs work

The security issue is still there, the link_element is rendered directly without passing by check_url.
render($link_element)

There is also a reference problem:
Strict warning: Only variables should be passed by reference in hellobar_content_message_prepare() (line 32 of /var/www/d7/sites/all/modules/hellobar/modules/hellobar_content/hellobar_content.module).

To solve that don't encapsulate field_get_items() inside reset(), make intermediary variable.

mrded’s picture

Status: Needs work » Needs review

Unfortunately, this version of HelloBar is doesn't work.
Let me ask HelloBar's guys, maybe they can give us a free version for tests.

cubeinspire’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -PAreview: security

I'm having a deeper look to your code concerning the .3 remark of #1.
As the unchecked content from the database is not outputted directly but given to the js file the security check is out of the scope of the drupal module. I made mistake with that on #1 .3 and there is no blocker for the module.

In any case I would advice you to remove the strict warning that is still there before releasing as full project.
Strict warning: Only variables should be passed by reference in hellobar_content_message_prepare() (line 32 of /var/www/d7/sites/all/modules/hellobar/modules/hellobar_content/hellobar_content.module).

mrded’s picture

Strict warning is fixed.
Thank you for your review, it was really helpful for me! :)

klausi’s picture

We are currently quite busy with all the project applications and I can only review projects with a review bonus. Please help me reviewing and I'll take a look at your project right away :-)

mrded’s picture

I'm sorry, but I'm also very busy.. I'd rather wait.
Thank you in advance for your attention to this matter.

cubeinspire’s picture

Status: Reviewed & tested by the community » Fixed

I don't see any other problem here. I guess this module is ready.

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

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.

Thanks to the dedicated reviewer(s) as well.

mrded’s picture

Thank you, I really appreciate it! :)

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Add video preview.