Freelinking should considering adding a Weights interface. This would allow drag-and-drop reordering to the sort order in which plugins are processed by the filter.
As #647940: Syntax Definition by Plugin goes forward, it may be possible for plugins to specify the same matching syntax. This means the processing order creates an inherent failover mechanism in which one plugin might bail out of doing anything to the text, and the next plugin in order takes over.
It has been pointed out in #634332: Freelinking UI that some plugin weights may have been determined for a good reason by the developer, in this case the weight should not be reorderable by a Site Administrator.
Comments
Comment #1
Grayside commentedPinning the weights of a pair of plugins. Note that this is intended syntax for the future, right now it will break if
other_pluginhas already set a 'pin weight'.When the Weights UI processes plugins, it should disable drag-n-drop of my_plugin and other_plugin, or exclude them from the interface entirely.
Comment #2
arhak commentedweights should be all modifiable or none
look at the UI of CCK, there are some elements' weights unmodifiable but the remaining elements might be dragged around them, so it would be non-sense
(in CCK those elements actually have no weights assigned through CCK, that's the reason for them to be uneditable)
Comment #3
Grayside commentedI wouldn't call it nonsense. But there is value either way. Since nobody has done anything based on plugin weights, it's hard to say. That's why this is postponed.
Which case are you in favor of? Modifiable or not?
Comment #4
arhak commented+1 modifiable weights (in the future, after UI)
once plugin can be build through UI they will need modifiable weights
(also having a lot of plugins being developed around might require post-installation re-weight)
Comment #5
arhak commentedBUT, having drag-n-drop might cause confusion or accidental misusage
Comment #6
Grayside commentedThe idea of the Freelinking UI is to take a page from Views, and have everything be individually overridable. (I'm thinking CTools there.) So weights could be overridden in that way.
Weights really find their strength in an interface where you can see the relative weights in the sort order. That's part of why drag-n-drop sorting has proliferated throughout Drupal. Even the Input Filters make use of it, my thought is simply to extend that into the plugins to provide the same functionality and interface.
What about this instance of weight would be more confusing than block order or text filters?
Comment #7
arhak commentedactually not a big deal if the user knows what he is doing
I was thinking that freelinking plugins might be more alike each others than Drupal's filters (or block sort)
being kind of similar but having a great significance which one gets first (or last for failover)...
..but that would be a newbies problem, in fact anyone manipulating those UI pages should be aware of what's going on
Comment #8
gisleThis is beyond the scope of Freelinking.