Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
My really dummy's guide to custom hooks
markp_2000
Join Date: Jul 2006
Posts: 49

by markp_2000 markp_2000 is offline 17 Jul 2006

I was really struggling getting my head around the whole hook think. I read all of the tutes and it was still not sinking in.

But then eureka! To get the hook to display have it evaluate to the template variable. DO NOT echo anything in the hook! Have all of the results feed the variable. In the example below it is $mycustomstuff in the template.

So when the hook fires it will put the results into the $mycustomstuff variable and then when the page is rendered the templating system will display the results where ever the $mycustomstuff variable is in the template.

Mark

test.php

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Template

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

plugin/hook

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Views: 2015
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 00:14.

Layout Options | Width: Wide Color: