You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create "recent posts" widget for user and group dashboards #93
One of the "courtyard" features I would like to see is a list of recent posts similar to what's on the current forum at the main forum index page. Here's a screen shot:
I'm envisioning that on the user home page/dashboard, the list includes post from all the groups/forums where the user is an active member. On the group dashboard, it would just be posts from that group. The same basic widget should work for both uses with just a settings change.
I'm thinking of doing this as a widget rather than just a function/template set because that will prepare us for an easier approach to later user customization.
I posted an ill-formed question on the bbPress support site and got a very helpful response. You can see it here.
I also did quite a bit of work after posting that question. I'm feeling confident that I can now move this forward pretty quickly.
I feel I've made major progress on this in the past few days, as illustrated in PR #94 .
The user home page (dev.bfcom.local) and the group home page (g-dash) now have widget areas and I've successfully converted the widgets.php file from the bbp style pack into a "recent posts" widget similar to what's illustrated above.
I've made those two pages responsive with an accordion layout for smaller screens. I've done it just with CSS by including the content twice, once for widescreen and once as an accordion, and use a media query to only display one at a time. There may be a more efficient way to do this with JS but this works for now.
Evolving the functionality and the styling for this pages should now be pretty straightforward.
I've uploaded the 11/22 master to bfn.context.org. To get your local instance to look the same, you will need to make some changes in the WP admin:
Go to Pages > Home Page – Front Page > Edit. Once on the edit page, look in the right column for Page Attributes > Template. Choose Home from the dropdown list and then click Update.
Go to Appearance > Widgets and add the following widgets:
In User Home Left Panel add (BuddyPress) Latest Activities. Defaults are OK.
In User Home Center Panel add (Style Pack) Latest Activity. Make the Title = Forum Posts ; Max topics = 20 (or whatever you like) ; check Show Freshness, Show topic author and Show Forum.
In User Home Right Panel add Recent Posts with the title = Blog Posts.
In Group Dash Left Panel add (BuddyPress) Latest Activities. Defaults are OK (same as above).
In Group Dash Right Panel add (Style Pack) Latest Activity. Settings same as above.
I'm a bit lost. When I edit the Home Page, I see a Page Attribute pane in the right column that has two dropdowns: Parent and Template, along with an entry field called Order. I don’t see ‘Home’ in either dropdown lists. Also, in Appearances > Widgets, I see the following panels: Wiki Top, Wiki Bottom Left, Wiki Bottom Right, Sidebar 1, Offcanvas, BuddyPress Member’s Home, BuddyPress Group’s Home but not the ones you list. Can you help?
That's weird. It should show up in the Template dropdown for the Home Page. The additional widget areas should also automatically load. I'll see what I can figure out. If you don't have it working by tomorrow's meeting, maybe we can do some debugging.
@rgilman, I was able to drop the widgets on the panels but not customize the fields. I see the customizable fields right before I drop the widget but those fields don't show up after I drop it, instead I see "?>". Should I call it good enough or do you want to look at it with me?
Activity
rgilman commentedon Nov 22, 2018
I feel I've made major progress on this in the past few days, as illustrated in PR #94 .
The user home page (dev.bfcom.local) and the group home page (g-dash) now have widget areas and I've successfully converted the widgets.php file from the bbp style pack into a "recent posts" widget similar to what's illustrated above.
I've made those two pages responsive with an accordion layout for smaller screens. I've done it just with CSS by including the content twice, once for widescreen and once as an accordion, and use a media query to only display one at a time. There may be a more efficient way to do this with JS but this works for now.
Evolving the functionality and the styling for this pages should now be pretty straightforward.
rgilman commentedon Nov 23, 2018
I've uploaded the 11/22 master to bfn.context.org. To get your local instance to look the same, you will need to make some changes in the WP admin:
Pages > Home Page – Front Page > Edit. Once on the edit page, look in the right column forPage Attributes > Template. ChooseHomefrom the dropdown list and then clickUpdate.iangilman commentedon Nov 28, 2018
@DavidScottBernstein @wunluv Please update your local versions as specified in the comment above and update here to let us know you've done it.
DavidScottBernstein commentedon Nov 28, 2018
I'm a bit lost. When I edit the Home Page, I see a Page Attribute pane in the right column that has two dropdowns: Parent and Template, along with an entry field called Order. I don’t see ‘Home’ in either dropdown lists. Also, in Appearances > Widgets, I see the following panels: Wiki Top, Wiki Bottom Left, Wiki Bottom Right, Sidebar 1, Offcanvas, BuddyPress Member’s Home, BuddyPress Group’s Home but not the ones you list. Can you help?
rgilman commentedon Nov 28, 2018
Have you pulled the new master into your local site yet?
DavidScottBernstein commentedon Nov 28, 2018
GitHub Desktop should pull in the latest when my current branch is Master and I click Fetch origin. It says I have the latest as of 2 minutes ago.
rgilman commentedon Nov 29, 2018
Hmm. Check to see that you have a file called home.php at the top level in the bfcom folder in themes.
DavidScottBernstein commentedon Nov 29, 2018
Yes, I have the file home.php at the top level in the bfcom folder in themes.
rgilman commentedon Nov 29, 2018
That's weird. It should show up in the Template dropdown for the Home Page. The additional widget areas should also automatically load. I'll see what I can figure out. If you don't have it working by tomorrow's meeting, maybe we can do some debugging.
DavidScottBernstein commentedon Nov 29, 2018
That sounds good. I'll try looking at it with fresh eyes tomorrow.
DavidScottBernstein commentedon Nov 29, 2018
@rgilman, I was able to drop the widgets on the panels but not customize the fields. I see the customizable fields right before I drop the widget but those fields don't show up after I drop it, instead I see "?>". Should I call it good enough or do you want to look at it with me?
rgilman commentedon Nov 29, 2018
I'm going to say, for now, let's wait until you are back after next week to look at this.
DavidScottBernstein commentedon Nov 29, 2018
DavidScottBernstein commentedon Nov 29, 2018
Done. After rebooting Wordpress the widget options showed up and I was able to set them.
iangilman commentedon Nov 30, 2018
I've now done this as well!