MyBB Community Forums

Full Version: [Solved] Portal.php broken, nothing displayed but {} tags
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

While editing my theme's portal.php to include a welcome block, somehow I managed to botch it up. The code was working completely fine until I decided to add new lines and indents to clean up the code a bit.

<html>
<head>
<title>{$mybb->settings['bbname']}</title>
{$headerinclude}
</head>
<body>
{$header}
<table width="100%" cellspacing="0" cellpadding="{$theme['tablespace']}" border="0" align="center">
<tr><td valign="top" width="200">
{$welcome}
{$pms}
{$search}
{$stats}
{$whosonline}
{$latestthreads}
</td>
<td>&nbsp;</td>
<td valign="top">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
    <tr>
        <td class="trow1">
            <span class="smalltext">
<!--Main Welcome Panel-->
		<p style="text-align: center;">
			<img alt="" src="http://axelcraft.net/images/welcome.png" style="width: 1024px;" /></p>
		<p style="text-align: center;">
			<span style="color:#696969;"><span style="font-size: 24px;"><em><span style="font-family: hutrmold;">Get ready for a whole new minecraft experience.</span></em></span></span></p>
<!--Slideshow-->
<center>
	<iframe src="http://axelcraft.net/images/slides/slideshow.html" width="800" height="320" scrolling="no" frameBorder="0" style="overflow:hidden;"></iframe>
</center>
<!--End Slideshow-->
		<p style="text-align: center;">
			<span style="font-size:20px;">
            	<span style="font-family: 'trebuchet ms', helvetica, sans-serif;">
                	Thanks for visiting AxelCraft! Start by <a href="http://axelcraft.net/member.php?action=register"><span style="color:#385947;"><span style="">signing up</span></span></a> to get the latest news and updates on the server as well as to register for <a href="http://axelcraft.net/forumdisplay.php?fid=9"><span style="color:#385947;">contests</span></a> and <a href="http://axelcraft.net/forumdisplay.php?fid=19"><span style="color:#385947;">events</span></a>!
                </span>
            </span>
        </p>
<!--End Welcome Panel-->
            </span>
        </td>
    </tr>
</table>
<br />
{$announcements}
</td>
</tr>
</table>
{$footer}
</body>
</html>

If you navigate to axelcraft.net/portal.php you'll see I've reset the template, but the {} tags are displaying, instead of inserting their contents. I thought resetting the template would fix it, but even with the default settings it still only displays those tags. Like I said, it was working fine WITH my custom content until I added some indents and spaces to the code.

Whaddup with that? Sad
portal.php file appears to be corrupt.
run file verification tool from tools & maintenance section and replace portal.php if required.
Were you editing the template in the database, MyBB's template editor, or the portal.php file itself?
I was editing it with the template editor, but I copied and pasted it from dreamweaver. (I like to have a neat interface to code) It does list portal.php as corrupt, and I have replaced it. However it still isn't working.
^ is that only the corrupt file or there are few more php files listed as changed / missing ?
It lists the inc/languages/english/global.lang.php as changed, but I had modified that as well and everything was still working after the changes. I haven't touched that file for a good two weeks.

It appears to be something only with portal.php. Everything else on my forums work fine. I can't imagine what could be causing one file to be not interpreting correctly out of hundreds.
view-source:http://axelcraft.net/portal.php

It's not being loaded as a MyBB document anymore.



Follow this tutorial to find out how to add a custom page: http://community.mybb.com/thread-116225.html
Okay, now how do I go about re-adding the portal.php from my theme? I know there's some sort of code like $theme that can bring up the directory.

I've successfully got a custom php inserted, so at least that's a start.
Download a fresh copy of MyBB and replace portal.php Smile
That worked perfectly.

I'm not sure why I didn't just do that in the first place. Toungue