I am reading this tutorial: http://xenforo.com/community/thread...nsert-tabs-in-profile-page-using-hooks.21205/, but got some questions:
Questions:
1. Step 6 - Our file Listener.php
why put
here?
2. Step 14 - Lets use them!
I want to see the data inside $content before render, so i put
here:
And i got result: string '' (length=0). But if i put var_dump($contents); before swicth(), i can get lots of output.
so why?
3. Step 15 - Pre loading templates
If we do not preload templates, it can still work. so what is the benefit to preload templates?
Questions:
1. Step 6 - Our file Listener.php
Code:
<li><a href="{$requestPaths.requestUri}#ourTab">Our Tab</a></li>
Code:
#ourTab
2. Step 14 - Lets use them!
I want to see the data inside $content before render, so i put
Code:
var_dump($contents)
Code:
case 'member_view_tabs_heading':
//Get our template!
$ourTemplate = $template->create('newProfileTab_ourTab', $template->getParams());
//Render
$rendered = $ourTemplate->render();var_dump($contents);
//Put the rendered template in the contents.
$contents .= $rendered;
break;
And i got result: string '' (length=0). But if i put var_dump($contents); before swicth(), i can get lots of output.
so why?
3. Step 15 - Pre loading templates
If we do not preload templates, it can still work. so what is the benefit to preload templates?
Last edited: