Skip to:
Content

Opened 8 years ago

Closed 8 years ago

#1364 closed task (fixed)

User Profiles

Reported by: johnjamesjacoby Owned by:
Milestone: 2.0 Priority: normal
Severity: normal Version:
Component: General - Administration Keywords: gcin
Cc:

Description

Existing bbPress (stand-alone) allows users to have profile pages, and edit their profiles via the front of the website. The bbPress plugin requires additional template files to handle this, as well as any custom functions that may be needed to extend it.

Much of this code can be reused from within the wp-admin as a starting off point.

Attachments (1)

1364.diff (770 bytes) - added by markmcwilliams 8 years ago.

Download all attachments as: .zip

Change History (18)

#1 @markmcwilliams
8 years ago

Are we looking at integrating the WordPress author pages into the profile pages, or the other way about, or going down seperate routes (just using the same data however?) As it stands ...

  • /author/ is the default in WP eg. /author/markmcwilliams/
  • /profile/ could replace author yes/no? eg. /profile/markmcwilliams/

If we went down the /forums/ (like /forums/profile/markmcwilliams/ now) root slug then would we need to keep both profiles seperate, one that listed all the posts made on the site, and one for the forum ... but I still say we should have 1 page only, that lists everything!

Easy enough to override the author.php file in TwentyTen, and have it replaced with a working copy for both WP/bbP in the Child Theme, so thats not a problem. Whats the best way to go about the profile?

Last edited 8 years ago by markmcwilliams (previous) (diff)

#2 follow-up: @johnjamesjacoby
8 years ago

Will start by replacing the author.php, and possibly iterate into something more later.

I don't like the idea of losing any WordPress functionality, or having 1 template show all forum topics and all blog posts without it being some kind of 'activity' type page.

Gautam has a good first pass at favorites as part of his Google Code In task that will use author.php.

#3 in reply to: ↑ 2 @markmcwilliams
8 years ago

Replying to johnjamesjacoby:

Will start by replacing the author.php, and possibly iterate into something more later.

I don't like the idea of losing any WordPress functionality, or having 1 template show all forum topics and all blog posts without it being some kind of 'activity' type page.

Gautam has a good first pass at favorites as part of his Google Code In task that will use author.php.

I did suspect we'd go down this route, I mean why not use the core WP functions, looking better after the last few changes you've made I must say, never really had a chance of getting round to playing with anything! As for the URL structure, I think we need to change from the /author/ to /profile/ in this instance, or even /user/ makes sense too?!

#4 @markmcwilliams
8 years ago

Few changes in place relating to the user profiles are [2663] and [2664] along with [2665] and [2660] from working on the user favorites code, a little profile template tweaking was made!

#5 follow-up: @johnjamesjacoby
8 years ago

I have it on good authority that GautamGupta is taking a stab at this as a task for Google Code-in. Stay tuned!

#6 in reply to: ↑ 5 @markmcwilliams
8 years ago

Well if that's the case, then I'll just dump a few more thoughts down in here, so I hope you're reading Gautam! :) Right, so where shall I begin? ...

  • The author.php file, why have we got it setup as a Page Template?

Should probably just revert that bit back to the text we had previous, along the lines of The template for showing Users Profile or something like that. I don't know if it was a mistake, but it doesn't work as a Page Template anyway, already tried it this morning!

  • Interesting use of profile-*.php and get_template_part(); for each section!

The only thing I see here, and while I like it's use, we're adding in more and more and more template files which might not appeal to people who want to develop themes for bbPress, if they're going to follow a standard?! -- Anyway, trivial!

  • We need to go down the /profile/markmcwilliams/ route!

So that'll involve changing the /author/ base somewhere in the plugin setup!

  • What's with the page-bbp_profile.php Page Template?

For starters it's not fully functioning as a proper Page Template, yes it might be a few errors, but for now it does the exact same as author.php, so I propose removing that too as author.php does it's job on /author/markmcwilliams/ fine.

All I can think about right now! :)

#7 follow-up: @GautamGupta
8 years ago

