1 (edited by frozen_space 2008-05-04 05:25)

Topic: extension display order?

Assume Extension 1 is something like this

echo "<div>this is extension 1</div>";

and extension 1 is installed at hook id 1

after a while i would like to install extension 2 also at hook id 1 which is like this

echo "<div>this is extension 2</div>";

and for some reasons, i would like to have extension 2 echoed out before extension 1. How would i do this? is there any method that i can control the compile order of extensions within the same hook? thanks!

Re: extension display order?

Currently it's determined by installation order.

Re: extension display order?

it's really not easy to handle something like this, as one extension may have codes for different hooks. can we have something like z-index (or compile order) defined within the xml file? like <hook id='hookid' corder='5'>hook code</hook> ? smile just thinking...

Re: extension display order?

Yeah, we've discussed a priority system in the past and it just hasn't had a whole lot of support and has been forgotten. We'll see. smile

Re: extension display order?

topic refresh


what is default priority for hooks?
what will be the display order of extensions installed in this order:

1. hook_x:                  <p>A</p>
2. hook_x priority 1:   <p>B</p>
3. hook_x:                  <p>C</p>
4. hook_x priority 5:   <p>D</p>
5. hook_x:                  <p>E</p>
6. hook_x priority 10: <p>F</p>
7. hook_x:                  <p>G</p>

YonasH's repository + Extensions Directory = PunBB Extensions Online Library (in progress....)

Away. I will be back soon.

Re: extension display order?

Highest priority is 1 and lowest is 10. Default is 5.

So, BACDEGF, I think.