Not Solved [How To?] How to make a new php page with the same theme
Not Solved

i want to know how to make a php page that uses the same theme i use in my forum
i use green dark emerald theme i want to make a new php page called here "updates.php is the php page to be made"
i tried to make one but that page didnt used the theme which is used in the forums.

let me know how to import the theme to a php page.

thank you in advance
regards ,
pepeknife Smile
Not Solved
This is quite simple, your page must have a particular structure:
// Requirements
define("IN_MYBB", 1);
define("KILL_GLOBALS", 1);
require "global.php";
// Add the navigation

// Here, make whatever you want

// Load your template
eval("\$updates = \"".$templates->get("my_updates_tpl")."\";");

The template must also have a structure:
   <title>{$settings[bbname]} - Updates</title>
   <!-- here is your personal content -->

Note that you can generate html directly in your page, but using templates is better. If you choose to generate "inline", think to put the content of the html in a variable which will be used in the output_page() function, don't do echo
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM or Discord
Not Solved
hey thanks for replying.

the above php code you have given should i add it to updates.php

or should i name it what ever i want ?
Not Solved
You name it as you want, but if you want a page called updates.php, it's better to name it updates.php Smile
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM or Discord

Forum Jump:

Users browsing this thread: 1 Guest(s)