Custom homepage without login

Elgg 2.3.8 is installed in the root of our site.

We've built a custom homepage by overriding Elgg’s resources/index with a file at /views/default/
resources/index.php.

According to our settings, users must login in order to visit the site. However, we want to exclude the homepage from this requirement.

Of course we can install Elgg in a sub directory and solve the problem if you think it is the best approach.

Or, please guide us how to do it with root installation.

Thank you very much

 

 

  • The homepage (/) is excluded from the protection as are a few other pages like the login page (/login) and the register page (/register)

  • @page { margin: 0.79in } p { margin-bottom: 0.1in; line-height: 120% } a:link { so-language: zxx }

    Honestly, I didn't understand the problem presented here by Reuven. Its simply too technical for me, but reading the answer by Jerome Bakker, it reminds me of a problem that I am facing and have to overcome by redirecting to core login interface /login.

    See, I am using a Custom Home Page (Elgg Home Page Logged out) Plugin, that allows me to login and register as well in Elgg 2.3.8. The problem is I am also running a plugin called Site Access

     

    Version 2.4.3 (Registration Plugin) which provides Captcha at Registration and also has a configuration option to invoke Captcha at Failed Login at a variable interval. In my case, I have it set to integer 1, where captcha will be invoked first login failure due to credential mismatch. It works fine with the core theme except the custom homepage doesn’t show the captcha validation at login failure though it does display on the same custom homepage for registration.

     

    So, one time, I was unable to login no matter what, then I remembered about the Site Access Plugin and the invoke setting – 1. So, then I logged in by typing myhotfb.com/login and validated the captcha and changed the setting to 3 instead of 1. Now a regular user wouldn’t know to do this. I guess what I am trying to say is there a easy and simple fix where captcha can be invoked on the custom home page at login failure?

  • @MyHoTFB.COM your posting is highly confusing. I have no idea what exactly your problem is. And it's not nice to occupy the discussion thread started by someone else with some off-topic other problem.

    @Reuven the walled-garden option of Elgg uses a separate index page defined by the view vendor/elgg/elgg/views/default/resources/walled_garden.php. If you want a custom index page also with the walled-garden option enabled, you would also have to customize this view by overriding it with your modified view saved as views/default/resources/walled_garden.php in your plugin in addition to the customized index.php view.

  • Thank you all,

    I think my question was not clear enough.

    My settings in the Advanced Settings -> Site Access:

    Restrict pages to logged-in users - true (checked)
     
    In these settings, when a visitor comes to our site, he/she gets the login box, not the homepage.
    We want the visitor to see the homepage, not the login box. On the homepage we have an "ENTER" button. When the visitor clicks it, the login box appears.
     
    Regarding the overriding walled_garden: I'm not sure what to do with it. I'd appreciate more detailed guidance.
     
    BTW - I've found another walled_garden page at: 
    vendor/elgg/elgg/views/default/page/walled_garden.php which says: " Used for the walled garden index page"
     
    Thank you very much for your help.