I'm trying to add a link in left menu of UserCP "Misc." section using a hook associated with its function, but tried several different hooks, nothing works. I've tried each of the following hooks.
usercp_start, usercp_end, usercp_menu, usercp_menu_built
I'm not entirely sure, but I know you can use,
$db->insert_query("templates", $mytemplate);
require "../inc/adminfunctions_templates.php";
and,
find_replace_templatesets
Nope, I'm actually know all about this, this is not the problem, but thanks for trying
I want to use a function where I could "evaluate" a template on the UserCP Misc. menu area. The variable is already present in "usercp_nav_misc" template. Now what I want is to evaluate a template (that has link to use as a menu link) using a function with some checks like if something is present then show that template otherwise not.
For more clarification I'm using this function with hook;
$plugins->add_hook("usercp_menu_built", "usercp_link");
function usercp_link()
{
global $mybb, $templates, $var;
if ($mybb->settings['plugin_activated'] != "0")
{
eval("\$var = \"".$templates->get("template_name")."\";");
}
}
All of the checks used are fine.
Reverse engineer MySupport. It uses the UserCP menu
That's what I did for one of my plugins I'm working on
Thanks Paul, that give me a hint.