MyBB Community Forums

Full Version: Page Manager - How to use PHP in it.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I've got a problem and I would be really ( I mean REALLY ) greatfull for resolving it.

I want to make a coustom page using Page Manager plugin with php code in it. I'm using this code
<?php

global $headerinclude, $header, $theme, $footer;

$template='<html>
<head>
<title>'.$pages['name'].'</title>
{$headerinclude}
</head>
<body>
{$header}

I would be pleased if my code will be here and still working.

<br />
{$footer}
</body>
</html>';

$template=str_replace("\'", "'", addslashes($template));

add_breadcrumb($pages['name']);

eval("\$page=\"".$template."\";");

output_page($page);

?>

And I want to inster this code so it would work:

foreach($champ as $key => $val) {

<div class="tborder" style="height: 150px; width: 100px; float: left; margin: 5px;">
<div class="trow1" style="height: inherit; width: inherit;">
<img src="images/champ.png" style="height: 80px; width: 80px; padding-left: 10px; padding-right: 10px; padding-top: 10px; padding-bottom: 5px;">
<center><strong><a href="#">Champ1</a></strong></center>
</div>
</div>

}
:unsure: this might have a clue.. OR an expert will provide exact solution - lets wait