The MU forums have moved to WordPress.org

Invite System (42 posts)

  1. partypageusa
    Member
    Posted 18 years ago #

    I was wondering how I enable the invite system. I can see there are 2 different invites.php files. I trying using the one located in the wp-admin but I get the message
    "Invite Not Sent to ."
    Seems like it is not being written to the database. Another question is how do I make this file a link so I dont have to type the file name everytime I want to use it.

    Thanks

  2. justJ
    Inactive
    Posted 18 years ago #

    I saw that I had one invite to give on yesterday but I went to use it today and it's not there. This is for wordpress.com btw.

  3. donncha
    Key Master
    Posted 18 years ago #

    party - edit menu.php, I can't remember if I have it commented out by default.
    JustJ - can you fill in a feedback request on wp.com instead so I'll know who you are!

  4. partypageusa
    Member
    Posted 18 years ago #

    Thanks Donncha. It was commented out.

  5. redwolf
    Inactive
    Posted 18 years ago #

    I have uncommented out the invites section of menu.php. The Invites() option shows up under the "Manage" menu, but when I try to send one, I get the same error as partypageusa: "Invite Not Sent to ." Any suggestions?

  6. andrewbillits
    Member
    Posted 18 years ago #

    In the admin panel (under the main account), Goto "site admin", then click on "users". Now, edit whichever user you are trying to hand out invites from and put however many invites you want to give out in the "ivites left" field.

    Donncha, maybe the admin account should have like 100 invites by default or something.

  7. redwolf
    Inactive
    Posted 18 years ago #

    So, as admin, I would like for new blog registration to be by invite only. Is this a simple matter of not publicizing the link to wp-newblog.php? Is there a way I can assign myself some number of invites to give out myself?

    I'm pretty new to php, but I'm really good at following examples, feeling my way around, and being polite when asking for help :-)

  8. andrewbillits
    Member
    Posted 18 years ago #

    you can assign ivites to yourself the same way as anyother user.

  9. ozgreg
    Member
    Posted 18 years ago #

    I been looking at the invite system and will modify it to only allow wp-newblog.php to be run by a logged in WP user with level of at least 2 (Author) as I feel the system of creating a new blog is wide open right now..

  10. partypageusa
    Member
    Posted 18 years ago #

    When you have the invite system on, the wp-newblog.php will redirect to the home page. Well this is what I get when I enable the invite. As for the invites for the admin, the invites for them doesnt decrease.

    You also have to enable the invites.php in the mu-plugin folder. change the return; to //return;

    Think thats all you have to do.

  11. donncha
    Key Master
    Posted 18 years ago #

    You can now enable or disable the invites system from Site Admin->Invites with a simple checkbox :)

  12. partypageusa
    Member
    Posted 18 years ago #

    I dont see the Invite tabe in the Site Admin. The old version I was able to see this but the new nightly built it is not there there anymore.

  13. wugga
    Member
    Posted 18 years ago #

    donncha - which build is the checkbox available in? I have the 20050908 and haven't seen any updates since then on the nightly build page. I can't find the checkbox you are referrinf to.

    i have the invites working on my site but had to do some rearranging of the Rewrite rules to get the syste, to accept incoming invite replies.

  14. ozgreg
    Member
    Posted 18 years ago #

    I checked the code and cannot find it active as well. I did get the invites up and running although after I uncommented the plug in and the code in the menu..

  15. wugga
    Member
    Posted 18 years ago #

    ozgreg - did you have to change anything in your .htaccess to make it able to accept the invitee?

    I had to move this:

    RewriteRule ^invite/(.*)/? /wp-inst/wp-newblog.php?u=$1 [L]

    to the top of the file or a 404 was generated for the invitee. I haven't had time to see what rule was stepping on it in its original position.

  16. partypageusa
    Member
    Posted 18 years ago #

    I didnt change anything in the .htaccess for invitee to sign up. But this was using last weeks built.

  17. ozgreg
    Member
    Posted 18 years ago #

    Well I did have it working but I updated to the latest build now I cannot get invites to work at all :(

  18. ozgreg
    Member
    Posted 18 years ago #

    I meant to post before I also made a small change in mine, to automatically include the blog name in the invite maybe this could be reflected in core??

    Change invites.php line 67 to

    $_POST[ 'personalmessage' ] = "I've been using ".get_settings( 'blogname' )." and thought you might like to try it out. Here's an invitation to create an account.";

  19. ozgreg
    Member
    Posted 18 years ago #

    Ok I worked out what had changed My admin account had no invites so it was failing to correct this I changed
    invites.php Line 9
    if( $invites_left != false || is_site_admin() == true ) {

    as site admin has unlimited invites anyway.

    The lack of invites also highlighted a flaw in this code

    Line 63
    header( "Location: ".get_settings( "siteurl" )."/wp-admin/invites.php?result=notsent&to=" . urlencode( $email ) );

    $email will not be populated if( $invites_left != false thus you get a .

    Maybe this code should be reworked to better reflect the email was not set as the person has no invites left..

    Once I found the issue the invite did allow me to sign up without changing the .htaccess

  20. donncha
    Key Master
    Posted 18 years ago #

    Thanks Ozgreg. I made the same change to line 9, and rearanged the file a bit to check for the email before checking for invites!

  21. ozgreg
    Member
    Posted 18 years ago #

    My pleasure Donncha :-)

    Did you also see my code suggestion for the wording of the invites to remove the hardcoded wordpress.com to being the blogname of the person sending the email out..

    $_POST[ 'personalmessage' ] = "I've been using ".get_settings( 'blogname' )." and thought you might like to try it out. Here's an invitation to create an account.";

  22. donncha
    Key Master
    Posted 18 years ago #

    Got that too. I made it a little more flexible by printing $current_site->site_name if it's available. (see wp-settings.php for that object/var)

  23. ozgreg
    Member
    Posted 18 years ago #

    Ahh nice improvement!

  24. vCarey
    Member
    Posted 18 years ago #

    I got the invites working -- so coooool!

    Just a couple of things:

    1. When I invite someone I get this message at the bottom of the Manage/Invites page when sending two invites - separately of course:

    Already Invited
    WordPress database error: [Unknown column 'user_id' in 'where clause']
    SELECT user_login FROM wp_users WHERE user_id = '0'

    WordPress database error: [Unknown column 'user_id' in 'where clause']
    SELECT user_login FROM wp_users WHERE user_id = '0'

    and this when one has accepted the invite:
    Already Invited
    WordPress database error: [Unknown column 'user_id' in 'where clause']
    SELECT user_login FROM wp_users WHERE user_id = '0'

    WordPress database error: [Unknown column 'user_id' in 'where clause']
    SELECT user_login FROM wp_users WHERE user_id = '4'

    It seems there is a database error but I don't know a thing about mySQL databases. Can you please tell me what I need to do to fix this? (The invite page works great and the blog is created and works just fine.)

    2. I thought this was a great idea:

    $_POST[ 'personalmessage' ] = "I've been using ".get_settings( 'blogname' )." and thought you might like to try it out. Here's an invitation to create an account.";

    I was wondering if you knew how to turn that into a link to the blog?

    Thanks.

  25. TwisterMc
    Inactive
    Posted 18 years ago #

    I got the invite system to work by going to invite.php in the admin area. But, I'm using directories, not sub domains so my URL doesn't work.

    http://twisterhill.com/invite/9ab743164e2ea15f78a9daebf991

  26. donncha
    Key Master
    Posted 18 years ago #

    vCarey - I think you're probably using a very old version of WPMU, you need to keep it up to date, as there are bugfixes every day!

  27. vCarey
    Member
    Posted 18 years ago #

    Thanks Donncha. I had just upgraded and had came back to say that it worked now.

    Maybe I could still get the 'blogname' in the invite to show a link to the inviter's blog?

  28. partypageusa
    Member
    Posted 18 years ago #

    Anyone know how to get the Invite tab to show up in the Site Admin screen? I did another fresh install and I dont see this in the Site Admin screen.

  29. TwisterMc
    Inactive
    Posted 18 years ago #

    I don't see the admin tab either.

  30. partypageusa
    Member
    Posted 18 years ago #

    Anyone else here using the invite system? If so how did you get the Invite tab to show up in the Site Admin tab?

About this Topic

  • Started 18 years ago by partypageusa
  • Latest reply from vCarey