FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » FUDforum Suggestions » New Hook Request - COMPILER_BEFORE_OUTPUT (If it don't already exist that is ...)
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
New Hook Request - COMPILER_BEFORE_OUTPUT [message #164978] Mon, 11 April 2011 15:11 Go to previous message
Dayo is currently offline  Dayo   
Messages: 101
Registered: April 2011
Karma:
Senior Member
A hook placed after the forum has been loaded but BEFORE anything, including headers, has been sent, will be useful ... to me at least.

Getting tighter integration will be possible in my plugin could keep full track of requests.

For example, take this flow of events as it stands now...

  1. User requests Page X
  2. Core code determines user is not logged in
  3. User is redirected to login page
  4. Plugin uses COMPILER_FINALIZE_PAGE hook just before display
  5. Plugin send user to CMS login and feeds CMS with return params which in this case has to be front page as it has no way of knowing user actually wanted Page X.
  6. User is redirected to FUDforum Front page after login


Compared to ....

  1. User requests Page X
  2. Core code determines user is not logged in
  3. Plugin uses COMPILER_BEFORE_OUTPUT hook before redirection headers are sent
  4. Plugin sets session var "previous_request" as equal to "current_request" (which may be empty in which case "previous_request" will default to FUDforum front page) and then stores request url in session as "current_request"
  5. User is redirected to login page
  6. Plugin uses COMPILER_BEFORE_OUTPUT hook again
  7. Plugin sets session var "previous_request" as equal to "current_request" (which will not be empty) and then stores request url in session as "current_request"
  8. Plugin uses COMPILER_FINALIZE_PAGE hook just before display
  9. Plugin sends user to CMS login and feeds CMS with return params which in this case will be session var "previous_request".
  10. User is redirected to FUDforum Page X after login


The important thing is that the hook should be fired before anything is sent at all and preferably after GLOBALS.php has been loaded.

[Updated on: Mon, 11 April 2011 15:17]

Report message to a moderator

[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Embed Related Wishlist for 3.0.3
Next Topic: Allow anonymous voting in [some] polls
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Jun 17 15:33:48 GMT 2024

Total time taken to generate the page: 0.05114 seconds