PinoStudio 1
MyBB 1.8.x Mod MyBB PHP page without plugin - Printable Version

+- PinoStudio 1 (http://pinostudio1.com)
+-- Forum: Foros Varios Temas (http://pinostudio1.com/forumdisplay.php?fid=10)
+--- Forum: MyBB 1.8.x Mods (http://pinostudio1.com/forumdisplay.php?fid=11)
+--- Thread: MyBB 1.8.x Mod MyBB PHP page without plugin (/showthread.php?tid=1537)



MyBB PHP page without plugin - DiegoPino - 10-15-2017

MYBB PHP page without plugin

1. Create your MyBB template.
- Admin CP --> Templates & Style --> Templates --> Global Templates --> Add Template
- Name your template whatever you like.
- "Template Set" should be "Global Templates"
- Create your template as normal.

PHP Code:
<html>
<
head>
<
title>Your Site</title>
{
$headerinclude}
</
head>
<
body>
{
$header}
  Use 
whatever MyBB Markup you want.
{
$footer}
</
body>
</
html


2. Create a new PHP file and copy/paste the following lines of code:
PHP Code:
<?php
define
("IN_MYBB",1);
include(
"global.php");
eval(
"\$page .= \"".$templates->get("your-template-name-goes-here")."\";");
output_page($page);    
?>

3. Move your new page into your MyBB root directory.
This is the same directory where "global.php" is located

Nota: Crear el template debe ser con el Panel de Administración de MYBB, si deseas observar un ejemplo real, puedes observar el Plugin de XML Database League, MyBB to generate a League Stats




Referencias: