Page 1 of 2

Portal as main page...

Posted: 5. March 2008 21:43
by openfire
I've installed this portal and it's great! Thanks!

I have a question (I've searched everywhere but I cant seem to find an answer):

I have my forum at http://www.mysite.com/forum

Now I would like the portal to be the default page at http://www.mysite.com and keep the forum at http://www.mysite.com/forum.

Basically, I want the portal to be the main site (http://www.mysite.com) and keep my forum at http://www.mysite.com/forum.

Right now, the portal is at http://www.mysite.com/forum/portal.php, but I want to move it to http://www.mysite.com

I hope I'm clear on what I'm trying to do. ;)

How can this be done?

Thanks.

Re: Portal as main page...

Posted: 6. March 2008 01:33
by openfire
anyone?

Re: Portal as main page...

Posted: 6. March 2008 08:34
by Kevin
Saint_hh http://www.phpbb.com/community/viewtopic.php?p=4605545#p4605545 wrote:Try this:
portal.php

search:

Code: Select all

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
replace with:

Code: Select all

$phpbb_root_path = '../forum/';
And upload the portal.php to your root directory.

Not tested, no experience in changing the root path for a single file and don't know how it affects the rest of the forum. Just a quick idea. ;)
Remember to change the path to the portal.php in the overall_header.html

Re: Portal as main page...

Posted: 6. March 2008 10:05
by wolferey
You can also rename portal.php to index.php. That way, you don't need to make a .htaccess file.
Also, you don't need to replace the line Kevin posted, just change it.

Move portal.php to your main folder and rename it to index.php, open it up and find:
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
Change to (note: add forum/ to the end):
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';

Re: Portal as main page...

Posted: 3. May 2008 00:27
by BlkJack-21
Hello!

1st off..love this mod!

Inatallation is easy. Customizabe blocks super-simple! Awesome work!

Now to my problem. LOL

I am unable to use .htaccess files (I wish I could!)

I have tired the posted suggestion.
You can also rename portal.php to index.php. That way, you don't need to make a .htaccess file.
Also, you don't need to replace the line Kevin posted, just change it.

Move portal.php to your main folder and rename it to index.php, open it up and find:
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';

Change to (note: add forum/ to the end):
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forum/';
Which with some minor modifications works nicely...but with one exception.

If the user is not logged in to: http://www.mysite.com (the portal) uses the log-in menu, gets the comfirmation box, then is redirected to the following link: http://www.mysite.com/forum/forum/portal.php, and the dreaded 404 error displays. I have taken a peek at some of the block codes on the portal and tried to tweak it there, to no avail. I am at a loss for a workaround to make this work. (right now I am forced to use a meta-redirect from the index page to http://www.mysite.com/forum/ which I absolutely dislike.)

Anyone have a possible solution?

Re: Portal as main page...

Posted: 3. May 2008 01:20
by Ice
Open portal/block/login_box.php
Replace

Code: Select all

'U_PORTAL'				=> append_sid("{$phpbb_root_path}portal.$phpEx")
with

Code: Select all

'U_PORTAL'				=> append_sid("index.$phpEx")

Re: Portal as main page...

Posted: 3. May 2008 03:40
by BlkJack-21
Thanks for the response

Tried your edit and the same .../forum/forum/portal.php?sid=59d746d64c6903ebde33590c37f26dcc was the resulting page.

Re: Portal as main page...

Posted: 3. May 2008 12:08
by Ice
Did you refresh your cache? :)

Re: Portal as main page...

Posted: 3. May 2008 17:08
by BlkJack-21
yes I refreshed it..twice.

here is exactly the modified lines in portal.php (aka index.php on root) and login_box.php

portal.php

Code: Select all

define('IN_PHPBB', true);
define('IN_PORTAL', true);

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './forums/';

$phpEx = substr(strrchr(__FILE__, '.'), 1);
login_box.php

Code: Select all

if (!defined('IN_PHPBB'))
{
   exit;
}

if (!defined('IN_PORTAL'))
{
   exit;
}

$s_display = true;

// Assign specific vars
$template->assign_vars(array(
	'U_PORTAL'				=> append_sid("index.$phpEx"),
	'S_DISPLAY_FULL_LOGIN'	=> ($s_display) ? true : false,
	'S_AUTOLOGIN_ENABLED'	=> ($config['allow_autologin']) ? true : false,
	'S_LOGIN_ACTION'		=> append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=login'),
));

?>
am i missing something?

Re: Portal as main page...

