[solved] Template not appearing
#2
Unfortunately, the usercp_nav_profile template is eval()'d inside of the usercp_menu_profile() function. Which means its scope is limited to that function and the short list of variables in the global list.

Some options are available, but they may be a little hacky.

For example, you could sneak your content into a variable that is globalized in that function, $mybb. You could add your content into $mybb->user['extra_content'] (and in the template ofc) or add it to the theme variable.

Or, you could edit the template in the cache before it gets called:

function myHook()
{
	global $templates;

	$oldTemplate = $templates->cache['template_name'];

	// search and replace or concatenate here

	$templates->cache['template_name'] = $newContent;
}

Just some ideas.
[retired]
Reply


Messages In This Thread
[solved] Template not appearing - by Khaki - 2018-10-14, 09:47 PM
RE: Template not appearing - by Wildcard - 2018-10-14, 10:02 PM
RE: Template not appearing - by Khaki - 2018-10-20, 04:50 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)