Project:Flag Weights
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hello and thanks for this wonderful module.

We're using it to replicate NetFlix's queue functionality for yoga videos.

I'm using it with the combination of draggable views. I noticed that if I flag a node, it lands smack in the middle of the queue. It would be nice to have it be either on top or bottom. Draggable Views has this option at the bottom of the table configuration. It doesn't seem to affect flag weights though.

Any ideas?

Andrey.

Comments

#1

The reason it defaults to the middle of the list is that the flag weight defaults to 0, and draggable_views will renumber items whenever you use it. I could add a default weight, but in order to consistently put a new item at the top or bottom of the list, it needs to be bigger/smaller than all other items on the list. This would require an extra query to the DB, etc.

Draggable views is just one use for Flag Weights, and the settings you refer to are particular to one view. More investigation required, but my battery is flat - gotta dash.

#2

+1

#3

Status:active» needs review

Added support for configuring a default weight (see attached patch, which I just applied to CVS).

http://drupal.org/cvs?commit=398318

To use this, go to the edit-flag page, and towards the bottom see a field "Default Weight". Set this to a number, or "MIN" or "MAX". If the number is set to a number, that will be applied as the literal value of the new flag. If it is set to MIN/MAX, the weight of the new flag will be just lower/higher than existing flags.

Marking issue as "needs review" pending confirmation that this works for you.

PS: run update.php after you update to 6.x-1.x-dev

AttachmentSize
flag_weights-default_weight.patch 5.31 KB

#4

Status:needs review» fixed

No comment, assuming fixed.

#5

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here