MyBB Community Forums

Full Version: How do you use the theme style?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4
It is the variable which is used to show the template content on "template" where it is placed. For example, if you place this in index template above {$forums} then your template content will be shown above forum's categories.
But I want to show it on a php page, not in MyBB Toungue
For getting your styles and whatnot, find a way to include the headerinclude template - since it contains all the stylesheet information. For the rest of the stuff I'm not sure.

There might be an easier way to do this, though. Can you describe exactly what you're trying to do and where the page will be located, relative to your MyBB installation?
Basically its a plugin page. Used specifically by the plugin as a warning page before redirecting them Smile

it is located in the root folder and IN_MYBB is defined.

Basically, it must take on the look of whatever theme the user is running at the time. SO I can't set it as a static style Smile
Somewhere in the <head> tag in the page's template, put {$headerinclude}. That'll add the CSS stuff automatically.
(2011-01-04, 10:35 PM)Tom K. Wrote: [ -> ]Basically its a plugin page. Used specifically by the plugin as a warning page before redirecting them Smile

it is located in the root folder and IN_MYBB is defined.

Basically, it must take on the look of whatever theme the user is running at the time. SO I can't set it as a static style Smile

Okay, then you should be able to use this tutorial:

http://community.mybb.com/thread-51222.html

I believe Yaldaram already mentioned this but just use a template in the Global set to construct your page and use the structure provided in that tutorial. It will give you the header, footer, & stylesheets to work with.

Now if this is going to be a plugin you're releasing, you'll obviously have to insert the necessary template during the install/activation, but if it's going to be a private one only for your site, you're better off to just create the template manually. So that's the next question - is this something you're going to be releasing or are you keeping it for personal use?
Releasing Wink
oic. Well, you're on your own for inserting the template (though several plugins already do this), but they're the best way to do this imo.
So, make my own template. But how do I call it? Into a php page?
eval("\$example = \"".$templates->get("example")."\";"); 
output_page($example); 

Replace all 3 instances of example with the template name.
Pages: 1 2 3 4