Facebook like river dashboard/模仿Facebook的river dashboard v0.41

Release Notes

THIS IS A EXPERIMENTAL PLUGIN,DO NOT INSTALL ON NON-TESTING SITE.

这是一个开发中的插件,请不要在非测试站点使用

==========================

Some little fix:

views/default/riverdashboard/css.php,line 15-18

.collapsable_box .item_body img{
    width:200px;
    height:150px;
}

replace them like this:

.item_body img{
    max-width:98%;
    height:auto;
    padding:2px;
    border-top:1px #AAA solid;
    border-right:2px #333 solid;
    border-bottom:2px #333 solid;
    border-left:1px #AAA solid;
}
/* IE6 */
.item_body img{   
    *width:expression(this.clientWidth > 601?"600px":"auto");
}
.collapsable_box .item_body img{   
    *width:expression(this.clientWidth > 201?"200px":"auto");
}

What'new in 0.40&0.30

  • Now can post a longtxt,include pic even video to the river!
  • Added compatity for elgg's default river view
  • Fixed some CSS for IE6.Fuck IE6!
  • Now u can use extra view for a river item.

==========================

If wants to show comments without click on the (x)comment,go to views/default/river/item/extra.php

delete line 33-37

if ($show_comment) {
        ?>
        <a href="" onclick="$('#river_item_comments-<?php echo $object->guid ?>').toggle();return false;"><?php echo sprintf(elgg_echo('river:item:toggle_comments'),count_annotations($object->guid,'','','generic_comment'));?></a>
        <?php
    } 

and change line 44,delete style="display:none".

==========================

Extra view useage:

echo elgg_view('river/item/extra',
                    array('performed_by' => $performed_by,
                        'object' => $object,
                        'body' => $body,
                        'show_comment' => TRUE,)
                    );

in some river item's view.Examples:

thewire/views/default/river/object/thewire/create.php

$performed_by = get_entity($vars['item']->subject_guid);
$object = get_entity($vars['item']->object_guid);

$body = '<div class="wire_post">';
$body .= '<span class="start_quote">"</span>';
$body .= "<span class=\"post_content\">{$object->description}</span>";
$body .= '<span class="end_quote">"</span>';
$body .= '</div>';
   
echo elgg_view('river/item/extra',
                 array('performed_by' => $performed_by,
                    'object' => $object,
                     'body' => $body,
                     'show_comment' => TRUE,)
                  );

blog/views/default/river/object/blog/create.php

<?php

    /**
     * @author Snow.Hellsing <snow.hellsing@firebloom.cc>
     * @copyright FireBloom Studio
     * @link http://firebloom.cc
     */

    $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
    $object = get_entity($vars['item']->object_guid);
    $url = $object->getURL();
   
    $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
    $summary .= elgg_echo("blog:river:create") . " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a>";
    $toggle = "<div><a onclick=\"$('#blog_details-{$object->guid}').toggle();return false;\" class=\"river_item_toggle_details\" href=\"\">".elgg_echo('toggle_details').'</a></div>';
    $details = "<div id=\"blog_details-{$object->guid}\" class=\"blog_post\" style=\"display:none\">";
    $details .= $object->description;
    $details .= '</div>';   

    echo elgg_view('river/item/extra',
                    array('performed_by'=>$performed_by,
                        'object'=>$object,
                        'body'=>$summary.$toggle.$details,
                        'show_comment'=>TRUE));
?>

tidypics/views/default/river/object/image/create.php

