solved Can we get an option to 'pin' Group discussions ?

Strumelia
Strumelia
@strumelia
6 years ago
3,602 posts
We have the little checkbox for pinning or making 'sticky' a Forum discussion. It sure would be nice to have the same option for Group discussions. Thanks for considering!


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015

updated by @strumelia: 04/02/19 01:43:12PM
paul
@paul
6 years ago
4,325 posts
Here's a way to do this -

1) Use the Form Designer to add a 'discuss_pinned' checkbox field to group discussion create and update forms. Make it only visible to profile admins.

2) Edit the jrGroup item_detail.tpl template. About line 98 find this code -
{jrCore_list module="jrGroupDiscuss" search="discuss_group_id = `$item._item_id`" order_by="_updated desc" limit=10 template=$dtpl _group=$item}
Change it to -
{jrCore_list module="jrGroupDiscuss" search1="discuss_group_id = `$item._item_id`" search2="discuss_pinned = on" order_by="_updated desc" limit=10 template=$dtpl _group=$item}
{jrCore_list module="jrGroupDiscuss" search1="discuss_group_id = `$item._item_id`" search2="discuss_pinned != on" order_by="_updated desc" limit=10 template=$dtpl _group=$item}

3) Optionally indicate that the discussion is pinned by editing the 'captured' template code in the same template. Change line 78 -
<a href="{$jamroom_url}/{$_params._group.profile_url}/{$durl}/{$item._item_id}/{$item.discuss_title_url}"><h3>{$item.discuss_title}</h3></a>
to
<a href="{$jamroom_url}/{$_params._group.profile_url}/{$durl}/{$item._item_id}/{$item.discuss_title_url}"><h3>{$item.discuss_title} {if $item.discuss_pinned == 'on'}[Pinned]{/if}</h3></a>
Or use the same conditional test to indicate pinned discussions by another means.

hth


--
Paul Asher - JR Developer and System Import Specialist
Strumelia
Strumelia
@strumelia
5 years ago
3,602 posts
Paul I did your steps 1 & 2 on both my sites and it works great, thank you ! :)

I tried out step 3 and that worked too, but I didn't like how it announced the pinned status of threads so obviously to all my members, so I removed that option again.

Yay, this is a good thing to have in place so Group discussions can have the same functions as Forum discussions.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015