The module adds a new field "Subtitle" to menu items form to set a string to show as a subtitle, under the menu link title text, when it's showed.

The module works on Drupal 7.x.

http://drupal.org/sandbox/mecmartini/1384010

git clone --branch master mecmartini@git.drupal.org:sandbox/mecmartini/1384010.git menu_subtitle

CommentFileSizeAuthor
#14 drupalcs-result.txt1.79 KBklausi

Comments

patrickd’s picture

Status: Needs review » Needs work

welcome,

There are some major issues you should fix:

  • You are working in the "master" branch in git. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
  • Remove "version" from the info file, it will be added by drupal.org packaging automatically.
  • Remove "project" from the info file, it will be added by drupal.org packaging automatically.
  • Remove all old CVS $Id tags, they are not needed anymore.
    menu_subtitle.install:2:// $Id: menu_icons.install,v 1.2 2009/04/10 07:50:20 skilip Exp $
    

As installation and usage instructions are quite important for us to review, please take a moment to make your project page follow the tips for a great project page. Also make sure your README.txt follows the guidelines for in-project documentation.

while waiting for an in-depht review of your module you can start out fixing some coding style issues detected by automated tools:
http://ventral.org/pareview/httpgitdrupalorgsandboxmecmartini1384010git

We do really need more hands in the application queue and highly recommend to get a review bonus so we can come back to your application sooner.

regards

mecmartini’s picture

Status: Needs work » Needs review
mallezie’s picture

Status: Needs review » Needs work

There are still some coding issues, you can find here

Manually tested your module.
README.txt is good, describes install and usage, and module works as expected.
Uninstalling doesn't delete the subtitles, but thats marked as todo in .install file, so i don't know if this is a 'project application' blocker.

/**
 * Implements hook_form_alter().
 */
function menu_subtitle_form_alter(&$form, $form_state, $form_id) {
  if ($form_id == 'menu_edit_item') {
    if (isset($form['mlid']['#value'])) {
      $options = unserialize(db_query('SELECT options FROM {menu_links} WHERE mlid = :mlid', array(
        ':mlid' => $form['mlid']['#value'],
      ))->fetchField());
    }
    if (!isset($options) || !isset($options['subtitle'])) {
      $options = array(
        'subtitle' => NULL,
      );
    }

I think it's better to use the drupal DB API to execute the query. Something like

function menu_link_load($mlid) {
  if (is_numeric($mlid)) {
    $query = db_select('menu_links', 'ml');
    $query->leftJoin('menu_router', 'm', 'm.path = ml.router_path');
    $query->fields('ml');
    // Weight should be taken from {menu_links}, not {menu_router}.
    $query->addField('ml', 'weight', 'link_weight');
    $query->fields('m');
    $query->condition('ml.mlid', $mlid);
    if ($item = $query->execute()->fetchAssoc()) {
      $item['weight'] = $item['link_weight'];
      _menu_link_translate($item);
      return $item;
    }
  }
  return FALSE;
}

This is from the menu API and i think there's also a drupal function you could use to find the options
http://api.drupal.org/api/drupal/includes%21menu.inc/7

mecmartini’s picture

Status: Needs work » Needs review

Ok I changed the query executed with a standard drupal DB API and added the uninstall code.

pgogy’s picture

Hello

admin/structure/menu could be a configure = in the .info (add say configure = admin/structure/menu as a new line in the .info file)
I would think about adding "package = user interface" as well to the .info file
admin/structure/menu is the default menu page, not sure where to go after that (see below)
I would add a hook_help to explain how to use this module (put the readme into the module - not everyone will read the readme)
You should probably add a hook_permissions as well so only certain people can add a subtitle

Hope this helps

Pat

mecmartini’s picture

#pgogy thanks for the suggestions.

I will do all of it, but before I'm waiting a reply from the drupal team to know if I can promote the my project to a full project. Hope they reply soon!

pgogy’s picture

Ok, then if you look for the review bonus scheme you might get approved quicker?

mecmartini’s picture

What you mean with "review bonus scheme"?

patrickd’s picture

He probably means the review bonus

mecmartini’s picture

Why nobody of drupal team care about this module review after a long time? Shoul I open a new thread?

patrickd’s picture

I'm sorry about the delay! there are currently about 300 active applications in the queue and about 100 waiting for review.
As we only got a handful of reviewers regularly doing reviews (and also reviewers can't spend their whole day reviewing applications) I strongly encourage you to help us review other applications and take part in the review bonus system (http://drupal.org/node/1410826).
Otherwise this will take some time.. :(

As only 1 application is allowed per user, you have to close this one if you create a new issue.

mecmartini’s picture

Don't worry patrick I wanted only know if my module is still in queue. Just because at the begin you replied me so quickly, so I was wondering if you had lost my task in the queue for some reason after this long time. I'm sorry to can't help you in review the applications but now I'm too busy to do it. I will wait my turn and thank you for your great work!

mallezie’s picture

Status: Needs review » Reviewed & tested by the community

It seems you fixed my concerns from last review. Based on that review, an resolved concerns, i'm marking this RTBC.

klausi’s picture

Status: Reviewed & tested by the community » Fixed
StatusFileSize
new1.79 KB

Sorry for the delay, but you have not listed any reviews of other project applications in your issue summary as strongly recommended in the application documentation.

There is still a master branch, make sure to set the correct default branch: http://drupal.org/node/1659588 . Then remove the master branch, see also step 6 and 7 in http://drupal.org/node/1127732
Review of the 7.x-1.x branch:

This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.

manual review:

  1. project page is not clear enough. Please see http://drupal.org/node/997024
  2. menu_subtitle_init(): if you need your CSS on every page you should add it to your info file, see http://drupal.org/node/542202 . Then remove this function.
  3. menu_subtitle_form_alter(): if you are targeting only one form ID you should use hook_form_FORM_ID_alter() instead.
  4. menu_subtitle_form_submit(): use db_select() instead of the raw query.
  5. "if (isset($element['#localized_options']['subtitle']) && !empty($element['#localized_options']['subtitle'])) {": !empty() is enough here, remove the isset() check.
  6. Same in menu_subtitle_links().
  7. Use "*/" to close doc blocks, not "**/".

But that are not application blockers, so ...

Thanks for your contribution, mecMartini!

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.

Status: Fixed » Closed (fixed)

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