completed Featured discussions

White Agency
White Agency
@white-agency
9 years ago
204 posts
On ning we have the ability to mark a forum post as 'Featured'.

This is similar to pinning a post but instead of pinning the post to the top of the forum category it displays it at the top of the forum index page as featured posts.

I've created a new tab in the skin where I can input the ID's of the posts I want to feature and I can list those out on the forum index page.

What I need to know is if I can pull out an individual post if I know it's ID and what the code would be.

Cheers

Dave
updated by @white-agency: 06/01/15 08:51:29AM
paul
@paul
9 years ago
4,326 posts
If you know the individual post IDs you want to feature you use a {jrCore_list} in a template to show those posts -

{jrCore_list module="jrForum" search="_item_id IN 1,2,3,4" template="my_custom_forum_post.tpl"}

would show posts with IDs 1,2,3&4 via the custom template.


--
Paul Asher - JR Developer and System Import Specialist
White Agency
White Agency
@white-agency
9 years ago
204 posts
Trying to get this work but I don't think it's returning any records. Always shows 'no posts found'

{jrCore_list module="jrForum" search="_item_id IN 92532" template="wafeatured_posts.tpl"}


//wafeatured_posts.tpl

{if isset($_items)}

{foreach $_items as $_itm}


{$_itm.forum_text|jrCore_format_string:$_itm.profile_quota_id}


{/foreach}

{else}
No posts found
{/if}
douglas
@douglas
9 years ago
2,790 posts
If 92532 is a single ID then you might try this:

{jrCore_list module="jrForum" search="_item_id = 92532" template="wafeatured_posts.tpl"}

If 92532 are multiple ID's, you'll want to separate the ID's with a comma:

{jrCore_list module="jrForum" search="_item_id IN 9,25,32" template="wafeatured_posts.tpl"}



--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
White Agency
White Agency
@white-agency
9 years ago
204 posts
Sorry that was my typo not changing IN to =

