vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Which Execution Order to use (https://vborg.vbsupport.ru/showthread.php?t=164789)

adnan2007 12-09-2007 11:35 PM

Which Execution Order to use
 
I couldn't find any documentation of this on the manual.

This is what I made out of the description given.

Quote:

Use this field to enter the order in which code at the same hook will be executed.
To my understanding this is the order in which code gets executed within a specific hook.



I have a few questions.

Now how does one go about choosing the execution order or see if any other snippet is conflicting.

What happens if they overlap?

I see different products using the same hooks, do they all need to have different Execution Orders.


thx

Marco van Herwaarden 12-10-2007 05:25 AM

Unless there is a specific reason you want you code to run before or after other plugins, i would simply leave it at the default of 5.

Cars2007 04-24-2008 05:49 PM

Is execution order ascending? Does an EO of 1 run before an EO of 5?

I am getting a warning about a foreach() in one of my plugins, but I'm having a hard time figuring out *which* foreach it is because the reported line number doesn't have a foreach on it. I can set the EO to 1 or to 10 but it still won't land on a line that actually has a foreach.

Opserty 04-24-2008 06:11 PM

Yes, if you have multiple plugin's then check all of the plugins that are associated with the hook that is being excecuted when the error is generated. Your error will probably look like this:

Quote:

Error: .... in somemefile.php(193) eval()'d code line 212


193 is the Line number in somefile.php from this you can find the hook which is being executed, 212 is the line number of the code from plugins associated with that hook.

Cars2007 04-24-2008 07:36 PM

I figured that out. What I need to know is whether the plugin execution order is ascending or descending. I am getting wierd results from setting it to 1 or 10.

Boofo 04-24-2008 07:58 PM

1 runs first and 10 runs last.


All times are GMT. The time now is 08:30 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01800 seconds
  • Memory Usage 1,719KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete