Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.8] OUGC Pages
#61
(2020-11-06, 03:54 PM)Omar G. Wrote: Pages that load at init do load during the plugins load process, which means any plugin that isn’t loaded before this plugin is loaded won’t load at all as the page will stop the script execution.

This can be worked around by enabling your plugins before this plugin, so they load before. Or simply disabling and enabling this plugin alone, which would probably be the best approach as other plugins might perform template edits, etc.

This is one of the major downsides with loading pages at init, as there is little more to load apart from plugins when they are rendered as you can see in the following link.
https://github.com/mybb/mybb/blob/2408f4...t.php#L239

I should probably look into improving the pages.php file to load pages only after all init code was executed, opposed to how it works right now where that file is not used for pages loaded at init.

That would certainly be desirable at some point.

That sounds like a good idea, the way I got around it after trying disabling all plugins then enabling as you suggested. This did not work but altering the priority of my plugin call to global_end did get it working.
Not in this land alone,
But be God's mercies known,
From shore to shore!
Lord make the nations see,
That men should brothers be,
And form one family,
The wide world ov'er

Reply
#62
Oh, I see, yes, if you are using a basic page which load at global_end you would need to hook at a lower priority as you just did or use a previous hook like global_intermediate.

I suppose this plugin should run at a higher plugin priority so all other plugins run before this, as well as adding a couple of extra hooks.
Reply
#63
(2020-11-06, 11:26 PM)Omar G. Wrote: Oh, I see, yes, if you are using a basic page which load at global_end you would need to hook at a lower priority as you just did or use a previous hook like global_intermediate.

I suppose this plugin should run at a higher plugin priority so all other plugins run before this, as well as adding a couple of extra hooks.

I can not use 'global_start' or 'global_intermediate' as they appear in global.php before $navbits() is defined so I have to use 'global_end'
Not in this land alone,
But be God's mercies known,
From shore to shore!
Lord make the nations see,
That men should brothers be,
And form one family,
The wide world ov'er

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)