Where are the elgg home page contains files?

Hello, I am new for elgg. I install elgg 1.7.4.

Where are the position of files which elgg home page contains in the elgg folder?

Such as css, js, toolbar, login panel, etc ?

Thanks.

  • Look at /wp-content/

  • Thanks for a quickly reply.

    Forgive my insensitivity


    Where is the /wp-content/ ?

  • There is no wp-content directory. It exists on Wordpress, not on Elgg.

     

    @yulichika:

    For the css:

    /views/default/css.php/ and /mod/custom_index/views/default/custom_index.css.php/

    If you have any template plugin, the css should reside inside:

    /mod/TEMPLATENAME/views/default/css.php/

     

    To edit the homepage elements:

    /mod/custom_index/views/default/canvas/layouts/new_index.php/

    In my opinion, you should create a new template plugin to make the changes, rather than editing the core plugins or other directories.

     

    ~Shouvik

  • Thanks Shouvik Mukherjee, by your seggestion, I will download a new template and modify it.

    And for more question, where is the login panel? If I add a custom page, and I want add the elgg's login panel and session it it. Do you have some good seggestion?

    Have a nice weekend.

  • sorry, just a lapsus between elgg and wordpress XD

  • emm...I see some theme has already made a login panal on the top of the page.

    I tried to separate it out of the theme. I'm now trouble in change a different path (from mod to the parent directory), I think elgg always depend on a start.php.

    I'm still agonizing. if someone can give me more advice, let me detours ... ... 

  • @yulichika If I get you the right way, you want to create a new loginpage, right? Well, that is possible. Create a new directory - /accounts/login.php/

    Then, put the following code:

    <?php
        require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
        if (!isloggedin()) {
            $body = elgg_view("account/forms/login", array('friend_guid' => $friend_guid, 'invitecode' => $invitecode));

            page_draw(elgg_echo('login'), elgg_view_layout("one_column", $body));
        } else {
            forward();
        }
     ?>

    The, go to your template and create a directory if it doesn't already has one: /mod/TEMPLATENAME/account/forms/login.php/

    Put the following code on it.

    <?php

    global $CONFIG;

    $form_body = "<p class=\"loginbox\"><label>" . elgg_echo('username') . "<br />" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea')) . "</label>";
    $form_body .= "<br />";
    $form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea')) . "</label><br />";

    $form_body .= elgg_view('login/extend');

    $form_body .= elgg_view('input/submit', array('value' => elgg_echo('login'))) . " <div id=\"persistent_login\"><label><input type=\"checkbox\" name=\"persistent\" value=\"true\" />".elgg_echo('user:persistent')."</label></div></p>";
    $form_body .= "<p class=\"loginbox\">";
    $form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}pg/register/\">" . elgg_echo('register') . "</a> | " : "";
    $form_body .= "<a href=\"{$vars['url']}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>";

    $login_url = $vars['url'];
    if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) {
        $login_url = str_replace("http", "https", $vars['url']);
    }
    ?>

    <div id="login-box">
    <h2><?php echo elgg_echo('login'); ?></h2>
        <?php
            echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$login_url}action/login"));
        ?>
    </div>
    <script type="text/javascript">
        $(document).ready(function() { $('input[name=username]').focus(); });
    </script>

     

    This should make a login form appear on http://URL.TLD/account/login.php/

     

  • Thanks a lot, this is a great code. this is what I mean.

    cheers, 

    Have a nice day :-}

  • Hi Shouvik Mukherjee. It works well if I add in to an elgg theme.

    But if I add to an empty page. use

    <? include("mod/themenames/account/forms/login.php"); ?>

    it does not work... ... is it lack of something?

     

  • @yulichika : elgg is not using an include function for page contents. Its using a view system for displaying contents.See the wiki : http://docs.elgg.org/wiki/Views

    To insert the login form, you need to add <?php echo elgg_view('account/forms/login'); ?>