The taxonomy node order module allows you to order the nodes associated with a term by affecting a weight to each node.

This weight will be added to the default sorts criteria of Drupal (date of creation, sticky node).
By activating the module a new tab appears on the term page. By clicking on the tab you get the list of nodes associated with the term, you can then order by drag and drop.

A button lets you return to the default sorting.

This module is largely based on nodeorder module, that is not ported to Drupal 7.

Note : this module is for Drupal 7.x use only.

Warning: the 'taxonomy_node_order' module uses the 'taxonomy_index' table to store the weight of the nodes associated with terms, and the variable 'taxonomy_maintain_index_table' must be TRUE for the module to work.

project sandbox : http://drupal.org/sandbox/probesys/1421358
git repository : git clone http://git.drupal.org/sandbox/probesys/1421358.git taxonomy_node_order

Comments

vaibhavjain’s picture

Status: Needs review » Needs work

Hello probesys,

It seems like you have done all you work in master branch. Please create a separate branch for D7 - 7.x-1.x.

About Code
Ending php tag is not recommended - http://drupal.org/node/318#phptags
No license.txt should be added, will be added by drupal during packaging.

Please update.

probesys’s picture

Status: Needs work » Needs review

Hello vaibhavjain,
we've applied recommended changes.

Thanks for review.

eugene.ilyin’s picture

It appears 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.
The following git branches do not match the release branch pattern, you should remove/rename them. See http://drupal.org/node/1015226

remotes/origin/7.x-1.0

Review of the master branch:

Remove LICENSE.txt, it will be added by drupal.org packaging automatically.
Remove "version" from the info file, it will be added by drupal.org packaging automatically.
The "?>" PHP delimiter at the end of files is discouraged, see http://drupal.org/node/318#phptags

./taxonomy_node_order.module
./taxonomy_node_order.pages.inc
./taxonomy_node_order.install
./taxonomy_node_order.module: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming

