Site Builder Widget behaviour - Forums, Photos and Timeline

Xephius
Xephius
@xephius
8 years ago
93 posts
I am having some trouble configuring my widgets in the Sitebuilder to display data as I would like. I have created several widgets and tried to set various display priority, but I can't get them to display as I think they should. I must be doing it wrong, can someone suggest the proper way to setup the following widgets:

1) "Hot Forum Topics"
A widget on the main page that will show logged in users what the latest or most active posts on the forum are. This is to prompt user awareness that Forum activity is going on, not to provide an access/editing point to the forums.

2) Community Paintings
Pulls from the Image Galleries
Shows the latest uploads

3) Community Timeline
I thought that we could create a community timeline that would list all the activities of the community on the main page, I can't find docs on how to set this up. Any advice here would be helpful.
updated by @xephius: 01/14/17 05:54:32AM
douglas
@douglas
8 years ago
2,793 posts
Hello,

1. You had some settings set for this that would cause it to not work, I've changed them for you so you may want to check it out. Mainly, you don't want to use a pagebreak if you are setting a limit, pagebreak and limit do not work together. There is an issue though with the default template for listing forum topics and we'll take a look at it.

2. Same as #1, you had a limit and pagebreak set, you also were not using an order_by parameter which is what you use to order your lists.

https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/89/jrcore-list

3. You would use the same setup as the forums widget only select the "Timeline" module instead of the "Forum" module.

https://www.jamroom.net/the-jamroom-network/documentation/site-builder
https://www.jamroom.net/the-jamroom-network/documentation/site-builder/2647/adding-a-new-widget

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Xephius
Xephius
@xephius
8 years ago
93 posts
Thanks for checking that out.

I went and looked at the settings, and tried to play around with them a bit. I am not understanding the behaviour I am seeing. I have set the Order by to both _updated and _created and neither give me the list forum updates as seen at:
https://theartsherpa.com/theartsherpacommunity/forum/new_posts
Attached are screen grabs of my configuration along with what I see on the landing page.
Thanks.
michael
@michael
8 years ago
7,746 posts
What you probably want is not _updated, but forum_updated:
{jrCore_list module="jrForum" order_by="forum_updated desc" limit="5"}

That appears to be the correct one here for me, it may be that I'm on newer code thats coming out with JR6 though, so not sure if it will give the same results for you.
Xephius
Xephius
@xephius
8 years ago
93 posts
Thanks.

I tried those settings and got a different, but not ideal result. I have attached screenshots of the settings, the list created by the widget on the main page, and the screenshot of the new_posts page. I hope I am not missing something obvious.
brian
@brian
8 years ago
10,148 posts
Creating a forum list is a little trickier, since you want to just get the TOPICS - not the individual followups. SO in your "search condition 1" field put:
forum_title_url contains _%
Let me know if that helps.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
Xephius
Xephius
@xephius
8 years ago
93 posts
Thanks, that did work. Is there a doc that explains what _% does and other variables I might use? (I am not a programmer, sorry if this is basics)
michael
@michael
8 years ago
7,746 posts
The docs are here:

Docs: "{jrCore_list}"
https://www.jamroom.net/the-jamroom-network/documentation/jamroom-developers-guide/89/jrcore-list

Its the "Search Wildcards" section that outlines the _ and the %.

In Site Builder when you use the "Item List" widget you will see the code for the {jrCore_list} that is created by your form choices so you can begin to understand what its doing.

With forums, only the initial post in a forum will have a forum_title_url , all the replies dont, so by asking for a
forum_title_url contains _%
thats asking for "an item that has a title that is longer than 1 letter"
Xephius
Xephius
@xephius
8 years ago
93 posts
Thanks, that makes perfect sense. I thought that is must be something like that, but I didn't understand the context. The docs are a huge help. Thanks.
Xephius
Xephius
@xephius
8 years ago
93 posts
I am working on another widget, this one to display the next calendar event. To do this, I think that I need to search for all events happening equal to or later than 'today's' date. I think I have it working, but need help knowing what call to get 'today's' date in the search field. Here is the Code snip generated. I put the ??????? where I need a string that will call today's date minus 1 I think. I am very open to other ways of solving this if you have a suggestion. :)

{jrCore_list module="jrEvent" search1="event_date > ???????" order_by="event_date asc" limit="1"}
michael
@michael
8 years ago
7,746 posts
Better to put questions like this in its own thread so someone searching might find the answer, perhaps:
"How to list upcoming events"

The answer is:
value="event_date >= `$smarty.now`"