[Elgg 1.8-1.12 & 2.X: Login required] v1.8.3

Release Notes

Changelog:

  • Only code clean-up. No changed functionality.
  • thanks for the feed bac and advcie : ) i am sorting it all out now added html href's for the footer so its all sorted now : ) thanks again you have helped me so much with your advcie and of course your amazing plugins!

  • I, and no doubt other less experienced users find it very difficult to manage things when people refer to non-existant procedures. For example, the Readme file and the above notes make several references to Elgg's "Walled Garden", but I have yet to see where that term is officially used by Elgg.

    In the Readme file the author states:

    ATTENTION: If using this plugin, please don't enable the walled-garden option on Elgg's advanced settings page.
    This sounds very important, yet the Advanced Settings Page in Elgg's admin control panel makes no reference to a "Walled Garden". If the Author means Untick the box "Restrict pages to logged-in users", then it would be really helpful if he said that. I'm sorry to be so harsh, but writing a good plugin and making it easy for everyone to use should go hand-in-hand.

  • @JohnK: reading "I'm sorry to be so harsh, but.." does not make it sound less offensive to me. Rather the opposite as it shows me that you have chosen your words very deliberately. Also, using "the author" and "people" instead of addressing me directly even once annoyed me quite a lot.

    The term "walled garden" is commonly used to refer to a functionality that "restricts pages to logged-in users" not only by Elgg but in other web applications, too. It's used throughout the code of Elgg and the docs and also in the discussion topics here on the site that deal with this functionality. There's even a page in the docs about it: http://docs.elgg.org/wiki/Walled_Garden. It seems the option description on the advanced settings page is the only place where the term "walled garden" is NOT used.

    Nonetheless, I thought it would be okay to refer to the "walled-garden option" on the advanced settings page instead of using the bulky term "Restricts pages to logged-in users option". I thought I exlained it sufficiently what the Loginrequired plugin does both in the README file and on the plugin page (let alone already in the brief plugin description "A walled garden plugin (content accessible only for logged in site visitors)") for everyone to understand what option on the advanced settings page I'm referring to. Maybe I was wrong and your criticism is justified. But still, I find the tone you've chosen for your criticism rather unjustified.

  • can i use this on a site that does not require people to be logged in? i am trying to create a custome index without removing elgg menu items etc 

  • @UK: if the walled garden functionality is not what you are looking for it does not make much sense to use the Loginrequired plugin directly. But you can follow the lines of this plugin to create your own custom index page plugin. You would only need to remove the code that blocks the access to the other pages. Depending on what you want to be displayed on the index page you might need to make some adjustment, too. Basically, you could also start from the custom_index plugin in the same way and create your own index page plugin that shows the content you want.

  • i am doing that now thanks : ) with some code i got from your before but i seem to be messing it up lol using elgg custom index, what i would like to do is add 2 boxes like i did with your plugin and then shwo the menu elgg menu but not show members blogs pages boomarks etc.

    i seem to of lost the elgg menu this is the code i am using now http://sz1hosting.com

    <?php
    /**
    * Elgg custom index page
    *
    */

    elgg_push_context('front');

     

    $list_params = array(
    'type' => 'object',
    'limit' => 4,
    'full_view' => false,
    'view_type_toggle' => false,
    'pagination' => false,
    );

     

    //grab the login form
    $login = elgg_view("core/account/login_box");

    elgg_pop_context();

    // lay out the content
    $params = array(

    );
    $body = elgg_view_layout('custom_index', $params);

    // no RSS feed with a "widget" front page
    global $autofeed;
    $autofeed = FALSE;


    $infobox .= '<b>'.'Providing Hosting & Support services for over 5 years'.'</b>' ;' <img alt="sz1Hosting Features" height="190" src="http://sz1hosting.com/_grapics/sz1hostingfeatures.jpg" width="199" style="border: 0px;"></a>';
    $infobox .= '<img alt="Sign up " height="590" src="http://sz1hosting.com/_graphics/sz1hostinghome.jpg" width="953" style="border: 0px;"></a>';
    echo elgg_view_module('featured', elgg_echo("Buy a Hosting Package Today - All Packages Include Cpanel Softaculous "), $infobox, $mod_params);

  • @UK: do you mean the site menu does not get displayed for you? In the Loginrequired plugin the site menu should not be shown for logged out users. Therefore the view views/default/page/elements/header.php is overriden by the Loginrequired plugin to check if the user is logged in or not. For logged out users the line

    echo elgg_view_menu('site');

    is not executed resulting in the site menu not being shown to them. If you want the menu to show up regardless if the user is logged in or not you simply do not need to override the header.php view. So, simply don't include the views/default/page/elements directory with the header.php file in your plugin at all as it is not needed.

  • ah ok, thanks you for the info and advice : )

  • Hi iionly, I´ve Login Required activated and configured (in start.php) with some public areas of my site, like groups profile, but when a user click in a link not permitted (for logged out users), the user is forwarded to walled garden. My question is if is possible to change this behavior, I need that only shows the system message "You must be logged in..." with no forwarding. Thanks for the plugin.

  • @Javier: sorry but currently I have no idea how the forwarding could be avoided.

  • Irony... another Odin asked the same question I had.. But, I have a slightly different question about navigation menus.

    On the navigation menu made from the example given here, it does not use the menu background from the default theme. How would I be able to add that?

    Also, I am using the Menu Builder plugin. That allows you to flag which items can be seen by users who are not logged in.

    So I am actually using that, and if configured properly, and you have the corresponding urls added to be allowed, it works like a charm. However, It is still missing that background bar to make the user experience consistent.

     

    Update:

    looking at the page source, I am noticing the navigation elements being spit out before:

    <div class="elgg-page-navbar">
      <div class="elgg-inner">

     

     

    I have poked around the code a bit, and may just be at a loss as to understanding what is going on to cause this..

     

  • @Odin Wynd I'm not sure what exactly you have modified and it's also been a few years since I suggested how to add a separate site menu when using the Login Required plugin to show up when logged out.

    I believe, if you are using the Menu Builder plugin, this plugin already creates a separate site menu for logged-out visitors. Therefore, if you indeed want this site menu to show up, it would be contradicting to hide the site menu with the Login Required plugin on the one hand and then trying to re-add it by modifying the code of the Login Required plugin again for the site menu getting displayed again.

    Most likely the easiest way to fix it would be to just remove the file mod/loginrequired/views/default/page/elements/header.php completely. Then the Login Required plugin does no longer override the core view at all and the site menu behaviour wouldn't be modified anymore at all, i.e. the Menu Builder plugin should deal with it regardless if a user is logged-in or not including the appearance of the menu.

  • When I delete mod/loginrequired/views/default/page/elements/header.php the menu just goes away altogether..

     

Stats

  • Category: Misc
  • License: GNU General Public License (GPL) version 2
  • Updated: 2016-12-11
  • Downloads: 7634
  • Recommendations: 26

Other Projects

View iionly's plugins