Sorry markmcwilliams, I read your comment after posting the patch. You're right about the Page Template part, I've posted the patch including that line, but that's a single line edit which jjj might do himself while committing it. And instead of page templates, I've used rewrite rules to get the /profile/ URLs working. You may checkout the patch here and it's explanation here. Thanks!

#8 @GautamGupta
8 years ago

And yeah, it was a lot fun writing the patch (alert: jjj) :P

#9 in reply to: ↑ 7 @markmcwilliams
8 years ago

Thanks for the links Gautam, shame the diff is just giving me a 500 Internal Server error every time I want to take a look, so I hope JJJ commits it pretty soon so I can have a little look! :)

I'll see fully what you mean by it all either if I get a look at it, or after its in the plugin, not much point in me trying to second-guess what you've done! :P But I will put it through a cracking test, it'll be interesting to see whats you've done with going for profile.php and removing author.php from here. I think this should maybe be looked at in WP itself, and alter this, I know Justin Tadlock would like it to be changed to user.php but thats for another debate!

#10 @johnjamesjacoby
8 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [2688]) First pass at user profiles and front-end user editing. Fixes #1364 props GautamGupta via Google Code-in. Split bbp-template.php into smaller files. Rename 'profile-' pages to 'user-'. (This is the Ultra Magnus of changesets.)

#11 @markmcwilliams
8 years ago

  • Priority changed from high to normal
  • Resolution fixed deleted
  • Status changed from closed to reopened

I'm reopening purely and simply because I think this requires a little more thought, or at least a bit more discussion. As it stands, we're going to have 2 seperate profiles (or whatever you want to call them) which goes against the integration thing which I'm understood was a main aim in creating the plugin?

We've got /author/markmcwilliams/ which happens to cover the blog posts and whatnot, then /user/markmcwilliams/ which I think should be /profile/ anyway as it goes with what the current version does. Then speaking about editing the users profile from the front-end, while it's great and whatnot, adding all those extras when you can do it from your own little admin area (which gets even better in WP 3.1 anyway!)

Anyway, can discussion continue? ... For the second/next pass!

#12 follow-up: @GautamGupta
8 years ago

Just to clarify, the /user/ slug is completely editable. Regarding profile editing, I think that it must be there at the front-end as all the forum (and novice) users won't be actually using the admin panel. And regarding having integrated profiles, I really don't have any objection to yours or jjj's point of view.

#13 in reply to: ↑ 12 @markmcwilliams
8 years ago

Don't get me wrong Gautam, the work you did was smashing!

Yes I know the /user/ slug can be altered and that, just like any other slug in the plugin, I think we need to figure out the best slugs to ship default with the plugin, and IMHO /profile/ is that which works well with any blog posts?!

I know what you mean with the profile editing, but I'm still unconvinced, but I'm not the main man making the decisions here! Would be grand to have some other users voice their opinion, would this be a good kind of time for a blog post JJJ? :)

@markmcwilliams
8 years ago

#14 @markmcwilliams
8 years ago

The attached patch above removed the Template Name: from user.php and user-edit.php because they're used firstly to show the User(s) Profile, and secondly don't work as Custom Page Templates, we've almost got too many of them I'd say!

#15 @johnjamesjacoby
8 years ago

I had a few thoughts about this yesterday while I was going through Gautam's patch.

I opted for 'user' as the default slug instead of 'profile' for a few reasons. The main one being that something like BuddyPress better represents a profile page than bbPress's does. Another being that you can filter the slug with relative ease. The third being that we should probably setup _options for the root slugs anyways, so they can be user configurable instead of requiring code.

Last edited 8 years ago by johnjamesjacoby (previous) (diff)

#16 @johnjamesjacoby
8 years ago

Options started in r2705.

Will cause a few extra hits to the DB until we finalize and serialize all of the bbPress options.

Last edited 8 years ago by johnjamesjacoby (previous) (diff)

#17 @johnjamesjacoby
8 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

I'm going to close this since this task is complete. Please reopen a new ticket for a specific request or issue if you'd like to continue discussion.

Note: See TracTickets for help on using tickets.