ContextInstitute / bfcom

http://bfn.context.org
GNU General Public License v3.0
4 stars 1 forks source link

Create "recent posts" widget for user and group dashboards #93

Open rgilman opened 5 years ago

rgilman commented 5 years ago

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:

screen shot 2018-11-18 at 8 43 07 am

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.

rgilman commented 5 years ago

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 commented 5 years ago

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:

iangilman commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

Have you pulled the new master into your local site yet?

DavidScottBernstein commented 5 years ago

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 commented 5 years ago

Hmm. Check to see that you have a file called home.php at the top level in the bfcom folder in themes.

DavidScottBernstein commented 5 years ago

Yes, I have the file home.php at the top level in the bfcom folder in themes.

rgilman commented 5 years ago

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 commented 5 years ago

That sounds good. I'll try looking at it with fresh eyes tomorrow.

DavidScottBernstein commented 5 years ago

@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 commented 5 years ago

I'm going to say, for now, let's wait until you are back after next week to look at this.

DavidScottBernstein commented 5 years ago

After restarting Wordpress I see the options coming up. If I get stuck again I’ll wait until I’m back from my trip.

Thank you, David.

On Nov 29, 2018, at 11:47 AM, Robert Gilman notifications@github.com wrote:

I'm going to say, for now, let's wait until you are back after next week to look at this.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ContextInstitute/bfcom/issues/93#issuecomment-442968607, or mute the thread https://github.com/notifications/unsubscribe-auth/AGxlMvWoHqAjhXwig31-BZoI7sVHQNQrks5u0DnSgaJpZM4YoB2s.

David Scott Bernstein, David@ToBeAgile.com Developer/Speaker/Trainer/Coach. Principal consultant at To Be Agile http://tobeagile.com/. Author of Beyond Legacy Code: Nine Practices to Extend the Life (and Value) of Your Software http://beyondlegacycode.com/. Stay in touch: sign up for my newsletter https://tobeagile.com/signup/, follow me on Twitter: @ToBeAgile http://twitter.com/ToBeAgile.

DavidScottBernstein commented 5 years ago

Done. After rebooting Wordpress the widget options showed up and I was able to set them.

iangilman commented 5 years ago

I've now done this as well!