Posted: 9. June 2008 12:28
by axel13
Sorry for my english, but I have this problem too.
Is any fix for this problem?

And when I do this:
Kevin wrote:
Saint_hh http://www.phpbb.com/community/viewtopic.php?p=4605545#p4605545 wrote:Try this:
portal.php

search:

Code: Select all

$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
replace with:

Code: Select all

$phpbb_root_path = '../forum/';
And upload the portal.php to your root directory.

Not tested, no experience in changing the root path for a single file and don't know how it affects the rest of the forum. Just a quick idea. ;)
Remember to change the path to the portal.php in the overall_header.html
on index I don't see clock and member.gif
Here http://www.lanos.cc

And how should I edit the link Portal on index forum?
Now it looks http://www.lanos.cc/forum/portal.php
and I need http://www.lanos.cc/
Thanks!


And here is my .htaccess, but without

Code: Select all

DirectoryIndex portal.php index.php index.html index.htm
because i unistall portal untill a fix of this problem.... (oo, i think, my english is unreadable :oops: )

Code: Select all

# Lines That should already be in your .htacess
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>

# You may need to un-comment the following line
# Options +FollowSymlinks
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE 
RewriteEngine On
# REWRITE BASE
RewriteBase /
# HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION

#####################################################
# PHPBB SEO REWRITE RULES - SIMPLE
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. 'forum' REQUIRES TO BE SET AS FORUM INDEX
# RewriteRule ^forum/forum\.html$ forum/index.php [QSA,L,NC]
# FORUM
RewriteRule ^forum/forum([0-9]+)(-([0-9]+))?\.html$ forum/viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^forum/forum([0-9]+)/topic([0-9]+)(-([0-9]+))?\.html$ forum/viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^forum/announces/topic([0-9]+)(-([0-9]+))?\.html$ forum/viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^forum/[a-z0-9_-]*/?topic([0-9]+)(-([0-9]+))?\.html$ forum/viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# PROFILES SIMPLE
RewriteRule ^forum/member([0-9]+)\.html$ forum/memberlist.php?mode=viewprofile&u=$1 [QSA,L,NC]
# USER MESSAGES SIMPLE
RewriteRule ^forum/member([0-9]+)-(topics|posts)(-([0-9]+))?\.html$ forum/search.php?author_id=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS SIMPLE
RewriteRule ^forum/group([0-9]+)(-([0-9]+))?\.html$ forum/memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^forum/post([0-9]+)\.html$ forum/viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^forum/active-topics(-([0-9]+))?\.html$ forum/search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^forum/unanswered(-([0-9]+))?\.html$ forum/search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^forum/newposts(-([0-9]+))?\.html$ forum/search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^forum/the-team\.html$ forum/memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

# END PHPBB PAGES
#####################################################

Re: Portal as main page...

Posted: 10. June 2008 00:27
by axel13
Heeeelp me please anyone :cry:

Re: Portal as main page...

Posted: 29. September 2008 15:20
by Brogan
Was there ever a fix for this?

I have the same problem.
I have edited {U_PORTAL} in includes/functions.php
From: 'U_PORTAL' => append_sid("{$phpbb_root_path}portal.$phpEx"),
To: 'U_PORTAL' => append_sid("portal.$phpEx"),

But the link in overall_head.html is still pointing to /forum/portal.php instead of just portal.php and the same problem after logging in.

Where else is {U_PORTAL} defined so I can change the root path?

Re: Portal as main page...

Posted: 29. September 2008 17:28
by Kevin
The functions.php is the only place where it is defined.
Take this:

Code: Select all

'U_PORTAL' => append_sid("../portal.$phpEx"), 

Re: Portal as main page...

Posted: 29. September 2008 18:36
by Brogan
Thanks - that solved it.

So it was just the ../ that was missing from the path.

Re: Portal as main page...

Posted: 3. October 2008 11:09
by danny1969
Hi,

First of all also thanks for this great portal mod. But about this topic, I don’t manage to get result. I have a phpBB3 forum to explore all features on http://www.gymnasticsforum.be/phpBB3 its this url because I have also a phpBB2 running.

Is it posible to put every file we have to edit (and how) in a list as answer to my post? In a few weeks I will make the step to phpBB3 with my phpBB2 forum so when you go to http://www.gymnasticsforum.be I would like to see then your great portal.

I am realy noobie about all of this but I want to learn, so have a bit patience with me.

Thanks in advace, Danny ;)