NOTE: I may be wrong on some of the items below, but this is my best guess on how it should work
- Name: hook_display_page
- Rationale: As discussed in this topic (about Self-Contained MODs), the issue was brought up about not being able to use front-facing files in MODs. Well, I suggested being able to use index.php as the gateway file and use a query string to access other files (e.g. "index.php?p=viewtopic&f=3&t=2"). This way, MOD authors could still contain their entire MOD in one folder, but be able to specify which file can be accessed as a front-facing MOD. This is quite similar to the ucp and mcp arrangement (i.e. "ucp.php?i=pm", "mcp.php?i=queue", etc.), except used globally. Nils suggested it be posted as a hook RFC.
- Placement: index.php
- Input arguments:
- $path (string) path to file, relative to board root
- Output format: true or false based on whether or not the file exists
- Output semantics: If return is true, display the page the user is trying to access. Otherwise, display the forum index page (default for index.php).
- Infrastructure: unsure
- Related: unsure
Ideally, this would be as close to the top of index.php as possible, so that files can simply be include()-ed in without redoing all the setup stuff (i.e. $user->setup()). Might cause issues with including some files multiple times, though, regardless. But nils said this should be do-able for 3.1, so it shouldn't be too much work.