Jump to content
DevFuse Forums

IP.Board Portal development


Michael

Recommended Posts

hi

 

i need a step by step tutorial how to setup portal like this please some one guide me

 

the portal should like this

 

http://www.devfuse.com/forums/portal/

 

 

and also member should visit portal first and then forum page

 

some guide me waiting for your replies

Link to comment
Share on other sites

hi

 

i need a step by step tutorial how to setup portal like this please some one guide me

 

the portal should like this

 

http://www.devfuse.com/forums/portal/

 

 

and also member should visit portal first and then forum page

 

some guide me waiting for your replies

 

 

Have to admit I'm in much the same boat (Although I do realize paid mods come first :thumbsup: )

Link to comment
Share on other sites

Go to initdata.php in the root of your forum and open it, find this line around line 50

 

define( 'IPS_DEFAULT_PUBLIC_APP', 'forums' );

 

And change it to

 

define( 'IPS_DEFAULT_PUBLIC_APP', 'portal' );

 

Your board will always open with portal first, good luck.

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

I have my portal on http://www.scenario-paintball.com and my forums on http://forums.scenario-paintball.com

 

My www virtual host has this option :

        DirectoryIndex portal.php

 

And this is my portal.php :

<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.2.0
* Main public executable wrapper.
* Set-up and load module to run
* Last Updated: $Date: 2011-03-11 12:41:48 -0500 (Fri, 11 Mar 2011) $
* </pre>
*
* @author      $Author: ips_terabyte $
* @copyright   (c) 2001 - 2009 Invision Power Services, Inc.
* @license     http://www.invisionpower.com/community/board/license.html
* @package     IP.Board
* @link        http://www.invisionpower.com
* @version     $Rev: 8042 $
*
*/

define( 'IPB_THIS_SCRIPT', 'public' );

/* Portal */
define( 'IPS_DEFAULT_PUBLIC_APP', 'portal' );
define( 'IPS_PUBLIC_SCRIPT', 'index.php' );
define( 'IPB_URL', 'http://forums.scenario-paintball.com' );

require_once( './initdata.php' );/*noLibHook*/

require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );/*noLibHook*/

ipsController::run();

exit();

?>

 

My problem is that www redirect to forums.

 

Any idea ?

Link to comment
Share on other sites

Problem solved. It's provide to the _fUrlComplete function of the ipsRegistry class :

        /* www.hostname.com vs hostname.com - need to ensure we are at the correct URL for AJAX purposes */
       if( !defined('CCS_GATEWAY_CALLED') && ipsRegistry::$request['request_method'] == 'get' )
       {
           $_requestedHost        = $_SERVER['HTTP_HOST'];
           $_configuredHost    = parse_url( ipsRegistry::$settings['board_url'], PHP_URL_HOST );
           $uri                = $_SERVER['REQUEST_URI']  ? $_SERVER['REQUEST_URI']  : @getenv('REQUEST_URI');
           $_t                    = !empty(ipsRegistry::$settings['board_url']) ? @parse_url( ipsRegistry::$settings['board_url'] ) : @parse_url( ipsRegistry::$settings['base_url'] );
           $_toTest            = ( $_t['path'] AND $_t['path'] != '/' ) ? preg_replace( "#^{$_t['path']}#", '', $uri ) : str_replace( $_t['scheme'] . '://' . $_t['host'], '', $uri );

           if( strpos( $_configuredHost, 'www.' ) === 0 AND strpos( $_requestedHost, 'www.' ) !== 0 )
           {
               ipsRegistry::getClass('output')->silentRedirect( ipsRegistry::$settings['board_url'] . $_toTest );
           }
           else if( strpos( $_configuredHost, 'www.' ) !== 0 AND strpos( $_requestedHost, 'www.' ) === 0 )
           {
               ipsRegistry::getClass('output')->silentRedirect( ipsRegistry::$settings['board_url'] . $_toTest );
           }
       }

Just add define ('CCS_GATEWAY_CALLED', false); in your portal.php.

 

I have a another problem. portal don't work if I rename admin folder...

Link to comment
Share on other sites

  • Management

This announcement seems to be turning into a support topic, currently I'm only offering support for the Portal on the IPS Forums. You can find the support topic here. I've also created a suggestions topic for the next version here. Any bugs you encounter can be reported here.

 

To answer your question llaumgui, currently the Portal doesn't come with this file but I will be looking into it next version. I'll close this topic to prevent future confusion, the links above should cover everything.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...