Thanks @JamesUsing 1.1, use http://xenforo.com/community/threads/library-set-your-own-route-controller-as-homepage.10156/
Set XenForo_ControllerPublic_Register as your index.
Using 1.2, I believe there's built-in functionality.
Thanks @King KoviforBumping your thread will have no bearing on getting support, especially within 24 hours of your original thread post date. You should give it at least a day or two before doing any sort of bump. Other than that, see James' post.
<?php
class CustomIndex_addon2
{
public static function initDependencies(XenForo_Dependencies_Abstract $dependencies, array $data)
{
if (!$dependencies instanceof XenForo_Dependencies_Public)
{
return;
}
$config = new Zend_Config(array(
'routePrefix' => 'register',
'controllerClass' => 'XenForo_ControllerPublic_register',
));
GeekPoint_CustomIndex_Helper::setDefaultRoute($config, $data);
}
}
?>
<?php
class CustomIndex_addon5
{
public static function initDependencies(XenForo_Dependencies_Abstract $dependencies, array $data)
{
if (!$dependencies instanceof XenForo_Dependencies_Public)
{
return;
}
$config = new Zend_Config(array(
'routePrefix' => 'Register',
'controllerClass' => 'XenForo_ControllerPublic_Register',
));
GeekPoint_CustomIndex_Helper::setDefaultRoute($config, $data);
}
}
?>
<?php
class CustomIndex_addon1
{
public static function initDependencies(XenForo_Dependencies_Abstract $dependencies, array $data)
{
if (!$dependencies instanceof XenForo_Dependencies_Public)
{
return;
}
$config = new Zend_Config(array(
'routePrefix' => 'pages',
'controllerClass' => 'XenForo_ControllerPublic_Page',
'params' => array('123' => 'lectus-pretium-consequat'),
));
GeekPoint_CustomIndex_Helper::setDefaultRoute($config, $data);
}
}
?>
$config = new Zend_Config(array('routePrefix' => 'pages','controllerClass' => 'XenForo_ControllerPublic_Page','params' => array('node_name' => 'lectus-pretium-consequat'),
));
Hi @James@time
(Replace "lectus-pretium-consequat" with your node name. Any changes that you make to the page name via Admin Panel need to be reflected in this config array.)
PHP:$config = new Zend_Config(array('routePrefix' => 'pages','controllerClass' => 'XenForo_ControllerPublic_Page','params' => array('node_name' => 'lectus-pretium-consequat'), ));
See my link above to shadabs helper.
<?php
class CustomIndex_addon6
{
public static function initDependencies(XenForo_Dependencies_Abstract $dependencies, array $data)
{
if (!$dependencies instanceof XenForo_Dependencies_Public)
{
return;
}
$config = new Zend_Config(array('routePrefix' => 'pages','controllerClass' => 'XenForo_ControllerPublic_Page','params' => array('node_name' => '123'),
));
GeekPoint_CustomIndex_Helper::setDefaultRoute($config, $data);
}
}
?>
Thanks @Jake Bunce - I want to set a Page (name:123 -id 16) home pageFYI, if you deny view access for guests then all forum pages will prompt them to login or register. That may be what you want.
Here is another trick that may interest you:
http://xenforo.com/community/threads/open-the-login-sign-up-drawer-automatically.50623/
Otherwise you can swap the routes using this addon:
http://xenforo.com/community/resources/route-changer.447/
Like so:
View attachment 50909
Thanks @Jake Bunce - I want to set a Page (name:123 -id 16) home page
We use essential cookies to make this site work, and optional cookies to enhance your experience.