Recent Topics

1 Jul 03, 2006 03:29    

Does a plugin's priority determine what position it is in plugins that are fired at a certain event.

So
Plugin1 (PR of 25)
Plugin2 (PR of 15)
Plugin3 (PR of 55)

All fire on the event 'SomeEvent'

Now would they fire in order of priority (Desc), so Plugin3, Plugin1, Plugin2?

If not, they should ;)

2 Jul 03, 2006 15:43

I think it's ASC, so 15 then 25 then whatever number is bigger than 25.

3 Jul 03, 2006 19:01

Plugins and their events get sorted by priority.

EdB is right about ASC.

4 Jul 03, 2006 19:27

Cool.....

But for rendering, if i have my plugin's priority less than the auto_p plugin's then it will run after the auto_p plugin....

5 Jul 03, 2006 21:36

Cannot confirm.

You've probably just have changed the $priority property of the plugin (in the class file), but not edited the installed plugin (or clicked on "Restore defaults").

Priority ordering takes place only from DB.

6 Jul 03, 2006 22:46

Yeh, looking the database priority values right now.

Plugin's that have a priority that is lower than the auto_p plugin are run after the auto_p plugin.

You can see this with the youtube plugin, there will be w3c warnings if youtube plugin renders before the auto_p plugin as the auto_p plugin will stick <p> tags in odd spots...

Or with my gallery plugin....

Well that's how it is for me right now....

7 Jul 03, 2006 22:59

Just tested it on my local and remote blog and seems that i'm mistaken...

Although when i change my gallery plugin's priority to 80 instead of 60, with the auto_p plugin's priority being 70, i start getting a extra </p> which causes a fair few display warnings.

So is this happening becaues the auto_p plugin sees:
[evo_gallery]214124[/evo_gallery]
And then thinks it's normal text and sticks it in a paragraph?

8 Jul 04, 2006 00:04

And also, say for a certain plugin definied event, i want the plugins that contain the event to fire in a particular order. How would i do this?
I was thinking just replace their priority during the event, and then set it back after. But you just said that only the DB priority matters, so that would invovle the DB being updated....

9 Jul 04, 2006 00:21

So is this happening becaues the auto_p plugin sees:
[evo_gallery]214124[/evo_gallery]
And then thinks it's normal text and sticks it in a paragraph?

Sure.

i want the plugins that contain the event to fire in a particular order

Please explain, why.

But you should be able to set plugin priorities (their member values) and than call ->sort() on the Plugins object that holds them.

10 Jul 04, 2006 00:24

For the Panels, you can re-order them, and instead of the Panels Plugin calling each one individually, it would be easier just to set their priorities.

As the panels can be in different orders for different blogs/users etc.

But yeh, should work then.

11 Jul 04, 2006 00:31

..and when you set their priorities, why shouldn't that get stored into DB?

12 Jul 04, 2006 01:49

Because the positions are customizable by the user visiting the blog.
The administrator of the blog just choses the default positions.


Form is loading...