[RFC|Replaced] hook_display_page

These event requests have either been rejected by the community or have become redundant because of code changes or other events requests.
Post Reply
User avatar
imkingdavid
Registered User
Posts: 1050
Joined: Thu Jul 30, 2009 12:06 pm

[RFC|Replaced] hook_display_page

Post by imkingdavid » Fri Aug 05, 2011 9:05 pm

EDIT: This no longer needs to be included once this is merged.

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. :lol:
I do custom MODs. PM for a quote!
View My: MODs | Portfolio
Please do NOT contact for support via PM or email.
Remember, the enemy's gate is down.

User avatar
MichaelC
Development Team
Development Team
Posts: 889
Joined: Thu Jan 28, 2010 6:29 pm

Re: [RFC] hook_display_page

Post by MichaelC » Thu May 31, 2012 3:21 pm

Replaced by Extension Front Controller.
Formerly known as Unknown Bliss
psoTFX wrote: I went with Olympus because as I said to the teams ... "It's been one hell of a hill to climb"
No unsolicited PMs please except for quotes.

Post Reply