http://drupal.org/sandbox/MaxMartin/2002604

Allows reordering of nodes within a taxonomy term.

This module does not modify the taxonomy listing pages, it simply adds a weight
to nodes that can be used when ordering views.

There are two primary differences between Reorder and the nodeorder module:

  • Reorder does not modify the behaviour of taxonomy in any way, it simply
    exposes a field to views that allows reordering nodes by their weight in a
    given taxonomy. In other words the configured node order will not be respected
    on taxonomy pages.
  • Reorder adds a new table to hold node weights instead of the more fragile
    solution of adding a column to a taxonomy table, avoiding issues where taxonomy
    writes over configured node weights.

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/MaxMartin/2002604.git reorder

Comments

thmnhat’s picture

Status: Needs work » Needs review

Hi Max Martin

Automated review:
Lot of errors found: http://ventral.org/pareview/httpgitdrupalorgsandboxmaxmartin2002604git-7...
You will need this http://drupal.org/coding-standards

Cursory manual review:
In reorder_menu(), you already defined the 'title callback' so in the reorder_term_order_form() you don't have to call reorder_term_order_title() again.
In reorder_term_order_form(), you call taxonomy_select_nodes() without the limit, so what happens if you have thousands of nodes in a term?

About this issue:
You should post a good git command so everybody can use it to clone your code easier

git clone --branch 7.x-1.x http://git.drupal.org/sandbox/MaxMartin/2002604.git reorder

Have you ever heard about nodequeue. That module can do what your module does I think so. So what is your difference?

thmnhat’s picture

Status: Needs review » Needs work
Max Martin’s picture

Status: Needs review » Needs work

Thank you very much for the invormative review.

I have fixed the errors found by the automated review.

Regarding reorder_term_order_title:
Since the page in question is a MENU_LOCAL_TASK, the title callback sets the title of the tab. To set the actual page title drupal_set_title must be called manually in the page callback.

Regarding the use of taxonomy_select_nodes without a pager:
I have switched to a paged query, which also improved the code somewhat.

I have also updated the README.txt and the issue body with more details on the difference between this module and nodeorder.

nodequeue allows the creation of custom sets of nodes which can then be ordered, which differs from this module, which allows reordering of nodes belonging to a taxonomy.

Max Martin’s picture

Status: Needs work » Needs review
PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

Cristobal Wetzig’s picture

If the reorder module is as limited, should it be named reorder? Reorder seems like a module that solves a very general case.

ram4nd’s picture

Status: Needs review » Needs work

Description has to be better on project page.

Remove master branch: https://drupal.org/empty-git-master

How is this different of nodequeue module, seems like it achieves the same goal. At least you should mention it in project page as similar projects.

Max Martin’s picture

Status: Needs work » Closed (won't fix)
Max Martin’s picture

Issue summary: View changes

- Added a description of the differences between reorder and nodeorder.
- Fixed the git clone command.