<?php
    /**
     * @author Snow.Hellsing <snow.hellsing@firebloom.cc>
     * @copyright FireBloom Studio
     * @link http://firebloom.cc
     */

    $performed_by = get_entity($vars['item']->subject_guid);
    $object = get_entity($vars['item']->object_guid);;
   
    $mime = $object->mimetype;
    $icon = "<a href=\"{$object->getURL()}\"><img src=\"{$vars['url']}mod/tidypics/thumbnail.php?file_guid={$object->guid}&size=tiny border=\"0\" alt=\"thumbnail\"/></a>";
   
    $summary .= elgg_echo("image:river:created");
    $toggle = "<div><a onclick=\"$('#image_details-{$object->guid}').toggle();return false;\" class=\"river_item_toggle_details\" href=\"\">".elgg_echo('toggle_details').'</a></div>';
    $details = "<div id=\"image_details-{$object->guid}\" class=\"image\" style=\"display:none\">";
    $details .= $icon;
    $details .= '</div>';

    echo elgg_view('river/item/extra',
                    array('performed_by'=>$performed_by,
                        'object'=>$object,
                        'body'=>$summary.$toggle.$details,
                        'show_comment'=>TRUE)
                    );
   
?>

==========================

A little modified to the riverdashboard and thewire.

  • Comment on a river item right on the riverdashboard.
  • List comments of a river item
  • Toggle the comment list and input form show/hide

0.3和0.4的修改

  • 现在可以往river里粘贴长文字、图片甚至视频
  • 兼容elgg默认的river格式,和大量的兼容性修改
  • 修改了已经发现的几个IE6bug

对riverdashboard和thewire的一些小修改

  • 在dashboard回复river中的一个条目
  • 显示一个条目的所有回复
  • 展开/折叠所有回复

Here comes the screenshot:

image

ImprovedRiverDashboard riverdashboard