Same result though - no records found :(
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
White Agency:
On ning we have the ability to mark a forum post as 'Featured'.

This is similar to pinning a post but instead of pinning the post to the top of the forum category it displays it at the top of the forum index page as featured posts.

What I need to know is if I can pull out an individual post if I know it's ID and what the code would be.

Don't you mean featuring forum THREADS or DISCUSSIONS? I know we can feature those in Ning, but not 'feature' individual posts. Am I mistaken about that?


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
douglas
@douglas
9 years ago
2,790 posts
I just tried this on my test site with the Ningja skin and it works for me.


        {* FEATURED FORUM TEST *}

        <div class="row">
            <div class="col12 last">
                <div class="item blog-archive-header" style="margin: 13px 10px 10px 10px;">
                    <h2>Featured Froum Thread</h2>
                </div>
                <div class="item center" style="margin: 10px;padding-bottom: 10px;">
                    {capture name="forum_template2" assign="forum2_row"}
                        {literal}
                            {if isset($_items)}
                                {foreach from=$_items item="item"}
                                    <div class="left p5">
                                        <h3><a href="{$jamroom_url}/{$furl}/{$item.forum_cat_url}/{$item._item_id}/{$item.forum_title_url}#last">{$item.forum_title|truncate:30}</a></h3><br>
                                        <small><span class="bold">Posted:</span>&nbsp;{$item.forum_updated|jrCore_date_format:"%A %B %e %Y, %l:%M %p"}</small><br>
                                        <small><span class="bold">By:</span>&nbsp;<a href="{$jamroom_url}/{$item.forum_updated_profile_url}">@{$item.forum_updated_user_name}</a></small><br>
                                        <small>{$item.forum_text|jrCore_format_string:$item.profile_quota_id:null:nl2br}</small>
                                    </div>
                                {/foreach}
                            {/if}
                        {/literal}
                    {/capture}
                    {jrCore_list module="jrForum" limit="1" template=$forum2_row search="_item_id = 1"}
                </div>
            </div>
        </div>

        {* END FEATURED FORUM TEST *}

The only thing I can add is to make sure the ID your putting in, is an actual forum thread ID.

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
White Agency
White Agency
@white-agency
9 years ago
204 posts
Still struggling even with your code Douglas !!

Would be grateful if someone could have a look. I'm sure it's something simple !

I'll email the login details to the support email.

Cheers

Dave
douglas
@douglas
9 years ago
2,790 posts
I looked at your template modifications and the only thing I can come up with is that your wafeatured_posts.tpl file is probably in your skin directory, try moving it to your modules/jrForum/templates directory and see if that works for you.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
White Agency
White Agency
@white-agency
9 years ago
204 posts
Done that Douglas - no different
paul
@paul
9 years ago
4,326 posts
Hi Dave - Douglas's code is working for me !!

Do you want to send FTP logins and the URL that you want this working on so that we can check it out on your site?


--
Paul Asher - JR Developer and System Import Specialist
White Agency
White Agency
@white-agency
9 years ago
204 posts
Details sent.

Cheers

Dave
White Agency
White Agency
@white-agency
9 years ago
204 posts
Still struggling with this :(

This is last thing on my major to do list before we start on the 'nice to have' list and styling so eager to get sorted !
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Yes I too really need to have the ability to "Feature" a Forum Discussion/Thread, so that it appears in a "featured discussions" area at the top of the Forum Index page.
(obviously this should be an admin ability, not available to regular members though...otherwise everyone will be featuring all their own discussions!)
There should be a way to 'feature' and 'un-feature' an individual forum thread without having to go into a template and change code for each forum thread's ID.

I'll merely mention as well here: I'm sure I'm not alone in wanting the same ability to 'feature' other content types. For my site, the most important ones would be: members, YT videos, Groups, member photos, and forum discussions. We actually use this featuring a lot.

I'm sure this is all a pita to examine and deal with, but this 'feature' ability in ning really enables us site owners to steer our sites in the direction we want- emphasizing/rewarding certain subjects while de-emphasizing others.
FWIW I'm on Ningja skin.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Strumelia:
Yes I too really need to have the ability to "Feature" a Forum Discussion/Thread, so that it appears in a "featured discussions" area at the top of the Forum Index page.
(obviously this should be an admin ability, not available to regular members though...otherwise everyone will be featuring all their own discussions!)
There should be a way to 'feature' and 'un-feature' an individual forum thread without having to go into a template and change code for each forum thread's ID.

I'll merely mention as well here: I'm sure I'm not alone in wanting the same ability to 'feature' other content types. For my site, the most important ones would be: members, YT videos, Groups, member photos, and forum discussions. We actually use this featuring a lot.

I'm sure this is all a pita to examine and deal with, but this 'feature' ability in ning really enables us site owners to steer our sites in the direction we want- emphasizing/rewarding certain subjects while de-emphasizing others.
FWIW I'm on Ningja skin.


Is there anything on the horizon for us to be able to 'Feature' content on our sites, like at least be able to 'feature': Forum discussions...Groups...videos...members...
Such 5 or 6 featured items would appear in a 'featured' box at the top of each of their respective content type page, such as on: site.com/forum, site.com/group, site.com/profile etc. In ning we have this, which looks great and we can change up the featured ones whenever we like:
featured groups.jpg
featured groups.jpg  •  197KB




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

updated by @strumelia: 03/25/15 05:33:07PM
brian
@brian
9 years ago
10,148 posts
Strumelia:
Is there anything on the horizon for us to be able to 'Feature' content on our sites, like at least be able to 'feature': Forum discussions...Groups...videos...members...
Such 5 or 6 featured items would appear in a 'featured' box at the top of each of their respective content type page, such as on: site.com/forum, site.com/group, site.com/profile etc. In ning we have this, which looks great and we can change up the featured ones whenever we like:

This is already supported. Like almost everything in Jamroom it is customizable by you by editing the templates. So for example - if you wanted to feature "profiles" at the top of your profile index - i.e.

yoursite.com/profile

Then you would create a new template (if it does not already exist):

jrProfile_index.tpl

in your active skin directory. Copy the existing modules/jrProfile/index.tpl content into it and add a "feature" section at the top - i.e.

{jrCore_list module="jrProfile" profile_id="5,9,13,25" limit=4}

Add it to the HTML to suit your needs. "5,9,13,25" are the profile_id's for the profiles you want to feature. jrCore_list can be used to "feature" or do pretty much anything you want.

If you're wondering "when is Jamroom going to be updated so we can feature whatever we want without having to make any template changes" then you will want to use Site Builder when it comes out of beta - that's what it is being designed for. Once Site Builder is out of beta our recommendation will be:

- if you want 100% control over every tweak and change on your site - learn how to modify your site using templates
- if you want it to be "drag and drop" easy - use site builder.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 03/25/15 06:18:32PM
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Ok, I think I'm understanding this. (!)

Would that line of core code go right BETWEEN these two lines at the beginning of the template code?:
{jrCore_include template="header.tpl"}

<div class="block">

and then...
for featuring a forum discussions I'd do the same but insert "jrForum" instead and find the 'discussion' or 'forum' _id #s in the database browser using a search? Or maybe see the ID# of the discussion in it's browser URL? Tell me if i'm off base here.

Last question: when I do this, is there a title saying "Featured ___" or soemthing? Or does it just show a block of the titems with nothing labeling or explaining that they are 'featured'.?


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
brian
@brian
9 years ago
10,148 posts
Yep - after the header, and before that opening DIV - i.e.

<div class="container">
    <div class="row">
        <div class="col12 last">
        <h1>Featured Profiles</h1><br>
        {jrCore_list module="jrProfile" profile_id="1,2,3,4" limit=4}
        </div>
    </div>
</div>



--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
...and to find the ID# of a forum discssion...I look where?
I mean featuring a forum DISCUSSION...not an individual post or a forum category.

Yes I am getting this and will save it for use! :)




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

updated by @strumelia: 03/25/15 07:39:55PM
michael
@michael
9 years ago
7,714 posts
For a specific discussion, try the address bar of your browser. The id of this thread is:
https://www.jamroom.net/the-jamroom-network/forum/new_posts/26023/featured-discussions
....room.net/the-jamroom-network/forum/new_posts/26023/featured-discussions

most of the time the item_id for stuff can be found in the url. eg my profile pic:
https://www.jamroom.net/user/image/user_image/4/icon96

shows my user item_id is 4 ( I'm user #4 )
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
So for:
mysite.com/forums/forum/chord-melody-modern-style-playing-discussions/4410/song-accompaniment

I would just put in the code:
<h1>Featured Discussions</h1><br>
        {jrCore_list module="jrForum" discussion_id="4410,etc" limit=4orwhatever}
-would I use "discussion_id" as the prefix for the id number?
....or maybe item instead?: item_id="4410,..."


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

updated by @strumelia: 03/26/15 07:32:34AM
douglas
@douglas
9 years ago
2,790 posts
I think it needs to be _item_id not discussion_id... try this:

<h1>Featured Discussions</h1><br>
        {jrCore_list module="jrForum" search1="_item_id IN 4410,etc" limit=4orwhatever}

I've not tested this.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Douglas, What's the "IN" for? (sorry to be so dense!)


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
douglas
@douglas
9 years ago
2,790 posts
It checks to see if there is an _item_id IN the options given. ie. 4410,4411,4412 etc.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
Ok, I will save this thread and this code and I'll post later if I can't get it to work someplace.
Thank you all. :)


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
White Agency
White Agency
@white-agency
9 years ago
204 posts
Hi Strumelia,

Have you got this to work at all cos I've got no where with it !! :(

Cheers

Dave
Strumelia
Strumelia
@strumelia
9 years ago
3,603 posts
I'm sorry Dave, but this is one of the things I planned to get working AFTER my site goes live, since it's less critical on my list. I'm a bit swamped with trying to get going on getting my site live now- my real world day job is interfering way too much! :(
I might wind up following YOUR lead, please keep us posted if you get it going.


--
...just another satisfied Jamroom customer.
Migrated from Ning to Jamroom June 2015
douglas
@douglas
9 years ago
2,790 posts
White Agency:
Hi Strumelia,

Have you got this to work at all cos I've got no where with it !! :(

Cheers

Dave

Can you show us what you've got so far if anything?

Thanks! :)


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
White Agency
White Agency
@white-agency
9 years ago
204 posts
Currently got this code which only works as the item_id is a post that belongs to the owner of the forum. If I put in any other item_id then nothing is returned.

