Hello guys, i was wondering if it's possible with the newever version of IPB (ip 4.x) is it possible to include page outside the local path of ipb installed like it was possible with IP.Content for ipb 3.4.x via path_to_ipb option (https://www.invisionpower.com/support/guides/_/ips-community-suite-apps/ip-cont/make-ipcontent-your-homepage-r273)??? I mean the code was something like this... what would be the new version of this code?? CCS was the old IP.Content, now it would be CMS for IP.Page right?? <?php
/**
* <pre>
* Invision Power Services
* Admin control panel gateway index.php file
* Last Updated: $Date: 2012-03-05 12:33:57 -0500 (Mon, 05 Mar 2012) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/company/standards.php#license
* @package Invision Power Board
* @link http://www.invisionpower.com
* @version $Rev: 10390 $
*
*/
/**
* You must define the path to your IPB installation here, with a trailing slash.
* THIS IS A PATH, NOT A URL. So, for example if this file is located in the root
* of your site at /home/account/public_html and your forums are in a subfolder
* named forums, you would set this to /home/account/public_html/forums/
*/
$path_to_ipb = '/var/www/ipb';
/**
* This is the flag in the URL for database friendly URLs. You must have a flag here
* (i.e. do not try to set this as an empty string). This also needs to be updated in
* admin/applications_addon/ips/ccs/app_class_ccs.php as well.
*/
/**
* ------------------------------------------------------------------------------------------
* No editing below this line
* ------------------------------------------------------------------------------------------
*/
define( 'CCS_GATEWAY_CALLED', true );
define( 'IPB_THIS_SCRIPT', 'public' );
define( 'IPS_PUBLIC_SCRIPT', 'index.php' );
require_once( $path_to_ipb . 'initdata.php' );/*noLibHook*/
//-----------------------------------------
// Get request uri
//-----------------------------------------
$uri = $_SERVER['REQUEST_URI'] ? $_SERVER['REQUEST_URI'] : @getenv('REQUEST_URI');
//-----------------------------------------
// Does URI have /index.php/ in it?
//-----------------------------------------
if( strpos( $uri, basename(__FILE__) . '/' ) !== false )
{
$myUri = substr( $uri, ( strpos( $uri, basename(__FILE__) . '/' ) + ( strlen( basename(__FILE__) ) + 1 ) ) );
}
else
{
$myUri = $uri;
}
//-----------------------------------------
// Does URI have db marker in it
//-----------------------------------------
if( strpos( $myUri, '/' . DATABASE_FURL_MARKER . '/' ) !== false )
{
$myUri = substr( $myUri, 0, ( strpos( $myUri, '/' . DATABASE_FURL_MARKER . '/' ) ) );
}
//-----------------------------------------
// Trim off trailing slash, if present
//-----------------------------------------
$myUri = rtrim( $myUri, '/' );
//-----------------------------------------
// What about ?key=value?
// PHP already sets GET, but need to fix page name
//-----------------------------------------
if( strpos( $myUri, '?' ) !== false )
{
$parameters = substr( $myUri, strpos( $myUri, '?' ) );
$myUri = substr( $myUri, 0, ( strlen($myUri) - strlen($parameters) ) );
}
//-----------------------------------------
// Sort out folders
//-----------------------------------------
$uriBits = explode( '/', $myUri );
$myFolder = '';
if( count($uriBits) > 1 )
{
$myUri = array_pop($uriBits);
$myFolder = count($uriBits) ? '/' . implode( '/', $uriBits ) : '';
$myFolder = ( $myFolder == '/' ) ? '' : $myFolder;
}
//-----------------------------------------
// Set appropriate params for IPB
//-----------------------------------------
if( !$_REQUEST['app'] )
{
$_GET['app'] = $_POST['app'] = $_REQUEST['app'] = 'ccs';
}
if( !$_REQUEST['module'] )
{
$_GET['module'] = $_POST['module'] = $_REQUEST['module'] = 'pages';
}
if( !$_REQUEST['section'] )
{
$_GET['section'] = $_POST['section'] = $_REQUEST['section'] = 'pages';
}
$_GET['page'] = $_POST['page'] = $_REQUEST['page'] = $myUri;
$_GET['folder'] = $_POST['folder'] = $_REQUEST['folder'] = $myFolder;
//-----------------------------------------
// Load registry and controller, and off we go
//-----------------------------------------
require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' );/*noLibHook*/
require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' );/*noLibHook*/
ipsController::run();
exit();[/code]