Custom Index / Dashboard

Hello

 

thx to kshelton360 for sharin his code :-)

 

i modified it a little, but i have some issues

Contetnt of content.php (of the customIndex mod)

<?php
    $form_body = "<p><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('input/submit', array('value' => elgg_echo('login'))) . "</p>";
    $form_body .= "<p>";
    $form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}account/register.php\">" . elgg_echo('register') . "</a> | " : "";
    $form_body .= "<a href=\"{$vars['url']}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>"; ?>
 

<table width="915" border="0" cellspacing="5" cellpadding="5">
    <tr>
    <td width="215">
    <div id="login-box">
    <h2><?php echo elgg_echo('login'); ?></h2>
    <?php echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/login")); ?>
    </div>

<div id="newest-members">
    <h3><?php echo elgg_echo('groups'); ?></h3>
    <?php $users = get_entities('user', '', 0, '', 20, 0, false, 0, null);
    if($users){
        foreach($users as $user){
            echo "<div class=\"member_icon\">" . elgg_view("profile/icon",array('entity' => $user, 'size' => 'small')) . "</div>";
        }
    }
    ?>
<div id="latest-groups">
    <h3><?php echo elgg_echo('groups'); ?></h3>
    <?php $groups = get_entities('group', '', 0, '', 10, 0, false, 0, null);
    if($groups){
        foreach($groups as $group){
            echo "<div class=\"member_icon\">" . elgg_view("profile/icon",array('entity' => $group, 'size' => 'small')) . "</div>";
        }
    }
    ?>
</td>

<td width="800">
    <div id="message">
    <div id="nupelogo"><img src="THIS IS WHERE YOU PLACE YOUR LINK TO IMAGE FILE"/></div>
    <p align="justify">
    Es ist Sommer, die Temperaturen sind erträglich und in Meißendorf, der Dropzone des
    Fallschirmsportvereins Hannover wird ein Wasserlandungsseminar angeboten. Flugs
    angemeldet und schon stehe ich Samstag um 9 Uhr in Meido. Kalte 12 Grad, wie sollte
    es auch anders sein wenn ein Warmduscher wie ich im Wasser landen will.
    Theorieunterricht mit den Besonderheiten einer Wasserlandung, Einweisung in die
    gestellten Systeme , kein Cypres und kein Höhenmesser.
    </div>



<div id="latest-activity">
    <h3><?php echo elgg_echo('groups:latestdiscussion'); ?></h3>
    <?php set_context('search');
    $content = list_registered_entities(0,8,true,false,array('object','group'));
    $content = elgg_view_layout('', '', $title . $content);
    echo $content;?>
    </div>
<p>

<div id="latest_discussion_widget">
<h3><?php echo elgg_echo('groups:latestdiscussion'); ?></h3>
<?php
        $forum = get_entities_from_annotations("object", "groupforumtopic", "group_topic_post", "", 0, $vars['entity']->guid, 8, 0, "asc", false);
        if($forum){
        foreach($forum as $f){
          
                $count_annotations = $f->countAnnotations("group_topic_post");
                
                echo "<div class=\"forum_latest\">";
                echo "<div class=\"topic_owner_icon\">" . elgg_view('profile/icon',array('entity' => $f->getOwnerEntity(), 'size' => 'small')) . "</div>";
                echo "<div class=\"topic_title\"><p><a href=\"{$vars['url']}mod/groups/topicposts.php?topic={$f->guid}&group_guid={$vars['entity']->guid}\">" . $f->title . "</a></p> <p class=\"topic_replies\"><small>".elgg_echo('group:replies').": " . $count_annotations . "</small></p></div>";
                   
                echo "</div>";
               
        }
    }else{
       
        echo elgg_echo("grouptopic:notcreated");
    }
?>
<br class="clearfloat" />
</div>


</div>
</td>
</tr>
</table>
</body>
</html>

 

i tried to get the things a bit more sorted but i am stuck.  the titels of the sections are static except the one from the latest discussion, i wasn´t able to find the elgg names to get it done dynamic.

 