{jrCore_list module="jrForum" search1="_item_id IN 15624" template="wafeatured_posts.tpl"}

template:-

{if isset($_items)}

{foreach $_items as $_itm}


{$_itm.forum_text|jrCore_format_string:$_itm.profile_quota_id}


{/foreach}

{else}
No records found
{/if}


Cheers

Dave
douglas
@douglas
9 years ago
2,790 posts
White Agency:
Currently got this code which only works as the item_id is a post that belongs to the owner of the forum. If I put in any other item_id then nothing is returned.

{jrCore_list module="jrForum" search1="_item_id IN 15624" template="wafeatured_posts.tpl"}

template:-

{if isset($_items)}

{foreach $_items as $_itm}


{$_itm.forum_text|jrCore_format_string:$_itm.profile_quota_id}


{/foreach}

{else}
No records found
{/if}


Cheers

Dave

What template are you adding the jrCore_list function to?


--

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

updated by @douglas: 04/23/15 09:40:13AM
White Agency
White Agency
@white-agency
9 years ago
204 posts
It's in 'item_categories.tpl' in 'Profile Forum'
douglas
@douglas
9 years ago
2,790 posts
I just added this to that template and I'm not seeing an issue.

<div class="block">
    <div class="title">
        <h1>Featured</h1>
    </div>
    <div class="block_content">
        <div class="item">
            {capture name="featured_template" assign="feat_row"}
                {literal}
                    {if isset($_items)}
                        {foreach $_items as $_itm}
                            {$_itm.forum_text|jrCore_format_string:$_itm.profile_quota_id}
                        {/foreach}
                    {else}
                        No records found
                    {/if}
                {/literal}
            {/capture}
            {jrCore_list module="jrForum" search1="_item_id = 1" template=$feat_row}
        </div>
    </div>
