solved jrAction ranking help please.

iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
10 years ago
517 posts
So, I was looking at the timeline ranking on the profile_index of a user. What I'm trying to do is a jrAction listing of recent user actions (similar to the comments listing found on jrMediaPro index page).

I checked the documentation at http://www.jamroom.net/the-jamroom-network/documentation/modules/1579/jraction and it seems actions are must be linked to followers or following?
I dont want to discriminate if the viewer is following or not . I simply want to display "most recent site actions by all users". Basically a site recent activity feed. Is that possible? Is that bad practice?

Is there an example of that on any existing skins? I have Nova, Elastic, Projam and MediaPro and didn't find anything. If not, what would that listing code look like?

Thank you in advance!
Brian
updated by @ilovehousemusic: 04/07/14 05:21:35PM
brian
@brian
10 years ago
10,148 posts
Sure you can do that - just do a jrCore_list for the jrAction module - it works just like any other item that can be listed. It does have some special parameters that are supported to show following/followed, but you don't have to use those.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
paul
@paul
10 years ago
4,326 posts
Just do a straight jrCore_list on jrActions and it should be ok.
There is a parameter you can add to include followers but not having it should give you what you want.
Pa


--
Paul Asher - JR Developer and System Import Specialist
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
10 years ago
517 posts
Makes sense, I'll try that thanks!
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
10 years ago
517 posts
On the foreach, is it $item.action_module or $item.actions_module ?
paul
@paul
10 years ago
4,326 posts
Think its 'action'. Do a {debug} to be sure.


--
Paul Asher - JR Developer and System Import Specialist
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
10 years ago
517 posts
This is what I have on the side_home:

{* LATEST ACTIONS *}
{jrCore_list module="jrAction" order_by="_created desc" limit="10" template="side_actions.tpl" assign="SIDE_ACTIONS"}

and this is my side_actions.tpl
{if isset($_items)}
<div class="body_3 mb20">
    <div class="body_3_title">
        <div class="title_2">{jrCore_lang skin=$_conf.jrCore_active_skin id="78" default="Latest"} Actions</div>
    </div>
    <div style="max-height:450px;overflow:auto;">
        {foreach from=$_items item="item"}
            {jrCore_module_url module=$item.action_module assign="murl"}
            <div class="block">
                <div style="display:table">
                    <div style="display:table-row;">
                        <div style="display:table-cell;text-align:left;vertical-align:top;padding-left:5px;">
                            <div class="normal">
                                {$item.action_text|truncate:200:"...":false|strip_tags}
                            </div>
                        </div>
                    </div>
                </div>
                <hr>
            </div>
        {/foreach}
    </div>
</div>
{/if}

But not getting any results - Am I missing something? TIA!
paul
@paul
10 years ago
4,326 posts
Take a look at the actions item_list.tpl
There are three types of action and their 'text' is stored differently.
Its likely that the majority of your actions are in the {$item.action_data} variable.
hth
Pa


--
Paul Asher - JR Developer and System Import Specialist

updated by @paul: 02/28/14 01:39:19PM
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
10 years ago
517 posts
Ah let me dig through the Activity Stream module, templates, thanks!
paul
@paul
10 years ago
4,326 posts
Yeah - I've been working with activity streams recently and the different types confused the hell out of me at first ;-)


--
Paul Asher - JR Developer and System Import Specialist
iLoveHouseMusic
iLoveHouseMusic
@ilovehousemusic
10 years ago
517 posts
^^ Yeah this is exactly what I needed. Documentation saves the day again! :) You can close this out, thanks!

Tags