Cumulative likes on posts

alt=
@tunefeed
6 years ago
22 posts
I'd like for the posts on my site to accumulate likes, comments, ratings in a cumulative manner.
So if someone shares a my post that already has 3 likes, 2 comments, 1 rating the feedback will follow the original post instead of create a new post.
Anyone know how I can do this?
updated by @tunefeed: 05/22/18 03:38:49AM
nate
@nate
6 years ago
911 posts
The feedback template is already hairy enough. Be careful.
paul
@paul
6 years ago
4,325 posts
You might be able to adjust the template showing the shared item so that any likes and ratings of it are attributable to the original item and not the 'share', but as Nate said, its getting a hairy doing that and might confuse your users ("Hey, I've just liked this but its not showing???").
Maybe somehow just share a link to the original item?


--
Paul Asher - JR Developer and System Import Specialist
alt=
@tunefeed
6 years ago
22 posts
if the original item shows up and a users are always liking the original item wouldnt it always show up?
it creates a new post for every share. Its just a matter of reposting the original item on someone else's timeline upon when shared instead of creating a new post for the other user. What template would be adjusted to work on this?
alt=
@tunefeed
6 years ago
22 posts
what is the variable for the original item? I could try to work on it but just need a little more info.
alt=
@tunefeed
6 years ago
22 posts
Well this is what shares things in the feedback.tpl

Im just wanting to keep the original item's feedback and not create new posts with all new feedback lists. If the item gets shared and then liked, the likes dont appear on the original item at this point. I feel like what i'm trying to do should be the simpler way to do it as it doesnt create a new post, new likes, new ratings, new share count.

{if isset($disable_share)}

{jrCore_lang module="jrAction" id=35 default="You have Shared this with your Followers" assign="title"}
{jrCore_image image="share_disabled.png" width=24 height=24 class="like_button_img" alt=$title title=$title}
{$item.action_original_data.action_share_count|jrCore_number_format}

{elseif !isset($item.action_shared)}
{$share_id = $item_id}
{$share_module = $module}
{if isset($item.action_original_item_id) && is_numeric($item.action_original_item_id)}
{$share_id = $item.action_original_item_id}
{$share_module = $item.action_original_module}
{/if}
{if $share_module == 'jrComment' && is_array($item.action_original_data)}
{$share_module = $item.action_original_data.comment_module}
{$share_id = $item.action_original_data.comment_item_id}
{/if}

{if jrUser_is_logged_in()}

{else}

{/if}
{jrCore_lang module="jrAction" id=34 default="Share This with your Followers" assign="title"}
{jrCore_image image="share.png" width="24" height="24" class="like_button_img" alt=$title title=$title}
{$item.action_data.action_share_count|jrCore_number_format}

{/if}
paul
@paul
6 years ago
4,325 posts
Start by putting a {debug} in your template to see what variables you have - https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/1477/debug


--
Paul Asher - JR Developer and System Import Specialist

Tags