CVS edit link for aaskee

The "Likno JavaScript/CSS Menus" module implements a way to create stylish menus for any Drupal site. Apart from including the already known philosophy of modifying the appearance of any Drupal menu by just selecting the menu parent and applying a new style, as implemented in the "Nice Menus" or the "Superfish" module, this module introduces a different way to create and manage the content of a menu.

The content of a Drupal site consist of Pages and Stories, and the very powerful concept of Taxonomies. The "Likno JavaScript/CSS Menus" module takes advantage of the above and allows the user to create a menu that will contain all or some of these very important elements of his Drupal site. The user can now choose to include content from his website into a menu based on the type of such content. Pages, Stories and Taxonomies can all be included in a menu, either as Main Menu items or as submenus of specific Main Menu items, which enables the user of a Drupal website to easily navigate through the most important (or all) Pages, Stories, or different Taxonomies that each Page/Story has been categorized/tagged with. Of course the hierarchy of these elements within the Drupal website has been retained in the menu. Another powerful feature of the module is that it allows for each taxonomy term to include the X last posts that were tagged under the specific category (in the examples you can find a menu that contains a "Home" button leading to the home page, all the Pages of the site as main menu items, all the Stories as a submenu under a main item called "Stories" and all the Taxonomies as a submenu under a main item called "Taxonomies". Each Taxonomy item has as submenu items up to the 5 latest posts of this category).

