2014-11-04, 03:45 PM
i am trying to display some information in usercp, before personal notepad but my function is not working...
Template:-showreferral_recent
Edited Usercp Template:-
My Plugin Template Name:- showreferral_recent
Template inner body:-
Hook in Plugin:-
Function:-
My function running fine on startup of hook , i checked it via "echo" command but not displaying value in templates, What am i mistaken here? i tried everything as much i can do after that i have to write here.. hope i will be get some help from here
Template:-showreferral_recent
Edited Usercp Template:-
{$latest_subscribed}
{$latest_threads}
{$latest_warnings}
{$showreferral_recent}
{$user_notepad}
My Plugin Template Name:- showreferral_recent
Template inner body:-
<div style='border:1px solid black;'>{$showref_recent}</div>
Hook in Plugin:-
$plugins->add_hook("usercp_start", "showreferral_recent");
Function:-
function showreferral_recent()
{
global $db,$mybb,$templates;
$showref_recent = "This will be my content to be displayed before personal notepad";
eval("\$showreferral_recent = \"".$templates->get("showreferral_recent")."\";");
}
My function running fine on startup of hook , i checked it via "echo" command but not displaying value in templates, What am i mistaken here? i tried everything as much i can do after that i have to write here.. hope i will be get some help from here