MyBB Community Forums

Full Version: [Page Manager] Share your custom pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
phpinfo() does not return its content, it immediately outputs the PHP Version and other info when called.

So in your page you are are actually calling phpinfo() first and then outputting your template.

Since that function does not return its output (it only returns Boolean success/fail) I don't know how to tell you to fix it though.
(2013-08-25, 01:45 AM)Wildcard Wrote: [ -> ]phpinfo() does not return its content, it immediately outputs the PHP Version and other info when called.

So in your page you are are actually calling phpinfo() first and then outputting your template.

Since that function does not return its output (it only returns Boolean success/fail) I don't know how to tell you to fix it though.

I even tried just putting

echo 'TEST';

With the same result, it's weird.
No, it isn't weird man you just aren't getting that while echo()ing or phpinfo()ing you are immediately outputting to the buffer-- while building the template you are only outputting at the end of the script.

So instead of using a function to output the info you will need to split your template up into two parts; one to preface the output and one to close tags and display the footer info.

$template = '<html>
<head>
blah
</head>
<body>
<table>
blah';

// then output the first part of the template

phpinfo();

$template = '</table></body></html>';

// then finish up

That is obviously an abbreviated version but hopefully you will see what I mean.
(2013-08-25, 05:39 PM)Wildcard Wrote: [ -> ]No, it isn't weird man you just aren't getting that while echo()ing or phpinfo()ing you are immediately outputting to the buffer-- while building the template you are only outputting at the end of the script.

So instead of using a function to output the info you will need to split your template up into two parts; one to preface the output and one to close tags and display the footer info.

$template = '<html>
<head>
blah
</head>
<body>
<table>
blah';

// then output the first part of the template

phpinfo();

$template = '</table></body></html>';

// then finish up

That is obviously an abbreviated version but hopefully you will see what I mean.

That's pretty much what I did, except on part 2 I used $template .=
You still don't understand. You output the whole template after phpinfo(); is used, using output_page function. Wildcard means something like that:
<?php
global $headerinclude, $header, $theme, $footer, $lang;

if(!$mybb->user['uid']) error_no_permission();
//if ($mybb->user['uid']!=1) error_no_permission();
//if (in_array($mybb->user['usergroup'] , array(1,5,7)))error_no_permission();

echo '<html>
<head>
<title>'.$pages['name'].'</title>
{$headerinclude}
</head>

<body>
{$header}
<table border="0" cellspacing="1" cellpadding="4" class="tborder">
<tr>
   <td class="thead" colspan="4">My Page Title</td></tr>
   <tr>
      <td>';

         phpinfo();

echo '</td>
   </tr>
</table>

{$footer}

</body>
</html>';

add_breadcrumb($pages['name']);
?>
^Exactly right. You will need to output the two halves of the template separately and display the info between them.
Oh now I get it, wasn't seeing what you meant. Had to without and example.

Thank you very much.
No probs. Cool
Hello! Is possible to use this plugin in order to build/embed a contact form in a post ?
The page is working great on my test site, and is showing the pin from me (admin). But i am using the wordpress bridge to show my forum within a wordpress theme. Thats where is goes wrong and i don't know what i have to change. I tryed a couple of things but my php knowlage isn't that good

The forum is displayed at http://www.centoclub.nl/mybb
Wordpress is at http://www.centoclub.nl/cms
And the usermap is at http://www.centoclub.nl/mybb/misc.php?page=usermap

I also tryed the php.xml file and it is fine.
http://www.centoclub.nl/mybb/misc.php?page=php
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49