The module was started as a project in order to allow the users of Likno Software's popular "AllWebMenus" application (http://www.likno.com/allwebmenusinfo.html) to embed menus created by the application into their Drupal sites. The user can easily specify the content of the menu and use the application to provide the style (theme) to the menu along with many navigational features. At a later point though, the development team recognized the originality of the module's selection of content for the menus and decided to enhance it so as all Drupal users could take advantage of it. We decided to use the “Superfish” (the jQuery menu plugin by Joel Birch - http://users.tpg.com.au/j_birch/plugins/superfish/) for its simplicity in its code and its interaction with the rest of the code, and of course the features it provides. At that point we tried the Superfish module for Drupal (http://drupal.org/project/superfish), which seemed to satisfy all our needs. The different approach in the selection of the content of the menu made a collaboration to seem harder than the modification of the Superfish module's code so as to fit our module's functionality.

We therefore present this new module in order to introduce this new philosophy of content selection to the Drupal users for their menus. This module will help not only the users of the AllWebMenus application (that was originally intended for), but all Drupal users, as they will be able to add creative, stylish menus on their Drupal websites, that will provide the most helpful content for users navigating in their Drupal websites.

Simple examples of the result of the module can be seen under these links:
http://www.likno.com/addins/drupal-menu-example-superfish.html
http://www.likno.com/addins/drupal-menu-example-float.html
http://www.likno.com/addins/drupal-menu-example-pos.html

Screenshots of the admin page and the block settings can be found here:
http://www.likno.com/Images/drupal-scnsht/admin-gmsc.jpg
http://www.likno.com/Images/drupal-scnsht/admin-init.jpg
http://www.likno.com/Images/drupal-scnsht/admin-menu1-opt.jpg
http://www.likno.com/Images/drupal-scnsht/block-menu1-opt.jpg

Comments

aaskee’s picture

Title: aaskee [aaskee] » Likno JavaScript/CSS Menus
Assigned: Unassigned » aaskee
Status: Postponed (maintainer needs more info) » Needs review
Issue tags: +CSS, +JavaScript, +menu
StatusFileSize
new125.7 KB
avpaderno’s picture

Title: Likno JavaScript/CSS Menus » aaskee [aaskee]
Assigned: aaskee » Unassigned
Issue tags: -CSS, -JavaScript, -menu +Module review

Hello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.

tinem’s picture

This looks VERY interesting. Will it be free to use or?

aaskee’s picture

The module will be free to use in order to generate menus with Superfish.
In order to take advantage of the AllWebMenus features for your menu, then you need to have an AllWebMenus license (http://www.likno.com/allwebmenusinfo.html). Of course it will also be free for those that already own an AllWebMenus license.

avpaderno’s picture

Status: Needs review » Needs work
  • This is a partial review.
  • The points reported in this review are not in order of importance / relevance.
  • Most of the times I report the code that present an issue. In such cases, the same error can be present in other parts of the code; the fact I don't report the same issue more than once doesn't mean the same issue is not present in different places.
  • Not all the reported points are application blockers; some of the points I report are simple suggestions to who applies for a CVS account. For a list of what is considered a blocker for the application approval, see CVS applications review, what to expect. Keep in mind the list is still under construction, and can be changed to adapt it to what has been found out during code review, or to make the list clearer to who applies for a CVS account.
  1. License files cannot be committed in Drupal.org repository. Projects committed in Drupal.org repository have the same license used by Drupal.
  2. Files available from third-party sites should not be committed in Drupal.org repository. Files licensed under a license different from GPL License (even if it is a compatible license) should not be committed in Drupal.org repositories.
  3. The version line needs to be removed from the .info file.
  4. function likno_menus_uninstall() {
        db_query("DELETE FROM variable WHERE SUBSTR(name,1,4) = 'AWM_'");
    }
    
    

    Deleting Drupal variables using a query that matches any Drupal variable with a name that starts with the module name would remove also the Drupal variables of other modules.

  5. See http://drupal.org/coding-standards to understand how a module should be written. In particular, see hoe Drupal variables, global variables, constants, and functions defined from the module should be named; how the code should be formatted.
  6.       '#description' => t('The menu you want to be displayed using Superfish. Defined at '. l('admin/settings/likno_menus', 'admin/settings/likno_menus') .' under <i>'.variable_get('AWM_menu_name_'. $awm_delta_this, 'menu'. $awm_delta_this).'</i>.'),
          '#value' => '<input value="'.$awm_which_menu.'" maxlength="128" name="superfish_name_1" id="edit-superfish-name-1" size="60" value="Superfish 1" class="form-text" type="text" readonly>',
    
    

    l() should not be used together with t(). See the documentation for t(), where this code is reported to be wrong:

    $output .= t('<p>Go to the @contact-page.</p>', array('@contact-page' => l(t('contact page'), 'contact')));
    

    The correct code to use is the following:

    $output .= '<p>'. t('Go to the <a href="@contact-page">contact page</a>.', array('@contact-page' => url('contact'))) .'</p>';
    

    Form elements must be generated through the form API.

aaskee’s picture

StatusFileSize
new122.88 KB

Hi and thanks for the review!

about each issue above:

1. file removed.

2. the only "files available from third-party sites" submitted were some necessary .js and .css files from the superfish module, that need to be loaded only if the superfish module is not available; ALL files are licensed under the GPL license.

3. fixed.

4. the uninstall function was changed to this:

function likno_menus_uninstall() {
  db_query("DELETE FROM {variable} WHERE name LIKE 'likno_menus_%'");
  cache_clear_all('variables', 'cache');
}

...and is identical to more than 3 uninstall functions of different, already running modules. the variables added are many and it would be nice if they were removed after uninstallation.

5. fixed code to fulfill the coding standards.

6. all instances of the t() problem fixed. also form elements are now only generated through the form API.

juankvillegas’s picture

Status: Needs work » Needs review
avpaderno’s picture

Status: Needs review » Needs work

2. the only "files available from third-party sites" submitted were some necessary .js and .css files from the superfish module, that need to be loaded only if the superfish module is not available; ALL files are licensed under the GPL license.

What I reported is still valid.
There are at least two reasons for which files available from third-party sites should not committed in drupal.org repository; the first I can think of is to avoid to have multiple copies of those files in drupal.org repository, and in Drupal-powered sites.

aaskee’s picture

The files in question are some .js files and some .css files; most of the .css files could (and will) be altered in order to be unique and provide more personal themes. Therefore we are left with only 4 .js and 3 .css files.

Please note first of all that all the 7 files in question are not created by the author of a Drupal module (at least not specifically for a module), and all of them are plugins/widgets/etc for jQuery.

...so, i would like to ask:
what happens in this case, that the module requires the above 7 files that another module happens to use them also (again, they are not "files of a module", they are files that another module uses)? should the module require the user to install the other module as well in order to work? or is it ok, since the files are not strictly related to the module, but to jQuery?

in case it is still not "allowed" to duplicate these files in the repository, could you please provide any alternative solution rather than asking the user to install both modules?

Again, thank you.

aaskee’s picture

Hello,

it has been almost two weeks now, could someone provide an answer for this issue?

Thanks

juankvillegas’s picture

Maybe you can ask the user to install those files in sites/libraries

In this way, any module that require that files can search for them in that location.

Then you can make some checks in the code to know if the files are there, and if they aren't you can show an error message to the user requesting the installation of the files in that folder.

avpaderno’s picture

What juankvillegas reports is correct; to be exact, the module should implement hook_requirements() and verify the required files are present.

aaskee’s picture

Status: Needs work » Needs review
StatusFileSize
new107.83 KB

Hello again,

after quite some time, I finally corrected the suggested issues and I am now posting the new zip for review.

Thanx

aaskee’s picture

Hello,

could someone please have a look and review the module?
thank you.

aaskee’s picture

Component: Miscellaneous » miscellaneous

Hi again, could this update be reviewed please, I would like the module to be added in the repository. thank you again.

aaskee’s picture

just bumping this thread again as i would like a response because i think that the module is now ready to be published and i'm just waiting for your confirmation.. thank you.

aaskee’s picture

Hello again,

it's been nearly two months and I have not yet received a response. Can someone please have a look at this module so that it can be published in the repository?

Thank you.

arianek’s picture

Status: Needs review » Postponed

Hi. Please read all the following and the links provided as this is very important information about your CVS Application:

Drupal.org has moved from CVS to Git! This is a very significant change for the Drupal community and for your application. Please read the following documentation on how this affects and benefits you and the application process:
Migrating from CVS Applications to (Git) Full Project Applications

  • The status of this application will be put to "postponed" and by following the instructions in the above link, you will be able to reopen it.
  • Or if your application has been "needs work" for more than 5 weeks, your application will be marked as "closed (won't fix)". You can still reopen it, by reading the instructions above.
aaskee’s picture

Here is the sandbox git project for our module. Do I have to apply for a full project or do i have to wait for review first?

aaskee’s picture

Anything regarding this? Do I only need to apply for the full project?

mrf’s picture

Project: Drupal.org CVS applications » Drupal.org security advisory coverage applications
Status: Postponed » Needs review

Happened upon this issue by accident, moving this over the correct place, the CVS Application queue is no longer active.

tim.plunkett’s picture

Title: aaskee [aaskee] » Likno JavaScript/CSS Menus
sreynen’s picture

Component: miscellaneous » new project application
aaskee’s picture

Hello,

Sorry for having to contact you again, but I would like to ask if there has been any progress with our project application?

We need to proceed with new features so we would appreciate if you could complete the process and have this current version of our application displayed on your website.

Thank you in advance.

ralt’s picture

Component: new project application » module
Priority: Normal » Critical

Changing priority.

Also, this module application is here since september 6th of last year.

tim.plunkett’s picture

Priority: Critical » Normal
ralt’s picture

After clarification with tim.plunkett, changing priority according to the new priority guidelines.

ralt’s picture

Priority: Normal » Critical
aaskee’s picture

any update regarding this?

mrf’s picture

Status: Needs review » Needs work

I got the following error when trying to extract the required zip file:

Archive: /drupal6/sites/all/modules/likno_javascript_css_menus/superfish_js_css_for_likno.zip
[/drupal6/sites/all/modules/likno_javascript_css_menus/superfish_js_css_for_likno.zip]
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
zipinfo:  cannot find zipfile directory in one of /drupal6/sites/all/modules/likno_javascript_css_menus/superfish_js_css_for_likno.zip or
         /drupal6/sites/all/modules/likno_javascript_css_menus/superfish_js_css_for_likno.zip.zip, and cannot find /drupal6/sites/all/modules/likno_javascript_css_menus/superfish_js_css_for_likno.zip.ZIP, period.

I'm on Ubuntu and used whatever the default zip option is on the contextual menu.

Maybe provide a tar.gz for those not on windows?

aaskee’s picture

StatusFileSize
new106.76 KB

yes you are right

ParisLiakos’s picture

Status: Needs work » Needs review

mrf the code is in the git repository here
http://drupal.org/sandbox/aaskee/1093394

tim.plunkett’s picture

Status: Needs review » Needs work
StatusFileSize
new6.26 KB

I started to look through the code and was writing a coding standards patch. I got halfway through the .install and then I opened .admin.inc, and just stopped.

There are huge chunks of untranslated strings, and HTML hardcoded everywhere. Please look over http://drupal.org/coding-standards and run your code through http://drupal.org/project/coder.

Also, why is there so much styling done in JS? Why is it not in a CSS file?

Once the code is more readable, I can give it a real review.

misc’s picture

The applicant has been contacted to ask if the application is abandoned.

misc’s picture

Status: Needs work » Closed (won't fix)

The application has been closed. If you would like to reopen it, you are free to do so.
See http://drupal.org/node/894256

avpaderno’s picture

Issue summary: View changes
Issue tags: -Module review