Pictures in galleries aren't ordered

Kyberman - April 19, 2009 - 20:45
Project:nodeorder
Version:6.x-1.0
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi, I have installed this module, I set the vocabulary Gallery "Orderable" and after save, I got this warning for many times:

user warning: Access denied for user 'someuser'@'%' to database 'somedatabase' query: LOCK TABLES drupal_term_node WRITE in /httpd/html/somesite/www/includes/database.mysqli.inc on line 330.

After this, I tried to order the nodes (pictures) in this taxonomy and it was saved correctly. But in the gallery, there is still the old order (the newest first). Where I did the mistake?

#1

ferrangil - April 22, 2009 - 01:13

Did you changed the Sort Order into the Views? It might be there... the nodes get a new order but you need to tell the view that you want to use that order and no the default.
Just guessing...

#2

pvanderspek - April 22, 2009 - 11:57

As ferrangil also pointed out: if you use views you should use the weight_in_tid as a sort value. By default taxonomy/term/ shows the default ordering as provided by taxonomy. The ordered list of nodes can be accessed via nodeorder/term/ (so by replacing taxonomy with nodeorder).

#3

Kyberman - April 22, 2009 - 13:09

I'm not using Views, but I used Image module. Do you know where (maybe in the code) I must change the standard values by the weight_in_tid values? Or I have to use Views? What I don't understand is where I can replace taxonomy/term/ with nodeorder/term. Thank you deeply.

#4

pvanderspek - April 22, 2009 - 18:36

Well the URL to a taxonomy-page usually looks like this: http://www.yourdomain.com/taxonomy/term/12 (number varies). To get the ordered version you have to change the URL to this: http://www.yourdomain.com/nodeorder/term/12
By the way, the LOCK TABLES error your getting seems to indicate that the username you're using to access the database isn't allowed to LOCK tables. Maybe you could check this as well?

#5

Kyberman - April 22, 2009 - 19:28

It's more complicated as it looks. When I use the url /nodeorder/term/12, the order is OK, but the pictures are shown with the author, name of the gallery, etc. They are in the list "picture under picture". But I want to show it as normal gallery. For example the url /galleries/my-first-gallery. But as I see, I will need to edit some code of the gallery module. Maybe, it needs to change source of the gallery from /taxonomy/... to /nodeorder/... Have anybody any idea? Thank you.

#6

marcp - April 22, 2009 - 20:26

Take a look at #117587: Image Gallery with Nodeorder, Next|Prev links, multi taxonomy terms OK! to see if it gives you some inspiration.

#7

madalien - November 13, 2009 - 06:58

Try adding this code in nodeorder.module

/**
* Implementation of hook_menu_alter().
*/
function nodeorder_menu_alter(&$items) {
$items['taxonomy/term/%']['page callback'] = 'nodeorder_term_page';
}

 
 

Drupal is a registered trademark of Dries Buytaert.