Like / Dislike on Timeline

PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
Hey Guys,

I have the Like It mod working on our timeline, but as @paul pointed out the like/dislike on "liked action items" does seem silly. So I need to determine the right way to identify the like it action items to create my {if} statement.

Would I use?: {if isset($item.like)} or {if isset($item.dislike)}

Also, how can I keep the dislikes from broadcasting? We would prefer to use dislikes as a flagging mechanism and only have moderators notified when something is disliked.

Thanks for the help :)


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3

updated by @the-patria-company: 05/18/16 12:25:59AM
paul
@paul
8 years ago
4,326 posts
Try this -
{if $item.action_module != 'jrLike'}
    {jrLike_button item=$item action="like" module="jrAction"}
    {if jrUser_is_admin()}
        {jrLike_button item=$item action="dislike" module="jrAction"}
    {/if}
{/if}
hth


--
Paul Asher - JR Developer and System Import Specialist

updated by @paul: 01/21/16 06:26:13PM
PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
Hey @paul :)

Looks like I am pushing the Like It module to its limits lol

I did use your idea and replaced the like/dislike buttons with a smiley when the timeline is showing a liked item. This is working out very well.
                            {if $item.action_module != 'jrLike'}
                            {jrLike_button item=$item action="like" module="jrAction"}
                            {jrLike_button item=$item action="dislike" module="jrAction"}                            
                            {else}
                            <img src="https://assemble-together.org/data/media/0/0/jrSmiley_2_smiley_image.png?_v=" width=24px />
                            {/if}

I have also changed the language for the dislike function to "flag this"; thus allowing our members to easily flag items that do not meet our kid safe standards.

#1. How can I keep the flagged items from posting to the activity stream? Since we don't want to draw attention to inappropriate material. (see screen shot, which is only a test)

#2. What is the simplest way to create a custom page that just shows flagged items?

Thanks :)


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3
PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
Anybody have any thoughts on question #1 or #2?


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3
Developer Networks
Developer Networks
@developer-networks
8 years ago
566 posts
PatriaCo:
Anybody have any thoughts on question #1 or #2?

For #1 & 2 you can use a jrCore_list function. narrow the list to only show the likes or display only dislikes... ect...


you can find the documentation on how jrCore_List works here:
https://www.jamroom.net/the-jamroom-network/documentation/development/89/jrcore-list
PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
Thank you @b360

Since there is no item_list.tpl for the the LikeIt module... I am going to need a little help here. Will this get me going in the right direction?

{jrCore_module_url module="jrLike" assign="murl"}
{foreach $_items as $item}
{/foreach}
{debug}



--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3
douglas
@douglas
8 years ago
2,790 posts
Try this:

{if isset $_items}
{jrCore_module_url module="jrLike" assign="murl"}
{foreach $_items as $item}
{/foreach}{debug}
{/if}



--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos

updated by @douglas: 02/17/16 08:29:21AM
PatriaCo
PatriaCo
@the-patria-company
8 years ago
349 posts
OK so I created an item_list.tpl in the jrLike templates dir with this:

{if isset $_items}
{jrCore_module_url module="jrLike" assign="murl"}
{foreach $_items as $item}
{/foreach}{debug}
{/if}

Then I used the sitebuilder and created a widget using the "template code" section, with this code:
{jrCore_list module="jrLike"}

I was hoping to see something output but I got this error.

CRI: Query Error: Table 'assembletogetherorg371.jr_jrlike_item_key' doesn't exist

Any thoughts?


--
The Patria Company - patriaco.com / quality-trades.com / a-t.life - doing Jamroom since v3

Tags