Skip to:
Content
Pages
Categories
Search
Top
Bottom

Invite Anyone – invite by email too – please help test


  • Boone Gorges
    Keymaster

    @boonebgorges

    Hi everyone. I have updated my Invite Anyone plugin to allow invitation by email address. It seems pretty solid, but I would really like to have some other people test it before I make it the stable version.

    If you have a non-production site and you wouldn’t mind testing it out, please download the development trunk version at http://wordpress.org/extend/plugins/invite-anyone/download/. If you’re already running a version of Invite Anyone on your site, please make sure to deactivate it before downloading and activating this one. (Note too that you must deactivate and reactivate – if you just replace the files, the necessary db table won’t be created.)

    A brief rundown of the new functionality:

    – A new subnav item has been added to profile pages, called Send Invites

    – Under that item are two pages. The first, Invite New Members, allows you to enter up to five email addresses, a custom message, and select some of the groups you’re a member of.

    – The second page is Sent Invites, a list of invitations you’ve already sent.

    – When you send the invitation, an email goes to the invitee(s) with the custom message and a link to [your bp install]/register/accept-invitation/[email-address]

    – When the user clicks that link, he or she should see the normal register page, with a message above that says “You’ve been invited by [the name(s) of the user(s) who sent invitations]…”

    – When the user activates the new account, he or she will receive invitations to all invited groups, as well as friendship requests from all members who sent invitations.

    – There is also a new (and ugly!) link on the Group Send Invites page, which takes you to the Send Invites profile page and pre-selects the group you just came from.

    – There’s a pretty fair amount of email validation that happens. Try punching in some bad emails (banned on your WPMU install, poorly formed, etc) and see what happens. I should note that right now I’m using WPMU’s native email validation – I haven’t even tried loading it on a single-blog install of WP. I did use if ( function_exists ) so nothing should crash, but it’ll probably allow any old email on single WP.

    Phew – I think that’s it.

    In the future, things like number of allowed email addresses, the default message, etc will be under the control of the site admin. I’m also going to write some Javascript that does inline validation of form data. But for now I think the key functionality is in place.

    Please hammer away at it and leave any bugs/suggestions here.

