2011-01-21, 05:03 PM
2011-01-21, 05:10 PM
Maybe this in your .htaccess already does what you want? It will leave the filenames the same, but yoursite/yourforum/ will display the portal. And you have to go to index.php directly to get to the forum.
Alternatively you can rename the files. There should be no problems - some things link and redirect directly to index.php though so you should have an index.php in any case. If you don't want to be redirected to index.php (don't want the main breadcrumb link go to index.php) you'll have to make some changes in MyBB code, unfortunately.
index.php should be a setting but alas it is not...
DirectoryIndex portal.php index.php index.html index.htm
Alternatively you can rename the files. There should be no problems - some things link and redirect directly to index.php though so you should have an index.php in any case. If you don't want to be redirected to index.php (don't want the main breadcrumb link go to index.php) you'll have to make some changes in MyBB code, unfortunately.
index.php should be a setting but alas it is not...
2011-01-21, 07:40 PM
I did this to my board and have caused the portal to return this error:
This is what I did:
Portal (index.php)
replaced with
replaced with
Global.php
replaced with
Any ideas how to fix?
Parse error: syntax error, unexpected '"' in /home/a4063392/public_html/index.php on line 177
This is what I did:
Portal (index.php)
add_breadcrumb($lang->nav_portal, "portal.php");
replaced with
add_breadcrumb($lang->nav_portal, "index.php");
redirect("portal.php", $lang->redirect_loggedin);
replaced with
redirect("index.php", $lang->redirect_loggedin);
Global.php
$navbits[0]['url'] = $mybb->settings['bburl']."/index.php";
replaced with
$navbits[0]['url'] = $mybb->settings['bburl']."/board.php";
Any ideas how to fix?
2011-01-21, 08:22 PM
You'll have a " too many or too few somewhere, double check around line 177.
2011-01-21, 09:04 PM
How come it worked previously? I can't see any extra "s.
Line 177:
Line 152 to 192:
Line 177:
eval("\$welcometext = \"".$templates->get("portal_welcome_membertext")."\";");
Line 152 to 192:
// Make the text
if($newann == 1)
{
$lang->new_announcements = $lang->new_announcement;
}
else
{
$lang->new_announcements = $lang->sprintf($lang->new_announcements, $newann);
}
if($newthreads == 1)
{
$lang->new_threads = $lang->new_thread;
}
else
{
$lang->new_threads = $lang->sprintf($lang->new_threads, $newthreads);
}
if($newposts == 1)
{
$lang->new_posts = $lang->new_post;
}
else
{
$lang->new_posts = $lang->sprintf($lang->new_posts, $newposts);
}
eval("\$welcometext = \"".$templates->get("portal_welcome_membertext")."\";");
}
else
{
$lang->guest_welcome_registration = $lang->sprintf($lang->guest_welcome_registration, $mybb->settings['bburl'] . '/member.php?action=register');
$mybb->user['username'] = $lang->guest;
eval("\$welcometext = \"".$templates->get("portal_welcome_guesttext")."\";");
}
$lang->welcome = $lang->sprintf($lang->welcome, $mybb->user['username']);
eval("\$welcome = \"".$templates->get("portal_welcome")."\";");
if($mybb->user['uid'] == 0)
{
$mybb->user['username'] = "";
}
}
2011-01-21, 09:59 PM
(2011-01-21, 09:04 PM)Clarkie Wrote: [ -> ]How come it worked previously?
Well, something went wrong with your edit. The changes you posted seem to be fine though. Revert to the original file and try again...? Or attach the whole file here...
2011-01-21, 10:36 PM
I've reverted twice. I can't see why it's doing it at all.
Right, I added
To .htaccess and htaccess.txt which is a MyBB file. Do I need the .txt file and if I only need some of what's in it, which bits do I need in the .htaccess?
Right, I added
DirectoryIndex portal.php index.php index.html index.htm
To .htaccess and htaccess.txt which is a MyBB file. Do I need the .txt file and if I only need some of what's in it, which bits do I need in the .htaccess?