MyBB Community Forums

Full Version: Removing Login From One Page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello again!

Thank you to all of you who have done such a great job supplying answers, I thank you!

I am back with another question - in fact it's two fold

Is there a way to set a custom page as the home page? I would like entry.php to be my landing page

http://www.thebionicwoman.com/entry.php

That said, I would also like to be able to have the login and breadcrumb sections removed until they get deeper into the site

Is it possible to remove those elements from just one page?

Thank you again,

Steven
To set a certain page as the home page, add the following to your .htaccess file:

DirectoryIndex entry.php index.php index.html

As for removing the login and breadcrumb sections removed, it depends how you build the page in the first place. If you're relying on the MyBB template system, you could use the template conditionals/PHP in templates plugin by Yumi.
Thank you again!

I found the plugin, now I just don't know how to use it - I uploaded but it doesn't show in plugins or the standard config settings

Steven

It now shows in plugins - more soon LOL

S
If you uploaded everything correctly you should see it in the ACP configuration > plugins.

Make sure you download it from here (if it doesnt work):
http://mybbhacks.zingaburga.com/showthread.php?tid=260

After you activate it you simply have to go to your ACP > Templates > header template:

And change:

<div id='panel'>{$welcomeblock}</div>

To something like:

<?php
$homepage = "/";
$indexpage = "/entry.php";
$currentpage = $_SERVER[REQUEST_URI];
if($homepage!=$currentpage)
{
if($indexpage!=$currentpage)
{
echo "<div id='panel'>{$welcomeblock}</div>";
}
}
?>

Edit: the php code since its also your landing page. Forgot to add an extra if loop for the "/" (if you wonder why two if loops instead of an if ( ( ...) || ( ....) ){ for some reason that didnt work when i tested it not sure why )
Sill not seeing how to utilize it

posted after you

Sorry
uhm.. i saw it worked but now with another page reload im getting a mysql error.

http://www.thebionicwoman.com/

nevermind but the change is gone again.
I did as you instructed, and I lost the menu and login from all pages - brought it all back with a backup of the sql from earlier today so now worries there. The template did not store the PHP code for editing after I saved, so I could not get to it to remove it as well.

Am I doing something I shouldn't be?

S
Really not sure never have had those problems myself. I run almost the exact same code for myself. But then on the portal page, which is in the site root not in the forum root. And has always worked perfectly.

Are you sure you have the most recent version of the plugin?



Quick question did you use the echo template guide thingie to create the new php page? With a new global template?

If so you should be able to simply edit that to not include the welcomeblock.
I will double check - have to make hamburgers for the masses first Smile

S

Updated to 1.9 - will try again in a bit - Thanks for the heads up, I didn't see your post earlier about latest version

Okay, I updated the plugin, and once I activated it, took the login away from ALL pages

The only page that shouldn't have the login is entry.php

Menu stayed this time though

Steven
I got this figured out the round about way.

In the global.php there are two places that reference the header.

$templatelist .= "css,headerinclude,header,header2,footer,gobutton,htmldoctype,header_welcomeblock_member,header_welcomeblock_guest,header_welcomeblock_member_admin,global_pm_alert,global_unreadreports,";

add header2 like I did in the list

And then here ...

// Set up some of the default templates
eval("\$headerinclude = \"".$templates->get("headerinclude")."\";");
eval("\$gobutton = \"".$templates->get("gobutton")."\";");
eval("\$htmldoctype = \"".$templates->get("htmldoctype", 1, 0)."\";");
eval("\$header = \"".$templates->get("header")."\";");
eval("\$header2 = \"".$templates->get("header2")."\";");

You can see where I have again added header2

Then copy the entire contents of the header template into a new template called header 2.

You can then remove any options you want from your version 2

In the page layout template, on pages that you dont want the login and navigation to show, you simply use header2 like this:

<title>Ideal Nerd</title>
{$headerinclude}
{$header2}
<table width="100%" border="0" cellspacing="0" cellpadding="20">
<tr>
<td align="center">
<iframe width="800" height=450" src="http://www.youtube.com/embed/Jd90SLGFczQ" frameborder="0" allowfullscreen></iframe>
</td>
</tr>
</table>
{$footer}

Leaving you with this:

http://www.idealnerd.com/

I personally see the MyBB system as a great base for any website - ANY

But there are times when an individual just wants the forum to be a part of the overall site, not the site to be an overall forum.

MyBB is the perfect platform for that

S