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
Comment #1
vaibhavjainHello 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.
Comment #2
probesys commentedHello vaibhavjain,
we've applied recommended changes.
Thanks for review.
Comment #3
eugene.ilyin commentedIt 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.
Comment #4
Robertas commentedIt 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
Review of the master 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. Get a review bonus and we will come back to your application sooner.
Source: http://ventral.org/pareview - PAReview.sh online service
Comment #5
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.
Comment #6
probesys commentedAfter 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.
Comment #7
d2ev commentedHi...
1. taxonomy_node_order.module :
taxonomy_node_order_select_nodes_weight()use the fetchAllKeyed() method and you don't need the extra foreach loop.to
2. In Multilingual site is showing error and can't even access term pages.
Comment #8
aritra.ghosh commentedHii,
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.
Comment #9
klausiClosing due to lack of activity. Feel free to reopen if you are still working on this application.