Where and how do I edit the Login Page ?

I have the site set up so only registered logged in user can see ontent, but how can I add an image or some e.g. of content without allowing FULL read access to the site ?

I am using custom index which allows me a nice login page, but when set to allow only logged in users to see content, the default login screen is very bland...

See here any help appreciated just to add the same facebook like image I have here to this login page.

Help appreciated

 

 

 

  • You could try my Login required plugin:

    http://community.elgg.org/pg/plugins/project/804349/developer/iionly/elgg-181-login-required

    It's a walledgarden plugin, i.e. only logged-in users see the content, similar to the walledgarden-mechanism already included in Elgg 1.8 by default. The Login required plugin has a separate index page that people will see when not logged-in. You can configure this page (for example add a link to an image, text etc.).

  • I guess i should post here instead.

    I am trying to change the default page (the login page for users which are not logged in, and when you log out). I want it to sell my site and explain why new users should register, without showing the rest of the site.

    I didnt understand how i could do it with iionly's plugin (i am relatively new to this).

    Say i would like to change the core files instead. How do i do that? (yes, i know i shouldnt do it) So far i have only found how to edit the code INSIDE of the loginbox. Not the entire page which includes the loginbox. I am using 1.8.2 and i can only find info of previous versions. (altering the code like those describe changes nothing for me).

    Lets say i want to add a jpg file which does the selling and have the loginbox stuff underneath, for simplicity.

    What code do i put in and where?

    Thanks

  • Have a look at the custom index plugin.  You should be able to see where the login box code comes from.  From there you can delete everything else that's not the login box and add in whatever you want.

     

    Say i would like to change the core files instead

    Don't.

    How do i do that?

    Don't.

     yes, i know i shouldnt do it

    So really... don't!

  • i tested the custom index plugin just to see if the code would work with no changes. its not really good with 1.8. it doesnt substitutes the login page, it just adds another one.

    cant i just use echo <img src="picture.jpg"/>    somewhere in the code? or do i have to use the elgg_view/page/whatever and turn the pic into a content in a view?

    or even better, can i use $body = elgg_view_layout('two_column', $asdf); and make one of the areas point to a .htm somehow?

  • Sorry maybe I misunderstood when I saw "default page" I thought you meant the home page with a login box.  Are you talking about the page that by default has *just* a login box found at <url>/register?

  • @Kapten: If I understand you correctly, you want two different index pages: one for logged-in users and one for logged-out users. The custom_index plugin in the default configuration offers just a simple example of how you can create an index page. The defined widgets are the same for logged-out/logged-in. Just the displayed content of the widgets will be different depending on Elgg's permission settings, i.e. logged-out users only see "public" content.

    To create a different index page when logged-out and logged-in respectively, you have several options: you can modify the custom_index plugin's index page to differ between logged-in and logged out visitors. Or you can create a separate plugin that's kind of a copy of the custom_index plugin that overrides the index page of the custom_index plugin for people not logged-in to your site.

    Or you could take my loginrequired plugin as a starting point (basically it also creates a separate index page for logged-out visitors as the second option above but adds the feature that people can't access content of your site when logged-out apart the front page and external pages). I think the reason you failed to include an image with the loginrequired plugin is that you tried to include an image that you have uploaded to your Elgg site (either in the file section or using tidypics). This image won't be displayed either because the Elgg access isn't "public" anyway - in this case you will fail to include it also when not using the loginrequired plugin - or because the access to this image page gets blocked by loginrequired.

    Best way is to copy the image file simply to some location on your server, for example the Elgg root folder. Let's assume you have named it "frontpage_image.jpg". To display this image using the loginrequired plugin simply use this modified version of the file mod/loginrequired/views/default/page/layouts/loginrequired_index.php:

    <?php
    /**
     * Loginrequired Login page layout
     *
     */

    $mod_params = array('class' => 'elgg-module-highlight');
    ?>

    <div class="loginrequired-index elgg-main elgg-grid clearfix">
        <div class="elgg-col elgg-col-1of2">
            <div class="elgg-inner pvm prl">
    <?php
    $top_box = $vars['login'];

    echo elgg_view_module('featured',  '', $top_box, $mod_params);

    echo elgg_view("index/lefthandside");
    ?>
            </div>
        </div>

            <div class="elgg-col elgg-col-1of2">
                    <div class="elgg-inner pvm">
    <?php
    // right column

    // a view for plugins to extend
    echo elgg_view("index/righthandside");

    $infobox = 'Text shown in right column widget.';
    $infobox .= '<img src="./frontpage_image.jpg" alt="Frontpage_Image">';

    echo elgg_view_module('featured',  elgg_echo("Title of right column widget"), $infobox, $mod_params);

    ?>

    <p><img src="./frontpage_image.jpg" alt="Frontpage_Image"></p>

                    </div>
            </div>
    </div>


    I have includes two examples how the image can be displayed: either embedded in a widget (you can add a title to this widget and also add some welcome text) or simply show the image in the right column.

  • l@iionly, I've done that. I was able to edit the page but the image I added won't display. Pls help me out. thanks

  • do you know how can I remove searchbox and footer from my login page using this plugin? you say iionly something about index.php and let only the external pages for non logged in users. How can I do this?

     

    Thanks a lot for any answer!!