Not Solved Using PHP with Page Manager?
#3
Not Solved
(2014-09-23, 05:38 AM)Darth Apple Wrote: I believe that is beyond the limitations of page manager. Something like this may be more along the lines of what you are looking for. This tutorial uses templates, but you could execute PHP code the same way using something like this for the template instead:


<html>
<head>
<title>{$mybb->settings[bbname]}</title>
{$headerinclude}
</head>
<body>
{$header}
<br />
{$pagecontent}
{$footer}
</body>
</html>

Then simply put whatever you want your page content to be as evaluated HTML and make sure it's in the $pagecontent variable before the eval () line in your PHP page. For example:


<?php

define('IN_MYBB', 1); // (1a)
require "./global.php"; // (1b)

add_breadcrumb("Rules page", "rules.php"); // (2)

$pagecontent = "my content! ". "I am executing PHP code!";
eval("\$rules = \"".$templates->get("rules")."\";"); // (3)
output_page($rules); // (4)
?>

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

I hate to ask but do you know what is limiting Page Manager from being able to run PHP? I'm having trouble believing that this task is completely beyond the limitations of page manager. I would normally choose your route but I have quite a bit of pages I need to do and using that method might make it very confusing.
Reply


Messages In This Thread
Using PHP with Page Manager? - by Achilles - 2014-09-23, 05:29 AM
RE: Using PHP with Page Manager? - by Darth Apple - 2014-09-23, 05:38 AM
RE: Using PHP with Page Manager? - by Achilles - 2014-09-23, 06:18 AM

Forum Jump:


Users browsing this thread: 4 Guest(s)