function taxonomy_select_nodes_weight($tid, $order = array('t.weight' => 'ASC', 't.sticky' => 'DESC', 't.created' => 'DESC')) {
Drupal Code Sniffer has found some code style issues (please check the Drupal coding standards). See http://ventral.org/pareview/httpgitdrupalorgsandboxprobesys1421358git

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. Get a review bonus and we will come back to your application sooner.

Robertas’s picture

Status: Needs review » Needs work

It appears 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.

The following git branches do not match the release branch pattern, you should remove/rename them. See http://drupal.org/node/1015226

<br>
  remotes/origin/7.x-1.0<br>



Review of the master branch:

  • Remove LICENSE.txt, it will be added by drupal.org packaging automatically.
  • Remove "version" from the info file, it will be added by drupal.org packaging automatically.
  • The "?>" PHP delimiter at the end of files is discouraged, see http://drupal.org/node/318#phptags

    <br>
    ./taxonomy_node_order.module<br>
    ./taxonomy_node_order.pages.inc<br>
    ./taxonomy_node_order.install<br>
    
  • ./taxonomy_node_order.module: all functions should be prefixed with your module/theme name to avoid name clashes. See http://drupal.org/node/318#naming

    <br>
    function taxonomy_select_nodes_weight($tid, $order = array('t.weight' =&gt; 'ASC', 't.sticky' =&gt; 'DESC', 't.created' =&gt; 'DESC')) {<br>
    
  • Drupal Code Sniffer has found some code style issues (please check the Drupal coding standards). See attachment.

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. Get a review bonus and we will come back to your application sooner.

</code></p><code>
<p>FILE: ...l-7-pareview/sites/all/modules/pareview_temp/test_candidate/LICENSE.txt<br>
--------------------------------------------------------------------------------<br>
FOUND 0 ERROR(S) AND 3 WARNING(S) AFFECTING 3 LINE(S)<br>
--------------------------------------------------------------------------------<br>
 106 | WARNING | Line exceeds 80 characters; contains 81 characters<br>
 120 | WARNING | Line exceeds 80 characters; contains 84 characters<br>
 227 | WARNING | Line exceeds 80 characters; contains 81 characters<br>
--------------------------------------------------------------------------------</p>
<p>FILE: .../all/modules/pareview_temp/test_candidate/taxonomy_node_order.admin.inc<br>
--------------------------------------------------------------------------------<br>
FOUND 236 ERROR(S) AND 13 WARNING(S) AFFECTING 106 LINE(S)<br>
--------------------------------------------------------------------------------<br>
   2 | ERROR   | Missing file doc comment<br>
   5 | ERROR   | Missing parameter type at position 1<br>
  13 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  13 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  15 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  15 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  16 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  16 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  18 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  18 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  20 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  20 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  21 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  21 | ERROR   | Line indented incorrectly; expected 2 spaces, found 1<br>
  22 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  22 | ERROR   | Line indented incorrectly; expected 4 spaces, found 2<br>
  23 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  23 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 3<br>
  25 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  25 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 3<br>
  26 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  26 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 3<br>
  27 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  27 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 3<br>
  28 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  28 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 3<br>
  29 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  29 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 3<br>
  30 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  30 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 3<br>
  31 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  31 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 3<br>
  32 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  32 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 3<br>
  33 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  33 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 3<br>
  34 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  36 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  36 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
  37 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  39 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  39 | ERROR   | Line indented incorrectly; expected 2 spaces, found 1<br>
  40 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  40 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
  41 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  41 | ERROR   | Line indented incorrectly; expected 4 spaces, found 2<br>
  42 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  42 | ERROR   | Line indented incorrectly; expected 6 spaces, found 3<br>
  43 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  43 | ERROR   | Line indented incorrectly; expected at least 8 spaces, found 4<br>
  44 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  45 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  46 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  48 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  48 | ERROR   | Line indented incorrectly; expected 2 spaces, found 1<br>
  49 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  49 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
  49 | WARNING | The opening paranthesis of an array should not be followed by<br>
     |         | a white space<br>
  50 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  52 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  52 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  53 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  53 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  54 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  54 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  55 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  55 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  57 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  57 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  59 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  59 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  73 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  73 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  75 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  75 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  76 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  76 | ERROR   | Line indented incorrectly; expected 2 spaces, found 1<br>
  77 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  77 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
  77 | ERROR   | Space found before object operator<br>
  77 | ERROR   | Space found after object operator<br>
  78 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  80 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  80 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  81 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  81 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  82 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  82 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  82 | ERROR   | Space found before object operator<br>
  82 | ERROR   | Space found after object operator<br>
  84 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  84 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  85 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  85 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  85 | ERROR   | Space found before object operator<br>
  85 | ERROR   | Space found after object operator<br>
  86 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  86 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  86 | ERROR   | Space found before object operator<br>
  86 | ERROR   | Space found after object operator<br>
  87 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  87 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  89 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  89 | ERROR   | Line indented incorrectly; expected 2 spaces, found 1<br>
  90 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  90 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
  90 | ERROR   | Space found before object operator<br>
  90 | ERROR   | Space found after object operator<br>
  92 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  92 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
  93 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  93 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
  93 | ERROR   | Space found before object operator<br>
  93 | ERROR   | Space found after object operator<br>
  94 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  94 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
  94 | ERROR   | Space found before object operator<br>
  94 | ERROR   | Space found after object operator<br>
  95 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  95 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
  95 | ERROR   | Space found before object operator<br>
  95 | ERROR   | Space found after object operator<br>
  95 | WARNING | Last item of an inline array must not be followed by a comma<br>
  95 | WARNING | The closing paranthesis of an array should not be preceded by<br>
     |         | a white space<br>
  96 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  96 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
  96 | ERROR   | Space found before object operator<br>
  96 | ERROR   | Space found after object operator<br>
  98 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  98 | ERROR   | Inline control structures are not allowed<br>
  99 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  99 | ERROR   | Space found before object operator<br>
  99 | ERROR   | Space found after object operator<br>
 100 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 102 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 102 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 104 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 104 | ERROR   | Line indented incorrectly; expected 2 spaces, found 1<br>
 105 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 105 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
 106 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 106 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
 107 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 107 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
 108 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 108 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
 109 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 111 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 111 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 130 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 130 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 130 | ERROR   | No space before comment text; expected "// reset to default"<br>
     |         | but found "//reset to default"<br>
 130 | ERROR   | Inline comments must start with a capital letter<br>
 130 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or<br>
     |         | question marks<br>
 131 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 131 | ERROR   | Line indented incorrectly; expected 2 spaces, found 1<br>
 132 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 132 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
 133 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 133 | ERROR   | Line indented incorrectly; expected 4 spaces, found 2<br>
 134 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 134 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 3<br>
 135 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 136 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 136 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
 137 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 137 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
 138 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 138 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
 139 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 139 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
 140 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 142 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 142 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 143 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 143 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 144 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 144 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 146 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 146 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 147 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 147 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 149 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 149 | ERROR   | Line indented incorrectly; expected 2 spaces, found 1<br>
 150 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 150 | ERROR   | Line indented incorrectly; expected 4 spaces, found 2<br>
 151 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 151 | ERROR   | Line indented incorrectly; expected 6 spaces, found 3<br>
 152 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 152 | ERROR   | Line indented incorrectly; expected at least 8 spaces, found 4<br>
 152 | ERROR   | Space found before object operator<br>
 152 | ERROR   | Space found after object operator<br>
 152 | ERROR   | Space found before object operator<br>
 152 | ERROR   | Space found after object operator<br>
 152 | ERROR   | Space found before object operator<br>
 152 | ERROR   | Space found after object operator<br>
 152 | ERROR   | Space found before object operator<br>
 152 | ERROR   | Space found after object operator<br>
 153 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 154 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 154 | ERROR   | Line indented incorrectly; expected at least 6 spaces, found 3<br>
 155 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 156 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 158 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 158 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 168 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 168 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 170 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 170 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 170 | WARNING | Last item of an inline array must not be followed by a comma<br>
 170 | WARNING | The closing paranthesis of an array should not be preceded by<br>
     |         | a white space<br>
 171 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 171 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 171 | WARNING | Last item of an inline array must not be followed by a comma<br>
 171 | WARNING | The closing paranthesis of an array should not be preceded by<br>
     |         | a white space<br>
 172 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 172 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 172 | ERROR   | Space found before object operator<br>
 172 | ERROR   | Space found after object operator<br>
 172 | WARNING | Last item of an inline array must not be followed by a comma<br>
 172 | WARNING | The closing paranthesis of an array should not be preceded by<br>
     |         | a white space<br>
 173 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 173 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 173 | WARNING | Last item of an inline array must not be followed by a comma<br>
 173 | WARNING | The closing paranthesis of an array should not be preceded by<br>
     |         | a white space<br>
 175 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 175 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 175 | WARNING | Avoid backslash escaping in translatable strings when<br>
     |         | possible, use "" quotes instead<br>
 175 | ERROR   | Space found before object operator<br>
 175 | ERROR   | Space found after object operator<br>
 175 | ERROR   | Space found before object operator<br>
 175 | ERROR   | Space found after object operator<br>
 179 | WARNING | Line exceeds 80 characters; contains 81 characters<br>
 184 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 184 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 184 | ERROR   | Space found before object operator<br>
 184 | ERROR   | Space found after object operator<br>
 184 | ERROR   | Space found before object operator<br>
 184 | ERROR   | Space found after object operator<br>
 184 | ERROR   | Space found before object operator<br>
 184 | ERROR   | Space found after object operator<br>
 185 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 185 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 186 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 186 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 187 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 187 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 189 | ERROR   | Files must end in a single new line character<br>
 189 | ERROR   | The final ?&gt; should be omitted from all code files<br>
--------------------------------------------------------------------------------</p>
<p>FILE: ...sites/all/modules/pareview_temp/test_candidate/taxonomy_node_order.info<br>
--------------------------------------------------------------------------------<br>
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)<br>
--------------------------------------------------------------------------------<br>
 5 | ERROR | Files must end in a single new line character<br>
--------------------------------------------------------------------------------</p>
<p>FILE: ...es/all/modules/pareview_temp/test_candidate/taxonomy_node_order.install<br>
--------------------------------------------------------------------------------<br>
FOUND 15 ERROR(S) AFFECTING 8 LINE(S)<br>
--------------------------------------------------------------------------------<br>
  2 | ERROR | Missing file doc comment<br>
  4 | ERROR | Whitespace found at end of line<br>
  6 | ERROR | Expected 1 space between the closing parenthesis and the opening<br>
    |       | brace; found 0<br>
  7 | ERROR | Spaces must be used to indent lines; tabs are not allowed<br>
  7 | ERROR | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  7 | ERROR | No space before comment text; expected "// adding new field<br>
    |       | "weight" in the {taxonomy_index} table" but found "//adding new<br>
    |       | field "weight" in the {taxonomy_index} table"<br>
  7 | ERROR | Inline comments must start with a capital letter<br>
  7 | ERROR | Inline comments must end in  full-stops, exclamation marks, or<br>
    |       | question marks<br>
  8 | ERROR | Spaces must be used to indent lines; tabs are not allowed<br>
  8 | ERROR | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 19 | ERROR | Whitespace found at end of line<br>
 22 | ERROR | Spaces must be used to indent lines; tabs are not allowed<br>
 22 | ERROR | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 24 | ERROR | Files must end in a single new line character<br>
 24 | ERROR | The final ?&gt; should be omitted from all code files<br>
--------------------------------------------------------------------------------</p>
<p>FILE: ...tes/all/modules/pareview_temp/test_candidate/taxonomy_node_order.module<br>
--------------------------------------------------------------------------------<br>
FOUND 101 ERROR(S) AND 6 WARNING(S) AFFECTING 34 LINE(S)<br>
--------------------------------------------------------------------------------<br>
  2 | ERROR   | Missing file doc comment<br>
  7 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  7 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  7 | ERROR   | No space before comment text; expected "// the taxonomy node<br>
    |         | order setting page" but found "//the taxonomy node order<br>
    |         | setting page"<br>
  7 | ERROR   | Inline comments must start with a capital letter<br>
  7 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or<br>
    |         | question marks<br>
  8 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
  8 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
  8 | WARNING | Last item of an inline array must not be followed by a comma<br>
  8 | WARNING | The closing paranthesis of an array should not be preceded by a<br>
    |         | white space<br>
 10 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 10 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 18 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 18 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 18 | ERROR   | No space before comment text; expected "// override some<br>
    |         | default taxonomy page menu item attributes" but found<br>
    |         | "//override some default taxonomy page menu item attributes"<br>
 18 | ERROR   | Inline comments must start with a capital letter<br>
 19 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 19 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 19 | ERROR   | No space before comment text; expected "// taxonomy term page"<br>
    |         | but found "//taxonomy term page"<br>
 19 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or<br>
    |         | question marks<br>
 20 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 20 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 21 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 21 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 22 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 22 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 24 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 24 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 24 | ERROR   | No space before comment text; expected "// taxonomy feed" but<br>
    |         | found "//taxonomy feed"<br>
 24 | ERROR   | Inline comments must start with a capital letter<br>
 24 | ERROR   | Inline comments must end in  full-stops, exclamation marks, or<br>
    |         | question marks<br>
 25 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 25 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 26 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 26 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 27 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 27 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 35 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 35 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 35 | WARNING | Last item of an inline array must not be followed by a comma<br>
 35 | WARNING | The closing paranthesis of an array should not be preceded by a<br>
    |         | white space<br>
 35 | WARNING | Last item of an inline array must not be followed by a comma<br>
 35 | WARNING | The closing paranthesis of an array should not be preceded by a<br>
    |         | white space<br>
 43 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 43 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 44 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 44 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 44 | ERROR   | Space found before object operator<br>
 44 | ERROR   | Space found after object operator<br>
 45 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 45 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 45 | ERROR   | Space found before object operator<br>
 45 | ERROR   | Space found after object operator<br>
 46 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 46 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 46 | ERROR   | Space found before object operator<br>
 46 | ERROR   | Space found after object operator<br>
 48 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 48 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 48 | ERROR   | Space found before object operator<br>
 48 | ERROR   | Space found after object operator<br>
 48 | ERROR   | Space found before object operator<br>
 48 | ERROR   | Space found after object operator<br>
 56 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 56 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 57 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 57 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 57 | ERROR   | Space found before object operator<br>
 57 | ERROR   | Space found after object operator<br>
 58 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 58 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 58 | ERROR   | Space found before object operator<br>
 58 | ERROR   | Space found after object operator<br>
 59 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 59 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 59 | ERROR   | Space found before object operator<br>
 59 | ERROR   | Space found after object operator<br>
 61 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 61 | ERROR   | Line indented incorrectly; expected 2 spaces, found 1<br>
 62 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 62 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
 62 | ERROR   | Space found before object operator<br>
 62 | ERROR   | Space found after object operator<br>
 63 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 65 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 65 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 65 | ERROR   | Space found before object operator<br>
 65 | ERROR   | Space found after object operator<br>
 66 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 66 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 67 | ERROR   | Whitespace found at end of line<br>
 67 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 68 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 68 | ERROR   | Line indented incorrectly; expected 2 spaces, found 1<br>
 68 | ERROR   | Space found before object operator<br>
 68 | ERROR   | Space found after object operator<br>
 69 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 69 | ERROR   | Line indented incorrectly; expected at least 4 spaces, found 2<br>
 69 | ERROR   | Space found before object operator<br>
 69 | ERROR   | Space found after object operator<br>
 69 | ERROR   | Space found before object operator<br>
 69 | ERROR   | Space found after object operator<br>
 70 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 72 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 72 | ERROR   | Line indented incorrectly; expected at least 2 spaces, found 1<br>
 74 | ERROR   | Files must end in a single new line character<br>
 74 | ERROR   | The final ?&gt; should be omitted from all code files<br>
--------------------------------------------------------------------------------</p>

FILE: .../all/modules/pareview_temp/test_candidate/taxonomy_node_order.pages.inc<br>
--------------------------------------------------------------------------------<br>
FOUND 9 ERROR(S) AND 1 WARNING(S) AFFECTING 7 LINE(S)<br>
--------------------------------------------------------------------------------<br>
 11 | ERROR   | Last parameter comment requires a blank newline after it<br>
 11 | ERROR   | Missing parameter type at position 1<br>
 13 | ERROR   | Data type of return value is missing<br>
 34 | ERROR   | Whitespace found at end of line<br>
 34 | ERROR   | Spaces must be used to indent lines; tabs are not allowed<br>
 47 | ERROR   | Array closing indentation error, expected 4 spaces but found 5<br>
 62 | ERROR   | Missing parameter type at position 1<br>
 68 | WARNING | Line exceeds 80 characters; contains 91 characters<br>
 75 | ERROR   | Files must end in a single new line character<br>
 75 | ERROR   | The final ?&gt; should be omitted from all code files<br>
--------------------------------------------------------------------------------<br>



Source: http://ventral.org/pareview - PAReview.sh online service

klausi’s picture

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

Closing due to lack of activity. Feel free to reopen if you are still working on this application.

probesys’s picture

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

After a long time, i'm back to clean up my module.
I've tried to follow recommendations, files have always some errors, but no more than some published module.
Since the Norder Order module has been ported to Drupal 7, my module has less interest now.
The last interests of this module is to be lightweight and to my opinion to have a more useful ordering node page.

Thanks for the review.

d2ev’s picture

Hi...

1. taxonomy_node_order.module : taxonomy_node_order_select_nodes_weight() use the fetchAllKeyed() method and you don't need the extra foreach loop.

$query = db_select('taxonomy_index', 't');
  $query->condition('tid', $tid);
  $query->addField('t', 'nid');
  $query->addField('t', 'weight');

  foreach ($order as $field => $direction) {
    $query->orderBy($field, $direction);
  }

  $result = $query->execute();
  $nodes_weight = array();

  while ($node = $result->fetchObject()) {
    $nodes_weight[$node->nid] = $node->weight;
  }

  return $nodes_weight;

to

$query = db_select('taxonomy_index', 't');
  $query->condition('tid', $tid);
  $query->addField('t', 'nid');
  $query->addField('t', 'weight');

  foreach ($order as $field => $direction) {
    $query->orderBy($field, $direction);
  }

  return $query->execute()->fetchAllKeyed();

2. In Multilingual site is showing error and can't even access term pages.

Warning: require_once(.../sites/all/modules/taxonomy_node_order/i18n_taxonomy.pages.inc): failed to open stream: No such file or directory in menu_execute_active_handler() (line 514 of /var/www/d715/includes/menu.inc).
aritra.ghosh’s picture

Status: Needs review » Needs work

Hii,
The code still has a lot of indentation issues mostly for the comments and function header parts.
Please go through the automatic code sniffer results:
http://ventral.org/pareview/httpgitdrupalorgsandboxprobesys1421358git

Keep the Following points in mind:
1. in the function header while declaring @params the correct format is

@param array $nodes
Array of node nids to update. i.e. @param "data type" "parameret name"
"description"

2. If the line declaring an array spans longer than 80 characters each element should be broken into
its own line.
3. Inline comments must end in full-stops, exclamation marks, or
question marks.
4. There must not be any whitespace at the end of the line.

Thanks.

klausi’s picture

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

Closing due to lack of activity. Feel free to reopen if you are still working on this application.