</div>

If you are only going to show 1 featured post, change the search to an = instead of IN and make sure your are using the correct ID for the post.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
White Agency
White Agency
@white-agency
9 years ago
204 posts
No go I'm afraid :(

Only works if the post was made by the admin ie me. Any other post id it shows 'No records found'
douglas
@douglas
9 years ago
2,790 posts
Do you have a link to the page I can check out?


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
White Agency
White Agency
@white-agency
9 years ago
204 posts
I'll send the login details to the support email.

It's not for public viewing at the moment - client's not even seen it yet !!
White Agency
White Agency
@white-agency
9 years ago
204 posts
Details sent.
douglas
@douglas
9 years ago
2,790 posts
These two ID's do not exist.

147222,146372

How are you getting the post ID's?

If you go to the post you want to feature, you can look in your browser address bar and the number you see in the URL is the post ID.


--

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

updated by @douglas: 04/24/15 08:58:44AM
White Agency
White Agency
@white-agency
9 years ago
204 posts
Yep - that's how I got the ID's
douglas
@douglas
9 years ago
2,790 posts
I searched your forum database for those two ID's and the search came up empty. Can you send a link to those posts your wanting to feature?


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
White Agency
White Agency
@white-agency
9 years ago
204 posts
Just sent them to the support email.

It's home time here in the UK so may not reply till Monday.

Thanks for your help.
douglas
@douglas
9 years ago
2,790 posts
Okay, I'm seeing something odd here too, I'll get a ticket open on it and see what Brian says.


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
michael
@michael
9 years ago
7,714 posts
If you add skip_triggers=true your jrCore_list call will work.

{jrCore_list module="jrForum" search1="_item_id IN 147222" template=$feat_row skip_triggers=true}

The situation is that the user whos post your after doesn't have a forum of their own on their profile. The jrProfile module is trying to be helpful by adding a filter "If you haven't got that type of thing on your profile, then you can't make a list of it."

Its supposed to filter out cases where a profile has had something active on their profile, they have created it, then its been de-activated.

Example: quota 4 has jrAudio enabled, they add some audio files, admin then disables jrAudio for that quota. You don't want those audio files to come out in the list.

By adding skip_triggers=true your telling jrCore_list not to fire any events, so other modules cant tap into the Events and Listeners system in this case.

"Events and Listeners"
https://www.jamroom.net/the-jamroom-network/documentation/development/1011/events-and-listeners
White Agency
White Agency
@white-agency
9 years ago
204 posts
MAGIC !

Got that working now :)

Another item off the todo list.

Many Thanks

Tags