Viewing 25 replies - 1 through 25 (of 174 total)

  • Anton
    Participant

    @antonrsaopencirclecoza

    Wrong link


    Boone Gorges
    Keymaster

    @boonebgorges

    What’s the wrong link?


    Anton
    Participant

    @antonrsaopencirclecoza

    Activated the plugin but the subnav items to “send invites” does not show.

    * I downloaded the wrong version (displays now)


    Boone Gorges
    Keymaster

    @boonebgorges

    You have the 0.4-bleeding version? There should be a link on your profile (just to the left of Settings). Try going directly to http://example.com/members/anton/invite-anyone


    Anton
    Participant

    @antonrsaopencirclecoza

    I’ve sent invites to 4 people and it sends out the invite but it doesn’t show after you have sent the invites to whom you have sent it to. It shows the heading “You have sent invitations to the following people.” and the headings but doesn’t show anyone.


    Boone Gorges
    Keymaster

    @boonebgorges

    Can you check your db to see if the table wp_bp_invite_anyone exists? Either the table’s not there, or it’s there but not getting written to.

    The table’s supposed to be created when you activate the plugin.


    Anton
    Participant

    @antonrsaopencirclecoza

    Get this error when clicking on the “send invites” main heading

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘bp_example_screen_one’ was given in…


    Anton
    Participant

    @antonrsaopencirclecoza

    This table doesn’t exist “wp_bp_invite_anyone”


    Boone Gorges
    Keymaster

    @boonebgorges

    1) Table problem was my stupid mistake. I forgot to merge the code completely.

    2) Warning message: another stupid mistake

    I just rolled another trunk version up that should fix both problems. Download it in about five or ten from the repo, or immediately from here https://plugins.svn.wordpress.org/invite-anyone/trunk/.

    thanks for your patience!


    Boone Gorges
    Keymaster

    @boonebgorges

    PS – don’t forget to deactivate and reactivate when you get the new version


    Hugo Ashmore
    Keymaster

    @hnla

    Great stuff!

    Installed ‘bleeding’ on live test site running BP 1.2.3 / WPMU 2.9.2

    Installed smoothly – previous version didn’t exist fresh install (production site has older version )

    Things noted:

    The group send invite that was part of the original plugin function allows to select from all members including members marked as spammers! (am logged in and working as admin)

    Having sent email invite from my account I’m returned to a ‘Sent invites’ (‘You have sent invitations to the following people.’) but there is no data available.

    No email has been received, but tested setting up new account and that hasn’t been emailed either so think this is a BP 1.2.3 issue as all was working earlier today *sigh*

    Looking pretty good though.


    Boone Gorges
    Keymaster

    @boonebgorges

    hnla – Would you mind checking to see whether the table wp_bp_invite_anyone exists in your database? The “sent invites” information comes from there.

    I didn’t know about the spammer issue!! I will have a look at it.


    Hugo Ashmore
    Keymaster

    @hnla

    Erm doesn’t appear to exist. Think, reading your posts just before my first that I downloaded at the same time roughly you were uploading so need to download your corrections which I’ll do in a minute and re try


    Anton
    Participant

    @antonrsaopencirclecoza

    Installed from the repo and the table is created now. It also show’s the “invites” that were sent so you were right about the table. I will try to test it thorough tonight and let you know on any other bugs/glitches. One question: Is this for WPMU or single WP?


    Hugo Ashmore
    Keymaster

    @hnla

    Also updated and it’s created the table now, and invites sent are shown.


    Hugo Ashmore
    Keymaster

    @hnla

    Sadly still no email received though. We have the original plugin working on 1.2.2.1 will this update function on that version as I have no intention of upgrading to 1.2.3 at this moment if there are these sorts of issues.


    Boone Gorges
    Keymaster

    @boonebgorges

    hnla – The plugin should work fine on 1.2.2.1. I tested it there briefly myself (though I developed it on BP trunk) and everything seemed to work OK.

    Sorry about the email problems :) I’m using the exact same code as BP core (wp_mail, to be specific), so if you’re experiencing more general BP mail problems, then it’s probably not this plugin’s fault.


    Hugo Ashmore
    Keymaster

    @hnla

    No didn’t think it was the plugins fault, and might roll back to 1.2.2.1 as issues like that make testing to the full outcome rather difficult :)


    Hugo Ashmore
    Keymaster

    @hnla

    :-) feeling reckless – I fancy uploading this to the production site. seems pretty stable and final to me?


    abcde666
    Participant

    @erich73

    as always:

    Boone for President !


    Anton
    Participant

    @antonrsaopencirclecoza

    One problem I noticed

    On the invite email that gets sent out this is the link, http://yourbpsite.com/register/accept-invitation/test%40test.com

    I’m now using a different register page to prevent spam. If I change $accept_link in invite-anyone/invite-anyone/by-email.php to reflect my register page, will it break the plugin?


    Hugo Ashmore
    Keymaster

    @hnla

    Having resolved emails issues-ish two things arise:

    Having received invite click on link to register

    /register/accept-invitation/me@example.com

    But am simply dropped into the main site url

    Would have thought it’s a per site configuration issue yet the test install I have has no custom modifications and is all out of the box – I haven’t looked further into this though and a reason may be apparent with a little investigating.

    The other minor concern I have is with the textarea allowing users to customise the email message sent. This presently allows markup, would it perhaps not be best to strip html characters from this submission?


    Hugo Ashmore
    Keymaster

    @hnla

    This just noted and can probably tackle with a little hacking, but will mention anyway for the record.

    Date stamp for sent invites does not look to WP for user preferred formatting instead displaying in the format that drives some of us nuts :-)

    month/day/year

    In the UK and elsewhere the preferred format for dates is day/month/year as that is clearly the better way :-)

    It’s minor point!


    Boone Gorges
    Keymaster

    @boonebgorges

    Anton and hnla – thank you so so much for your very helpful comments. (I take it that most of the big functionality is working properly, since these are relatively small issues – that’s good news!)

    Anton – Great point. I had originally not hardcoded the register link, but then had to hardcode it for some testing purposes and forgot to change it back. The latest trunk version creates the accept_link with site_url( BP_REGISTER_SLUG ), which is the same code used in BP core. Please let me know if it works for you.

    hnla – Very sorry about my American date formatting :) I have changed it so that the format matches the setting in Dashboard > Settings > General. As for markup in the welcome message: I didn’t manually strip tags because I’m using $wpdb->prepare to write to the database, which means that all tags are escaped and therefore presumably not harmful. But I thought about it, and I think you’re right that it’s a good idea not to allow HTML in that box – it tends not to work well in email. The latest trunk version strips tags before sending the email/saving it to the db.

    Finally, hnla, I’m guessing that your problem with /register/ redirects may have had something to do with one of the following:

    – Anton’s problem (/register/ was hard coded into the accept_link)

    – You are clicking on the link while logged in. BP redirects from the register page for logged in users. Log out, or try another browser.

    – You’ve disabled registrations. In WPMU, look at Site Admin > Options; in WP I think it’s Settings > General > Anyone can register.

    Thanks again for your help. I should be able to put a stable tag on it in the next day or so thanks to your feedback.


    Hugo Ashmore
    Keymaster

    @hnla

    Ah yes the reason was that I was logged in, logged out and tried the email link and all correct..

    Hmm html is not apparently escaped or at least if it is that doesn’t prevent links being pasted in the form

    http://example.com

    It’s a minor point though but just think that it’s probably safer to ensure that just text string can be entered although that’s all a link is strictly speaking.

    One error stumbled on – very possibly irrelevant as it hasn’t manifested on live test site – is that playing around on local dev site when I tried to send an invite I received an undefined function error which I thought odd and don’t think I noticed yesterday.

    by-email.php is calling function invite_anyone_record_invitation() – function lives in db.php and db.php is being required() into by-email.php and correctly as far as I can determine, yet php keeps returning function undefined on invite_anyone_record_invitation() as though it were trying to run the function before it were included or it’s gone out of scope somehow. Checking the table shows no entries but then it wouldn’t if the function isn’t run. this is just fyi in case it suggests anything possibly problematical.

    Yes all in all it does feel very stable with most of the issues not really to do with correct functionality (Most have been user error :) )but operational refinement.

Viewing 25 replies - 1 through 25 (of 174 total)
  • The topic ‘Invite Anyone – invite by email too – please help test’ is closed to new replies.
Skip to toolbar