Lastest Activity Widget [Deleted]

Thanks this is awesome, just installed and works perfectly.


This will be great to try and increase engagement of my community.
 
It's a nice idea, but for sidebar use I feel like it should be simplified further and not include a preview of content, or offer this as an option.

eg.
X added the media item Y to Z.
Date at Time
----
X replied to the thread Y.
Date at Time
----
X posted the thread Y in Z.
Date at Time
 
@AnzahTools

Great little addon. Any chance of ajaxifying it and having it update without refresh (poll every 30 secs or something)?

There was a live activity widget for xf1 that worked really well but it's not coming to xf2.
 
Weird that there is not the same activities displayed when you are logged or not.
The latest activity is not displayed when i log-out...
 
No there is not hidden parts in my site.

The very latest activity is not displayed if i'm crawling my site as guest
If i answer to the thread corresponds to the latest activity the answer is correctly displayed even as i'm guest.
but the latest activity -1 is not displayed, sorry i have problem to explain that in english...

WIDGET as member
activity A
activity B
activity C
activity D

WIDGET as guest
activity B
activity C
activity D
activity E

If i answer to the thread corresponding to activity A, this happens

WIDGET as member
activity A answered
activity A
activity B
activity C

this is correct, the widget is displaying well the activities but as guest...

WIDGET as guest
activity A answered
activity B
activity C
activity D

Hope you understand...
 
I just checked and... Yes in Whats's New page the content is different if i'm logged or not...
It's weird because all nodes have the same permissions.
 
How are things coming along? I've had a look myself but couldn't quite get the desired result.
Here's some CSS that might help you out whilst waiting for an update

Remove the preview
Code:
.block[data-widget-definition="at_law_widget"] .contentRow-snippet {
    display: none;
}

And if required, resize the text and/or remove the prefix label
Code:
.block[data-widget-definition="at_law_widget"] .contentRow-title {
    font-size: 13px;
}

Code:
.block[data-widget-definition="at_law_widget"] .label {
    display: none;
}

I've modded mine a little to remove unwanted details

187970
 
Here's some CSS that might help you out whilst waiting for an update

Remove the preview
Code:
.block[data-widget-definition="at_law_widget"] .contentRow-snippet {
    display: none;
}

And if required, resize the text and/or remove the prefix label
Code:
.block[data-widget-definition="at_law_widget"] .contentRow-title {
    font-size: 13px;
}

Code:
.block[data-widget-definition="at_law_widget"] .label {
    display: none;
}

I've modded mine a little to remove unwanted details

View attachment 187970
Thank you so much for pointing me in the right direction Gemma. I tried to unnecessarily re-invent the wheel not thinking about css manipulation. :oops:

With a bit more tweaking, I've got it pretty spot on. I won't be using the "latest posts" widget, but used it to replicate the desired design for this..

188203


Code may not be good for all styles, was designed for Uniform.

at_law_widget
Code:
                            <div class="contentRow-figure">
                                <xf:avatar user="$item.User" size="s" defaultname="{$item.username}" />
                            </div>
                            <div class="contentRow-main">
                                {$item.render()|raw}
                            </div>

extra.less
Code:
.block[data-widget-definition="at_law_widget"] .contentRow-snippet { display: none; }
.block[data-widget-definition="at_law_widget"] .contentRow-figure--fixedMedium { display: none; }
.block[data-widget-definition="at_law_widget"] .contentRow-figure .avatar.avatar--s { width: 24px; height: 24px; }
.block[data-widget-definition="at_law_widget"] .listInline--block { display: none; }
.block[data-widget-definition="at_law_widget"] .p-body-sidebar .block-row { border: 0px; }
.block[data-widget-definition="at_law_widget"] .contentRow-title { font-size: 13px; margin-left: -6px; }
.block[data-widget-definition="at_law_widget"] .contentRow-title a { font-style: italic; }
.block[data-widget-definition="at_law_widget"] .contentRow-minor { margin-left: -6px; }
.block[data-widget-definition="at_law_widget"] .label { display: none; }
.block[data-widget-definition="at_law_widget"] .at_law_block { padding: 11px 0px; margin: -1px 0px; }
.block[data-widget-definition="at_law_widget"] .block-body.block-row { padding-top: 0px; padding-bottom: 0px; }
 
Last edited:
This is a very helpful widget! Thank you!

Question: is there an easy way to add a "view more" button at the bottom? The other widgets (Latest Posts, Latest Profile Posts, Latest Media, etc.) on our "What's New" page allow the user to click through to see more items beyond the number displayed in the widget. But that's missing from this widget.

EDIT: We added some code to the at_law_widget template. Right after these lines (24/25) :

Code:
</xf:foreach>
            </ul>

We added:

Code:
<div class="block-footer js-newsFeedLoadMore">
                <span class="block-footer-controls"><xf:button href="{{ link('whats-new/latest-activity', null, {'before_id': $oldestItemId}) }}"
                    rel="nofollow"
                    data-xf-click="inserter"
                    data-append=".js-newsFeedTarget"
                    data-replace=".js-newsFeedLoadMore">
                    {{ phrase('show_older_items') }}
                </xf:button></span>
</div>

That gave us an inline "load more", which is fine. But it's still functionally different from the other XF widgets, which show a "View More" button that clicks through to the relevant page with the full feed. (In this example, it would be to whats-new/latest-activity.)
 
Last edited:
Back
Top Bottom