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
Re: New Hook Request - COMPILER_BEFORE_OUTPUT [message #164995 is a reply to message #164991] Wed, 13 April 2011 13:34 Go to previous messageGo to previous message
Dayo is currently offline  Dayo   Bahrain
Messages: 101
Registered: April 2011
Karma:
Senior Member
OK. first the bad news. I finally completed the plugin, or so I thought, after slugging through. After activating and trying it however, a big, fat nothing happened.

It turns out that the documentation for the hook I was relying on, COMPILER_FINALIZE_PAGE, is, shall we say, a bit misleading.

It says, in an example of imprecise language, "Modify a page before it's written out" when it should say something like "Modify template html data before it is built as a template file".

Now. I am sure to the person that wrote it, being familiar with the application, the second meaning is obvious ... particularly since the hook has the term "COMPILER" in it but to me, I saw "Modify a page (web output page) before it is sent to the browser".

I found out the true meaning after several hours of head scratching and digging in the code.

<Side Show Begin>
Lord Raglan, at Battle of Balaclava during the Crimean war, sent an order to the 600 men of the Light Brigade to "advance rapidly to the front, follow the enemy, and try to prevent the enemy carrying away the guns". He had just watched the Heavy Brigade charge into Russians and drive them back in another area but the Russians had captured some Turkish artillery pieces and he didn't want them to retreat with those pieces.

The Light Brigade however was positioned in a valley with Russian Guns at the other end. To try to take these was suicide but being unable to read Raglan's mind, decided an order was an order and proceeded to charge the position. Half of the Light Brigade was wiped out simply because Raglan didn't say "... retreating with the guns they captured earlier from the Turks".

Imprecise language kills!
<Side Show End>



Now the good news.

All the code is ready. It just needs a hook that is called after all the output has been put together and just before the output is sent to the browser. Hopefully, this can be achieved.

Some advice on where to add such a hook will be appreciated.

Thanks a mil!

[Updated on: Wed, 13 April 2011 13:37]

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: Fri Nov 22 16:35:05 GMT 2024

Total time taken to generate the page: 0.03877 seconds