set the registration page as the homepage

time

Active member
So I wanted to do facebook homepage, I just want to set the registration page as the homepage. You know what helped me do it.
 
Bumping 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.
 
  • Like
Reactions: LPH
Using 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 @James (y)

Bumping 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.
Thanks @King Kovifor :)
 
In which case post in add-on requests and see if someone can whip one up for you. I cannot at current as I have no access to an installation of XenForo.
 
Hi @James ,
I'm done with Recent Activity - node page for better results

but with register: The controller XenForo_ControllerPublic_register does not define an action called Index.

Here is the code I used
Code:
<?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);
}
  }
 
  ?>
 
Thanks @James
But

An exception occurred: Undefined index: Register in /home/mywebsite/domains/mywebsite.com/public_html/mywebsite/library/GeekPoint/CustomIndex/Helper.php on line 39

  1. XenForo_Application::handlePhpError() in GeekPoint/CustomIndex/Helper.php at line 39
  2. GeekPoint_CustomIndex_Helper::setDefaultRoute() in CustomIndex/addon5.php at line 16
  3. CustomIndex_addon5::initDependencies()
  4. call_user_func_array() in XenForo/CodeEvent.php at line 54
  5. XenForo_CodeEvent::fire() in XenForo/Dependencies/Abstract.php at line 180
  6. XenForo_Dependencies_Abstract->preLoadData() in XenForo/FrontController.php at line 125
  7. XenForo_FrontController->run() in /home/mywebsite/domains/mywebsite.com/public_html/mywebsite/index.php at line 13
 
Thanks @James
Code:
<?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);
}
  }
  ?>

and I used XenForo 1.1.5
 
Code:
<?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);
}
  }

  ?>

@James

I used the above code to set page title with 123 (id 16 and url: /pages/123_a/) as the homepage, but the message "The requested page could not be found"

Can you help me cause of this error.

Thanks @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.
 
@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.
Hi @James
I tried with the code
Code:
<?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);
}
  }

  ?>

123 is the page name. but "The requested page could not be found"


FYI, 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
 
Top Bottom