Not Solved How do you use the theme style?
#11
Not Solved
Are you making a plugin Tom ? Paste your plugin's code here. I'll edit it for you.
Reply
#12
Not Solved
It's only a tiny page ATM Toungue

I basically need to echo some HTML to make a table in the style of the theme the user is using Smile
Reply
#13
Not Solved
You can make it as a template and then evaluate it in the plugin function.
Reply
#14
Not Solved
I want to try and do it without templates, but I guess I could use them.

How do you define and fill and call a template?
Reply
#15
Not Solved
Download this plugin: http://yaldaram.com/showthread.php?tid=137 And see how I call templates Toungue
Reply
#16
Not Solved
Could you just paste it Smile

At college and your site is blocked Toungue
Reply
#17
Not Solved
OK, Make a template with this code;

	require MYBB_ROOT."/inc/adminfunctions_templates.php";
	$template = array(
		"title"		=> "TEMPLATE_NAME",
		"template"	=> 'TEMPLATE_CODE',
		"sid"		=> -1
	);
	$db->insert_query("templates", $template);

Now use this following code to evaluate this template;
eval("\$VARIABLE = \"".$templates->get("TEMPLATE_NAME")."\";");

And finally, use this variable: $VARIABLE and place it in the template where you want the template code to show.
Reply
#18
Not Solved
Can I just create a template and call it? I dont really understand eval :;
Reply
#19
Not Solved
No, you've to evaluate it for displaying whats inside it.
Reply
#20
Not Solved
So what is $variable?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)