ImprovedRiverDashboard widget

  • Really appreciate your time on this plugin! I'm excited to use the it, but the warning "This is a experimental..." makes me hesitate. Is the warning just sort of a "disclaimer" or should I be patient? My site only has 6 members, but I am actively marketing/using it. I am currently using an older version of this plugin and haven't noticed anything bad.

    Thanks again

  • I fixed every bug I've found.And added compatibility to the elgg's default river item views.So this plugin will generally work in most situation.

    Use the newest version plz,as newer version always fixed more bugs I've found.

  • Great work - and thanks again for the awesome plugin.

  • I just installed it -  really nice. Couple things:

    Top left corner. The user icon normally has a little arrow for a pulldown, the arrow is way over to the right.

    In the Recent Members block - mine is empty. Now, I did change the settings in my mods/custom index/index.php to this: $newest_members = get_entities_from_metadata('', '', 'user', '', 0, 40);
    icontime was taken out and just replaced with "   -would that effect the Recent Members in this plugin? I just wanted to show all recent members, not just the ones that upload an avatar.

    Site is islandgab.comimage

  • i installed this and have the new dashboard, but not the extended comments box nor the changes to the river items. Is there something extra to do in order to get those to appear?

     

    thanks.

  • @IslandGabSite the usermenu's problem cause by CSS,I'll fix tomorrow as I'm a little drunk now :P

    get_entities('user','',0,40) will get 40 newest members for u.

    @Brian Payst Only plugins that used the new 'river/item/extra' view could got the comment show.

  • answered my own question. I see you have the edit the views for the individual mods. Very nice addition. Thanks!

  • HI Snow,

    I tried get_entities('user','',0,40) but it's still not displaying recent members.

    I made the changes in this file: riverdashboard/views/default/riverdashboard/newestmembers.php
    Should I have done it somewhere else?

    Thanks

  • @IslandGabSite in riverdashboard/views/default/riverdashboard/newestmembers.php

    $newest_members = get_entities('user', '', 0,'', 18);

    Sorry for that misspell^^

  • change the last digit to 40 if u want to show the newest 40 members

  • Still not working - I tried part and all of the line. Here's what I'm currently using.

    <?php
    /**
    * Elgg thewire view page
    *
    * @package ElggTheWire
    * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
    * @author Curverider info@elgg.com
    * @copyright Curverider Ltd 2008-2009
    * @link http://elgg.com/
    *
    */
    $newest_members = get_entities('user', '', 0,'', 40);
    ?>
    <div class="sidebarBox">
    <h3><?php echo elgg_echo('sidebox:recent_members'); ?></h3>
    <div class="membersWrapper"><br />
    <?php
    foreach($newest_members as $mem){
    echo "<div class=\"recentMember\">" . elgg_view("profile/gallery-small",array('entity' => $mem)) . "</div>";
    }
    ?>
    <div class="clearfloat"></div>
    </div>
    </div>

    I disabled and enabled the plugin to refresh it too.
    Thanks.

  • is there a way to modify this, to get it as customindex  i´d like to have the river part in the left column

     

    thx

  • additional question, where is the river comment feature ?

  • @IslandGabSite  changing newestmembers.php to use this:

    $newest_members = get_entities('user', '', 0, '', 24, 0, false, 0, null);

    and then to display it:

               <?php 

                        //display member avatars

                            foreach($newest_members as $members){

                           echo "<div class=\"contentwrapper\">";

                             echo elgg_view("profile/icon",array('entity' => $members, 'size' => 'small'));

                           echo "</div>";

                        }

                ?>

    That should get you everyone, even if they do not have icons.
  • @Brian Payst - Thanks. It worked. The icons just stack up in one single column, but I think it's because of the CSS problem Snow is working on.

    Thxs.

  • There's is a small issue with posting on the message board this was fixed with the message board when user A posts on user B but shows user B in the activity feed in the river dashboard.

  • @IslandGabSite well,'profile/gallery-small' is a new view I added in my ImprovedProfile plugin,u may need to get that plugin and pick that view into your riverdashboard.

    @Chrislace check messageboard's river view.Or I may check it out later this month :)

    @steven Only plugins that used the new 'river/item/extra' view could got the comment show.Try post something from the textarea above river

  • Any news on the fix for the usericon arrow issue IslandGab reported above? I've been trying to fix it on my own with no success.

    Thanks,

    -David

  • @David Mercer I've fixed it.But I'm confusing with should I use river/item/extra view or not.So I'm not going to release a new version.

  • Snow, is there any way you could post/email a patch to 0.42 to fix that issue?  I really need to either fix it or just remove the arrow/dropdown on the icon completely, either one is fine for the customized elgg site I'm working on.

    thanks,

    -David

    david-elgg at objectdns dot com

  • @David I'll upload new version with only compatibility fix but no new feature soon.

  • Nothing is posting with this code for tidypics...

    <?php
        /**
         * @author Snow.Hellsing <snow.hellsing@firebloom.cc>
         * @copyright FireBloom Studio
         * @link http://firebloom.cc
         */

        $performed_by = get_entity($vars['item']->subject_guid);
        $object = get_entity($vars['item']->object_guid);;
       
        $mime = $object->mimetype;
        $icon = "<a href=\"{$object->getURL()}\"><img src=\"{$vars['url']}mod/tidypics/thumbnail.php?file_guid={$object->guid}&size=tiny border=\"0\" alt=\"thumbnail\"/></a>";
       
        $summary .= elgg_echo("image:river:created");
        $toggle = "<div><a onclick=\"$('#image_details-{$object->guid}').toggle();return false;\" class=\"river_item_toggle_details\" href=\"\">".elgg_echo('toggle_details').'</a></div>';
        $details = "<div id=\"image_details-{$object->guid}\" class=\"image\" style=\"display:none\">";
        $details .= $icon;
        $details .= '</div>';

        echo elgg_view('river/item/extra',
                        array('performed_by'=>$performed_by,
                            'object'=>$object,
                            'body'=>$summary.$toggle.$details,
                            'show_comment'=>TRUE)
                        );
       
    ?>

Snow.Hellsing

This cat has travelled far far away and dont know when will come back.I still remember my promises.Sorry,guys.

Stats

  • Category: Uncategorized
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 35146
  • Recommendations: 5

Other Projects

View Snow.Hellsing's plugins