Portal as main page...

Current Version: 1.0.6
Released: 09.01.10
Forum rules
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.

Topic author
openfire
Active Member
Posts: 2
Joined: 5. March 2008 21:41

Portal as main page...

Post 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.

Topic author
openfire
Active Member
Posts: 2
Joined: 5. March 2008 21:41

Re: Portal as main page...

Post by openfire »

anyone?
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: Portal as main page...

Post 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
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

wolferey
Active Member
Posts: 16
Joined: 26. January 2008 21:00

Re: Portal as main page...

Post 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/';

BlkJack-21
Active Member
Posts: 3
Joined: 2. May 2008 03:13

Re: Portal as main page...

Post 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?
User avatar

Ice
Former Team Member
Posts: 359
Joined: 20. January 2008 23:43
Location: England, United Kingdom

Re: Portal as main page...

Post 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")
Board3 Portal Dev & English Tech Support

BlkJack-21
Active Member
Posts: 3
Joined: 2. May 2008 03:13

Re: Portal as main page...

Post by BlkJack-21 »

Thanks for the response

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

Ice
Former Team Member
Posts: 359
Joined: 20. January 2008 23:43
Location: England, United Kingdom

Re: Portal as main page...

Post by Ice »

Did you refresh your cache? :)
Board3 Portal Dev & English Tech Support

BlkJack-21
Active Member
Posts: 3
Joined: 2. May 2008 03:13

Re: Portal as main page...

Post 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?

axel13
Active Member
Posts: 5
Joined: 9. June 2008 12:19

Re: Portal as main page...

Post 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
#####################################################

axel13
Active Member
Posts: 5
Joined: 9. June 2008 12:19

Re: Portal as main page...

Post by axel13 »

Heeeelp me please anyone :cry:

Brogan
Active Member
Posts: 26
Joined: 27. September 2008 17:50

Re: Portal as main page...

Post 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?
User avatar

Kevin
Site Admin
Posts: 2989
Joined: 7. January 2006 20:11
phpBB.de User: Saint
phpBB.com User: Saint_hh
Location: Hamburg
Contact:

Re: Portal as main page...

Post by Kevin »

The functions.php is the only place where it is defined.
Take this:

Code: Select all

'U_PORTAL' => append_sid("../portal.$phpEx"), 
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~

Kein Support per PN / No support via PM!

Brogan
Active Member
Posts: 26
Joined: 27. September 2008 17:50

Re: Portal as main page...

Post by Brogan »

Thanks - that solved it.

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

danny1969
Active Member
Posts: 21
Joined: 3. October 2008 10:41

Re: Portal as main page...

Post 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 ;)
Locked

Return to “board3 Portal 1.0.x - English Support”