Project

General

Profile

Support #2184

Adjust Invite Directions to include info about max invites

Added by Matt Gold almost 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
BuddyPress (misc)
Target version:
Start date:
2012-10-12
Due date:
% Done:

0%

Estimated time:

Description

We recently changed the maximum number of invites to 20 (it used to be 7). However, there is no notation on the page that informs users of this maximum.

I suggest the following edits:

Current
Enter email addresses below, one per line. You can only invite people whose email addresses end in one of the following domains: *.cuny.edu cuny.tv

Suggested Revision
Enter email addresses below, one per line. You can only invite people whose email addresses end in one of the following domains: *.cuny.edu cuny.tv. You can invite a maximum of 20 people each time you send invites.


Related issues

Related to CUNY Academic Commons - Feature #2169: Increase Maximum Number of Invite Anyone InvitesResolved2012-10-02

History

#1 Updated by Boone Gorges almost 9 years ago

  • Assignee changed from Boone Gorges to Dominic Giglio
  • Dom, will you look at this? I'm pretty sure there's a template in bp-nelo for it (look at groups/single/invite-anyone.php - this is off the top of my head.

#2 Updated by Dominic Giglio almost 9 years ago

Boone,

You were correct in your assumption. The template was located at /groups/single/invite-anyone.php in bp-nelo. However, that template creates a link to the page that displays the text in question. Took me a little bit to find it, but that text is ultimately output by a function in the plugin itself, located at /invite-anyone/by-email/by-email.php.

Therefore the fix to this issue needs to be integrated into the plugin. I see on the plugin repo that you are the maintainer. Is there a git repo where you'd like to make these changes? They aren't very involved. I've created a topic branch and pushed it to our repo so you can see the edits I've made. You could even copy/paste and push an update pretty quickly, it's only a few lines.

Let me know how you'd like to proceed on this one.

#3 Updated by Boone Gorges almost 9 years ago

  • Assignee changed from Dominic Giglio to Boone Gorges

Thanks, Dom.

The way you've concatenated sentences in your commit will not work correctly in different languages. You'll need to use the sprintf() function, which does argument replacement. Something like this:

<?php echo sprintf( 'You can invite a maximum of %s people each time you send invites', 'bp-invite-anyone' ), invite_anyone_max_invites() ); ?>

That way, the translator can use whatever grammar they want.

The repo I use for this plugin is https://github.com/boonebgorges/invite-anyone. This is a small fix, so I'll go ahead and make the changes directly. Reassigning to myself.

#4 Updated by Dominic Giglio almost 9 years ago

Sorry, just saw this update because you reassigned to yourself.

I thought about sprintf() but I wasn't sure if it cooperated with the WP i18n functions so I left it out.

Are you sure you wrote the example above correctly? invite_anyone_max_invites() is not included inside the call to sprintf(). How does WP know it can swap out translations inside sptinf()?

Shouldn't it look more like this:

<?php echo sprintf( __( 'You can invite a maximum of %s people each time you send invites', 'bp-invite-anyone' ),  invite_anyone_max_invites() ); ?>

#5 Updated by Boone Gorges almost 9 years ago

Yes, your syntax is correct. It's hard to count parentheses in this textbox :)

#6 Updated by Dominic Giglio almost 9 years ago

We need some Redmine auto closing tags!!

#7 Updated by Dominic Giglio almost 9 years ago

Added a reminder to ACTION_REQUIRED to remove the invite-anyone topic branch from the repo after you've released 1.4.9 tomorrow.

#9 Updated by Matt Gold almost 9 years ago

Thanks, Boone.

Also available in: Atom PDF