Why plugin don't show the text?
#1
<?php
if(!defined("IN_MYBB")) die("Zabladziles? ;)");

function character_panel_info() {
	return array(
		"name"			=> "Character Panel v1.0",
		"description"	=> "Character Panel for Redneck Jump RolePlay",
		"website"		=> "",
		"author"		=> "Ethernet",
		"authorsite"	=> "",
		"version"		=> "1.0",
		"guid" 			=> "",
		"compatibility" => "1*"
	);
};

if(defined('THIS_SCRIPT'))
{
    global $templatelist;

    if(isset($templatelist))
    {
        $templatelist .= ',';
    }
	
	$templatelist .= 'characters_index';
}

$plugins->add_hook('global_start', 'character_panel_peis');

function character_panel_peis() 
{
	$message = 'test';
	
	global $lang, $templates;

    $steamID_profile = eval($templates->render('characters_index'));
	
	echo 'done';

};	

?>

Here's my code, I added template characters_index. Why not showing the text from template? I wrote "Hello World" in template, but is don't exist on any page. Any suggestions?
Reply
#2
Use

eval('$page = "' . $templates->get('characters_index') . '";');
output_page($page);
Reply
#3
I don't think templates get cached before *global_start* so you should probably stick to *global_intermediate*.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)