also a tagcloud below the logon part with the tags of all users would be raet but i don´t get it done with the example posted somewhere in here. and i do not get the right stuff tu use full width. the sizes called in the code are not going to be used :-(

 

heres the example: http://meet.divexit.de/

 

i need you :-)

  • i changed the code a little bit now it looks good but still not perfekt

    <?php
        $form_body = "<p><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('input/submit', array('value' => elgg_echo('login'))) . "</p>";
        $form_body .= "<p>";
        $form_body .= (!isset($CONFIG->disable_registration) || !($CONFIG->disable_registration)) ? "<a href=\"{$vars['url']}account/register.php\">" . elgg_echo('register') . "</a> | " : "";
        $form_body .= "<a href=\"{$vars['url']}account/forgotten_password.php\">" . elgg_echo('user:password:lost') . "</a></p>"; ?>
     
    <?php
        if (!isloggedin()) {
    ?>
    <table width="915" border="0" cellspacing="5" cellpadding="5">
        <tr>
        <td width="215">
        <div id="login-box">
        <h2><?php echo elgg_echo('login'); ?></h2>
        <?php echo elgg_view('input/form', array('body' => $form_body, 'action' => "{$vars['url']}action/login")); ?>
        </div>

    <?php
        } if (isloggedin()) {
    ?>
    <table width="915" border="0" cellspacing="5" cellpadding="5">
    <tr>
    <td width="215">
    <?php
        }
    ?>   
    <div id="newest-members">
        <h3><?php echo elgg_echo('user:latest'); ?></h3>
        <?php $users = get_entities('user', '', 0, '', 25, 0, false, 0, null);
        if($users){
            foreach($users as $user){
                echo "<div class=\"member_icon\">" . elgg_view("profile/icon",array('entity' => $user, 'size' => 'small')) . "</div>";
            }
        }
        ?>
        <br>
        <br>
        <br>
    <div id="latest-groups">
        <h3><?php echo elgg_echo('groups:latest'); ?></h3>
        <?php $groups = get_entities('group', '', 0, '', 10, 0, false, 0, null);
        if($groups){
            foreach($groups as $group){
                echo "<div class=\"member_icon\">" . elgg_view("profile/icon",array('entity' => $group, 'size' => 'small')) . "</div>";
            }
        }
        ?>
    </td>

    <td width="800">
        <div id="message">
        <div id="nupelogo"><img src="THIS IS WHERE YOU PLACE YOUR LINK TO IMAGE FILE"/></div>
        <p align="justify">
        <br>
        Es ist Sommer, die Temperaturen sind erträglich und in Meißendorf, der Dropzone des
        Fallschirmsportvereins Hannover wird ein Wasserlandungsseminar angeboten. Flugs
        angemeldet und schon stehe ich Samstag um 9 Uhr in Meido. Kalte 12 Grad, wie sollte
        es auch anders sein wenn ein Warmduscher wie ich im Wasser landen will.
        Theorieunterricht mit den Besonderheiten einer Wasserlandung, Einweisung in die
        gestellten Systeme , kein Cypres und kein Höhenmesser.
        </div>



    <div id="latest-activity">
        <h3><?php echo elgg_echo('elgg:latest'); ?></h3>
        <?php set_context('search');
        $content = list_registered_entities(0,8,true,false,array('object','group'));
        $content = elgg_view_layout('', '', $title . $content);
        echo $content;?>
        </div>
    <p>

    <div id="latest_discussion_widget">
    <h3><?php echo elgg_echo('groups:latestdiscussion'); ?></h3>
    <?php
            $forum = get_entities_from_annotations("object", "groupforumtopic", "group_topic_post", "", 0, $vars['entity']->guid, 8, 0, 0, false);
            if($forum){
            foreach($forum as $f){
              
                    $count_annotations = $f->countAnnotations("group_topic_post");
                    
                    echo "<div class=\"forum_latest\">";
                    echo "<div class=\"group_icon\">" . elgg_view('groups/icon',array('entity' => $f->getOwnerEntity(), 'size' => 'small')) . "</div>";
                    echo "<div class=\"topic_title\"><p><a href=\"{$vars['url']}mod/groups/topicposts.php?topic={$f->guid}&group_guid={$vars['entity']->guid}\">" . $f->title . "</a></p> <p class=\"topic_replies\"><small>".elgg_echo('group:replies').": " . $count_annotations . "</small></p></div>";
                       
                    echo "</div>";
                   
            }
        }else{
           
            echo elgg_echo("grouptopic:notcreated");
        }
    ?>
    <br class="clearfloat" />
    </div>


    </div>
    </td>
    </tr>
    </table>
    </body>
    </html>

  • looks good Steven!

    Hey do you know anything about the mail option in the comunity?

    My email icon is gone from the header section! I tried to directly go to the email page by typing in the URL and it redirects me to the main page.

    Did they take away email from the site?

     

  • Ro

    Why not create an actual mod?  I don't think this kind of customization is wise at all, though I certainly appreciate the efforts.

  • Ro,

    This is build upon the custom dashboard module which just gives a blank page. We are just trying to help folks with layout.

  • sorry i have no idea why the icon is gone. have you tried a different theme? i added various content.php to my pages. too bad that i am on vacation the next two weeks and i don´t know where the next internet connection will be :-) i ´d love to get the tables replaced.

     

  • has anyone an idea hot to remove the site numbers below the latest activity and discussion?

    image

  • Got a screenshot of what this does?

    Please do not use tables for layout.

  • I have been trying to get the elgg_topbar.php file included in my index just as his example does.... Can anyone give me a sample of code to include this please? I am using the vazco_mainpage mod right now for my index.

    Thanks in advance!

  • another example of what I am looking for here: http://yourcommunities.org/

    the top bar included as a file include, variable, or hardcoded?

  • Hello, for custom index on Elgg 1.5 and the wire on frontpage. I managed to add it but I would like to add on index a box for a wire post. I am trying to make a index like on twitter, so my user can from frontpage add wire post...

    Can someone help me with a solution?

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking