Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 10 years ago

Last modified 8 years ago

#1474 closed enhancement (fixed)

Make login dialog a widget

Reported by: jivany's profile jivany Owned by: boonebgorges's profile boonebgorges
Milestone: 1.9 Priority: minor
Severity: normal Version:
Component: Templates Keywords:
Cc: vpundir@…

Description

In the 1.2-bleeding bp-default theme, the login dialog at the top of the right column is static. Would it be possible to turn it into a widget instead?

Attachments (2)

1474.patch (5.8 KB) - added by boonebgorges 13 years ago.
1474.2.patch (5.9 KB) - added by modemlooper 12 years ago.
testing patches, never done this :D

Download all attachments as: .zip

Change History (24)

#1 @apeatling
14 years ago

The trouble is, it needs to always be there. Otherwise there isn't a theme based login anywhere else. I think if people really want to change this they can edit the sidebar.

#2 @DJPaul
14 years ago

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

#3 @r-a-y
14 years ago

  • Resolution wontfix deleted
  • Status changed from closed to reopened

Reopening another ticket... sorry DJPaul!

I think you can create a login widget and if the widget sidebar is empty, it will show the static login block by default.

A lot WP themes do this "if empty widget sidebar, show default blocks".

#4 @DJPaul
14 years ago

  • Milestone changed from 1.2 to 1.2.1

Again, 1.2 is in feature-freeze. If you're reopening stuff please be sure to assign future milestones.

#5 @r-a-y
14 years ago

Sorry about that, DJPaul.

#6 @boonebgorges
13 years ago

  • Component set to Core

Here's a very simple patch to make the login/logout box into a widget.

In order to maintain consistency with the way that the login currently looks, I wanted to get rid of the before_widget etc stuff. Instead of removing it in the markup (so that there'd be no way for a themer to style it) I wrote a filter that unsets those values before the widget is rendered. It's a little clumsy, but it seems like a fair compromise.

Feedback welcome.

@boonebgorges
13 years ago

#7 @r-a-y
13 years ago

I think removing the login form from the markup would be good.

I'd propose changing the code into a template tag and add a filter. Mostly thinking of BP Template Pack theme developers who'd want to hard-code a login widget to their sidebar.

The widget can then reference this template tag.

WP's default search widget does something similar to what I'm proposing with get_search_form():
http://codex.wordpress.org/Function_Reference/get_search_form

However, WP also adds a template file specifically for the search form. An extra template file could be overkill.

Thoughts?

---

Also widget name needs to be editable.

#8 @DJPaul
13 years ago

  • Component changed from Core to Theme

#9 @DJPaul
13 years ago

  • Milestone changed from 1.3 to 1.4

I wanted to replace all of the log in template with the wp_login_form() helper, but unfortunately that doesn't let me set the form's class, and there's nothing convenient nearby we can apply the standard-form class to. Maybe we can do this in BuddyPress 1.4.

I'm against putting a log in widget in core unless it is somehow BuddyPress-specific; there are plenty of log in widget plugins on the wordpress.org site.

#10 @DJPaul
12 years ago

  • Keywords changed from login, widget to login widget
  • Milestone changed from 1.6 to Future Release
  • Severity set to normal

#11 @boonebgorges
12 years ago

  • Keywords needs-patch needs-refresh added; login widget removed
  • Milestone changed from Future Release to 1.7

BP 1.7 is a good time to implement this, because we'll be going theme-independent. Easy props if someone can port our code to a widget. (My patch above might need refreshing.)

#12 @modemlooper
12 years ago

  • Owner set to modemlooper
  • Status changed from reopened to assigned

I'll do it :D

#13 follow-up: @modemlooper
12 years ago

Going through code, noticed there is no bp-members-widgets.php. There is a bp-groups-widget.php in /bp-groups with the groups widget code there.

Shouldn't the members widgets reside in /bp-members/bp-members-widgets.php? Also, what happened to the activity widget?

@modemlooper
12 years ago

testing patches, never done this :D

#14 @DJPaul
12 years ago

  • Keywords has-patch needs-testing added; needs-patch needs-refresh removed

#15 in reply to: ↑ 13 @DJPaul
12 years ago

Replying to modemlooper:

Also, what happened to the activity widget?

Huh. It looks like it was removed in 1.2-beta. Don't know why.

#16 @sooskriszta
11 years ago

  • Cc vpundir@… added

#17 @DJPaul
11 years ago

  • Keywords 1.8-early added
  • Milestone changed from 1.7 to Future Release

#18 @DJPaul
11 years ago

  • Keywords has-patch needs-testing 1.8-early removed
  • Milestone changed from Future Release to 1.8

Let's try to get to this for 1.8. The plan is to port bbPress' widget. Should be an easy-ish patch for someone.

#19 @boonebgorges
11 years ago

  • Milestone changed from 1.8 to Future Release

#20 @boonebgorges
10 years ago

  • Milestone changed from Future Release to 1.9
  • Owner changed from modemlooper to boonebgorges

Working on a patch for this.

#21 @boonebgorges
10 years ago

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

In 7450:

Introduce BuddyPress Login Widget

This sidebar widget shows a set of login fields to logged-out users, along with
a link to the Register page (if registration is enabled). Logged-in users will
see their avatar, a link to their profile, and a Log Out link (as in the old
bp-default sidebar). This is particularly important now that BP can be used
with any theme, even themes that do not have obvious login mechanisms on the
front end.

Borrowed in part from bbPress, and in part from the BuddyPress Default theme.

Props modemlooper for an initial patch.

Fixes #1474

#22 @DJPaul
8 years ago

  • Component changed from Appearance - Template Parts to Templates
Note: See TracTickets for help on using tickets.