WordPress.org

Plugin Directory

Changeset 613778


Ignore:
Timestamp:
10/17/12 20:45:41 (18 months ago)
Author:
Ipstenu
Message:

Checking in 1.1

Location:
join-my-multisite
Files:
1 deleted
6 edited
9 copied

Legend:

Unmodified
Added
Removed
  • join-my-multisite/tags/1.1/README.md

    r609291 r613778  
    1 join-my-multisite 
    2 ================= 
     1# Join My Multisite # 
    32 
    4 Join My Multisite 
     3Welcome to the GitHub development site for Join My Multisite. 
     4 
     5The version here is actually 1.1 right now, and it has a new addition: 
     6 
     7* Per Site Registration 
     8 
     9What? You thought it did that? It did, but now if you have network registration turned on, each site can chose to use 'Per Site Registration,' which will allow them to create a page on their site just for registrations and signups. To display the signup code, just put <code>[join-my-multisite]</code> on the page. 
     10 
     11Please test and let me know how it works! 
     12 
     13## README ## 
     14**Contributors:** Ipstenu   
     15**Tags:** multisite, wpmu, registration, users   
     16**Requires at least:** 3.4   
     17**Tested up to:** 3.5   
     18**Stable tag:** 1.0 
     19**Donate link:** https://www.wepay.com/donations/halfelf-wp   
     20 
     21Allow site admins to automatically add existing users to their site, or let users decide at the click a button. 
     22 
     23## Description ## 
     24 
     25When you want to add a user to every site on your network, you've got some pretty cool plugins for that as a network admin. But sometimes you want to let your site-managers have that control, and sometimes you want to make it optional. 
     26 
     27By activating this plugin, you give your Site Admins the following options: 
     28 
     29* Auto-add users 
     30* Have a 'Join This Site' button in a widget 
     31* Keep things exactly as they are 
     32 
     33It's really that simple!  
     34 
     35If they decide to auto-add, then any time a logged in user visits a site, they will be magically added to that site. If they decide to use a 'Join This Site' button, then they can customize the button message text for users who are logged in but not members, not logged in, or already members. Don't worry, if you have registation turned off, they won't see the 'register' button. 
     36 
     37In addition, if you have registration turned on, each site can chose to use 'Per Site Registration,' which will allow them to create a page on their site just for registrations and signups. To display the signup code, just put <code>[join-my-multisite]</code> on the page. 
     38 
     39* [Plugin Site](http://halfelf.org/plugins/join-my-multisite/) 
     40* [Donate](https://www.wepay.com/donations/halfelf-wp) 
     41 
     42##Changelog## 
     43 
     44### 1.1 ### 
     4512 October, 2012 by Ipstenu 
     46 
     47* Added in a per-site registration page option. 
     48* Corrected bug where non-network admins couldn't make changes 
     49 
     50###  1.0 ### 
     5107 October, 2012 by Ipstenu 
     52 
     53* First completed version. 
     54 
     55## Installation ## 
     56 
     57This plugin is only network activatable. Configuration is done per-site via a page in the 'Users' section. 
     58 
     59## Upgrade Notice ## 
     60 
     61None yet. 
     62 
     63## Frequently Asked Questions ## 
     64 
     65### What happens if the network doesn't allow registrations? ### 
     66 
     67If registration is turned off, the widget won't display anything for logged-out users. 
     68 
     69The <code>[join-my-multisite]</code> shortcode will display a notice that registration is unavailable. 
     70 
     71### How do I style the button? ### 
     72 
     73By default it will pick up whatever style your theme has, so if it styles buttons, you'll automatically match. If you want more, the css is `input#join-site.button` to just play with the button. 
     74 
     75### How do I style the per-site registration page? ### 
     76 
     77In your theme's CSS. This is basically the default WordPress signup page, just done in short-code form, so it will default to use your site's CSS anyway. The css falls under `.mu_register` so you can override it in your theme. 
     78 
     79### Can users sign up for a blog as well as an account? ### 
     80 
     81No.  
     82 
     83That's such a massive network thing, the tinfoil hat in me didn't want to do it. You could fiddle with the signup page code, if you wanted, but I don't plan to support it. 
  • join-my-multisite/tags/1.1/admin/help.php

    r611707 r613778  
    4343    $screen->set_help_sidebar( 
    4444        '<h4>' . __('Links:', 'jmm') .'</h4>' . 
    45          
     45        '<p><a href="http://wordpress.org/support/plugin/join-my-multisite">' . __('Support', 'jmm' ) . '</a></p>' . 
    4646        '<p><a href="http://codex.wordpress.org/Roles_and_Capabilities">' . __('WordPress Roles & Capabilities', 'jmm' ) . '</a></p>' . 
    4747        '<p><a href="http://wordpress.org/extend/plugins/multisite-user-management/">' . __('Plugin: Multisite User Management', 'jmm' ) . '</a></p>' 
     
    5959              <li><strong>'. __('None: ', 'helfjmm') . '</strong>' . __('Don\'t allow new users to add themselves this site, add them manually.', 'helfjmm') . '</li> 
    6060        </ul>' . 
    61         '<p>' . __( 'If don\'t want anything to change, then you can leave this plugin alone (i.e. on "None").', 'helfjmm' ) . '</p>'  
     61        '<p>' . __( 'If don\'t want anything to change, then you can leave this plugin alone (i.e. on "None").', 'helfjmm' ) . '</p>' . 
     62        '<p>' . __( 'Regardless of membership options, you can still use the Per Site Registration.', 'helfjmm' ) . '</p>'  
    6263        )); 
    6364         
     
    7475    $screen->add_help_tab( array( 
    7576        'id'      => 'jmm-menu-shortcode-options', 
    76         'title'   => __('Shortcode', 'helfjmm'), 
     77        'title'   => __('Per Site Registration', 'helfjmm'), 
    7778        'content' => 
    78         '<h3>' . __('Shortcode Options', 'helfjmm') .'</h3>' . 
    79         '<p>' . __( 'Check the box to turn allow for per-site registration. This will only be an option if your network has enabled registration. You then select a page from the drop-down list of pages, and on the page use the following shortcode to display your registration form.', 'helfjmm' ) . '</p>'  . 
    80         '<code>[join-my-multisite]</code>' 
     79        '<p><em>' . __('This feature is only available if your network admin has allowed regisgrations.', 'helfjmm') .'</em></p>' . 
     80        '<h3>' . __('Setup', 'helfjmm') .'</h3>' . 
     81        '<p>' . __('Create a top-level page (i.e. domain.com/pagename/) and insert the following shortcode:', 'helfjmm') .'</h3>' . 
     82        '<p><code>[join-my-multisite]</code></p>' . 
     83        '<p>' . __( 'Come back to this page and check the box to turn allow for per-site registration. You then select a page from the drop-down list of pages.', 'helfjmm' ) . '</p>' . 
     84        '<h3>' . __('If used with the \'Manual\' (i.e. widget) membership option, non-logged in users will see a button to direct them to your registration page.', 'helfjmm') .'</h3>'  
    8185      )); 
    8286} 
  • join-my-multisite/tags/1.1/admin/settings.php

    r611707 r613778  
    2222} 
    2323  
    24     // Register and define the settings 
     24// In lieu of options.php.... 
     25if( $_POST['action'] == 'update' ) { 
     26 
     27    $new_options = get_option( 'helfjmm_options' ); 
     28        $new_options['type'] = $_POST['jmm_type'];  
     29        $new_options['role'] = $_POST['jmm_role']; 
     30        $new_options['persite'] = $_POST['jmm_persite'];  
     31        $new_options['perpage'] = $_POST['jmm_perpage']; 
     32    update_option('helfjmm_options', $new_options); 
     33    update_option( 'default_user_role', $new_options['role']); 
     34 
     35    // Echo  
     36    ?><div id='message' class='updated fade'><p><strong><?php _e('Options Updated!', 'helfjmm'); ?></strong></p></div><?php 
     37} 
     38 
    2539?> 
    2640    <div class="wrap"> 
     
    3246        ?> 
    3347     
    34         <form method="post" action="options.php"> 
     48        <form method="post" action=""> 
    3549            <input type="hidden" name="action" value="update" /> 
    3650            <input type="hidden" name="page_options" value="helfjmm_options" /> 
     
    4458                        <th scope="row"><?php _e('Membership:', 'helfjmm'); ?></th> 
    4559                        <td><p> 
    46                             <input type="radio" name="helfjmm_options[type]" value="1" <?php if ($jmm_options['type'] == 1) echo 'checked="checked"'; ?>> <label for="jmm-type"><strong><?php _e('Automatic', 'helfjmm'); ?></strong> </label><br /> 
    47                             <input type="radio" name="helfjmm_options[type]" value="2" <?php if ($jmm_options['type'] == 2) echo 'checked="checked"'; ?>> <label for="jmm-type"><strong><?php _e('Manual', 'helfjmm'); ?></strong> </label><br /> 
    48                             <input type="radio" name="helfjmm_options[type]" value="3" <?php if ($jmm_options['type'] == 3) echo 'checked="checked"'; ?>> <label for="jmm-type"><strong><?php _e('None', 'helfjmm'); ?></strong></label> 
     60                            <input type="radio" name="jmm_type" value="1" <?php if ($jmm_options['type'] == 1) echo 'checked="checked"'; ?>> <label for="jmm-type"><strong><?php _e('Automatic', 'helfjmm'); ?></strong> </label><br /> 
     61                            <input type="radio" name="jmm_type" value="2" <?php if ($jmm_options['type'] == 2) echo 'checked="checked"'; ?>> <label for="jmm-type"><strong><?php _e('Manual', 'helfjmm'); ?></strong> </label><br /> 
     62                            <input type="radio" name="jmm_type" value="3" <?php if ($jmm_options['type'] == 3) echo 'checked="checked"'; ?>> <label for="jmm-type"><strong><?php _e('None', 'helfjmm'); ?></strong></label> 
    4963                        </p></td> 
    5064                        <td><p class="description"> 
     
    6276                        <th scope="row"><?php _e('Registration:', 'helfjmm'); ?></th> 
    6377                        <td><p> 
    64                             <input type="checkbox" name="helfjmm_options[persite]" value="1" <?php if ($jmm_options['persite'] == 1) echo 'checked="checked"'; ?>> <label for="jmm-persite"><?php _e('Per-Site Registration.', 'helfjmm'); ?></label> 
     78                            <input type="checkbox" name="jmm_persite" value="1" <?php if ($jmm_options['persite'] == 1) echo 'checked="checked"'; ?>> <label for="jmm-persite"><?php _e('Per-Site Registration.', 'helfjmm'); ?></label> 
    6579                        </p></td> 
    6680                        <td><p class="description"><?php _e('Check this box if you want to use a shortcode to customize per-site registration. If unchecked, registrations will be sent to the network registration page.', 'helfjmm'); ?></p></td> 
     
    7286                        <th scope="row"></th> 
    7387                        <td> 
    74                         <p><select name="helfjmm_options[perpage]" id='jmm_options[perpage]'> 
     88                        <p><select name="jmm_perpage" id='jmm_options[perpage]'> 
    7589                            <option value="0"><?php _e( '&mdash; Select &mdash;' ); ?></option> 
    76                             <?php if ( current_user_can( 'create_posts', 'page' ) ) : ?> 
    77                             <option value="new" id="new-page"><?php _e( '&mdash; Add new page &mdash;' ); ?></option> 
    78                             <?php endif; ?> 
    7990                            <?php echo walk_page_dropdown_tree( $all_pages, 0, array( 'depth' => 1,'selected' => $jmm_options['perpage'] ) ); ?> 
    8091                        </select></p> 
     
    93104                    ?> 
    94105                     
    95                     <tr> 
     106                    <tr>  
    96107                        <th scope="row"><?php _e('New User Default Role:', 'helfjmm'); ?></th> 
    97108                        <td> 
    98                         <select name="helfjmm_options[role]" id="<?php echo $jmm_options['role']; ?>"> 
     109                        <select name="jmm_role" id="<?php echo $jmm_options['role']; ?>"> 
    99110                        <option value="none"><?php _e( '-- None --', 'helfjmm' )?></option> 
    100111                        <?php wp_dropdown_roles( get_option( 'default_user_role' ) ); ?> 
     
    109120     
    110121        </form> 
    111  
  • join-my-multisite/tags/1.1/joinmymultisite.php

    r611707 r613778  
    44Plugin URI: http://halfelf.org/plugins/join-my-multisite/ 
    55Description: Allow logged in users to add themselves to sites (or auto-add them to all sites). 
    6 Version: 1.0 
     6Version: 1.1 
    77Author: Mika Epstein (Ipstenu) 
    88Author URI: http://ipstenu.org/ 
     
    3434    function init() { 
    3535        $jmm_options = get_option( 'helfjmm_options' ); 
    36         if ( isset($_GET['settings-updated']) && ( $_GET['page'] == 
    37 'jmm' ) ) {  
    38             add_action('admin_notices', array('JMM','updateMessage')); 
    39             if ( $jmm_options['role'] != get_option( 'default_user_role' ) ) 
    40                 { update_option( 'default_user_role', $jmm_options['role']); } 
    41         } 
    42          
     36 
     37        // If nothing's set 
    4338        if ( !isset($jmm_options['type']) ) { 
    4439            $jmm_options['type'] = '3'; // 3 = keep things the same 
     
    4944        } 
    5045    } 
    51  
    52     // Messages, used by INIT 
    53     function updateMessage() { 
    54         echo "<div id='message' class='updated fade'><p><strong>".__('Options Updated!', 'helfjmm')."</strong></p></div>"; 
    55         } 
    56  
    5746 
    5847    // donate link on manage plugin page 
  • join-my-multisite/tags/1.1/readme.txt

    r611734 r613778  
    44Requires at least: 3.4 
    55Tested up to: 3.5 
    6 Stable tag: 1.0 
     6Stable tag: 1.1 
    77Donate link: https://www.wepay.com/donations/halfelf-wp 
    88 
     
    1818* Have a 'Join This Site' button in a widget 
    1919* Keep things exactly as they are 
     20* Create a per site registration page 
    2021 
    2122It's really that simple!  
     
    2324If they decide to auto-add, then any time a logged in user visits a site, they will be magically added to that site. If they decide to use a 'Join This Site' button, then they can customize the button message text for users who are logged in but not members, not logged in, or already members. Don't worry, if you have registation turned off, they won't see the 'register' button. 
    2425 
    25 In addition, if you have registration turned on, each site can chose to use 'Per Site Registration,' which will allow them to create a page on their site just for registrations and signups. To display the signup code, just put <code>[join-my-multisite]</code> on the page. 
     26When you have registration turned on, each site can chose to use 'Per Site Registration,' which will allow them to create a page on their site just for registrations and signups. To display the signup code, just put <code>[join-my-multisite]</code> on the page. 
    2627 
    27 * [Plugin Site](http://halfelf.org/plugins/sitewide-comment-control/) 
     28* [Plugin Site](http://halfelf.org/plugins/join-my-multisite/) 
    2829* [Donate](https://www.wepay.com/donations/halfelf-wp) 
    2930 
     
    3435 
    3536* Added in a per-site registration page option. 
     37* Corrected bug where non-network admins couldn't make changes 
    3638 
    3739=  1.0 = 
     
    6264The <code>[join-my-multisite]</code> shortcode will display a notice that registration is unavailable. 
    6365 
     66= How do I use the per-site registration page? = 
     67 
     68<em>None of this will work if the Network Admin has not enabled registrations.</em> 
     69 
     70First make a page for your registration. You can name it anything you want, however you can only use top-level pages (so domain.com/pagename/ and not domain.com/parentpage/childpage/). On that page, enter the shortcode <code>[join-my-multisite]</code> around any other content you want. 
     71 
     72Next, go to Users > Join My Multisite and check the box to allow for Per Site Registration. Once that option is saved, a new dropdown will appear that will let you select a top-level page on your site. Select which page, and you are good to go. 
     73 
     74= If I use the per-site registration, do I have to use the widget? = 
     75 
     76Nope! In fact, you can even select 'none' (i.e. leave things as they are) and <em>still</em> use the per-site shortcode, because magic. 
     77 
     78= What if the network allows registration and I don't make a site page? = 
     79 
     80Then non-logged-in users will be redirected to the network registration page, and they may not be automatically added to your site (I'm working on that). I strongly suggest you create a page. 
     81 
    6482= How do I style the button? = 
    6583 
    66 By default it will pick up whatever style your theme has, so if it styles buttons, you'll automatically match. If you want more, the css is `input#join-site.button` to just play with the button. 
     84By default it will pick up whatever style your theme has, so if it styles buttons, you'll automatically match. If you want more, the css is `input#join-site.button` to play with the button. 
    6785 
    6886= How do I style the per-site registration page? = 
    6987 
    70 In your theme's CSS. This is basically the default WordPress signup page, just done in short-code form, so it will default to use your site's CSS anyway. The css falls under `.mu_register` so you can override it in your theme. 
     88In your theme's CSS. This is basically the default WordPress signup page, just done in short-code form, so it will default to use your site's CSS anyway. The css falls under `.mu_register` of you want to override it in your theme. 
    7189 
    72 = Can users sign up for a blog as well as an account? = 
     90= Can users sign up for a blog and an account when using the shortcode? = 
    7391 
    74 No.  
    75  
    76 That's such a massive network thing, the tinfoil hat in me didn't want to do it. You could fiddle with the signup page code, if you wanted, but I don't plan to support it. 
     92No. That's such a massive network thing, the tinfoil hat in me didn't want to do it. You could fiddle with the signup page code, if you wanted, but I don't plan to support it. 
  • join-my-multisite/trunk/README.md

    r609291 r613778  
    1 join-my-multisite 
    2 ================= 
     1# Join My Multisite # 
    32 
    4 Join My Multisite 
     3Welcome to the GitHub development site for Join My Multisite. 
     4 
     5The version here is actually 1.1 right now, and it has a new addition: 
     6 
     7* Per Site Registration 
     8 
     9What? You thought it did that? It did, but now if you have network registration turned on, each site can chose to use 'Per Site Registration,' which will allow them to create a page on their site just for registrations and signups. To display the signup code, just put <code>[join-my-multisite]</code> on the page. 
     10 
     11Please test and let me know how it works! 
     12 
     13## README ## 
     14**Contributors:** Ipstenu   
     15**Tags:** multisite, wpmu, registration, users   
     16**Requires at least:** 3.4   
     17**Tested up to:** 3.5   
     18**Stable tag:** 1.0 
     19**Donate link:** https://www.wepay.com/donations/halfelf-wp   
     20 
     21Allow site admins to automatically add existing users to their site, or let users decide at the click a button. 
     22 
     23## Description ## 
     24 
     25When you want to add a user to every site on your network, you've got some pretty cool plugins for that as a network admin. But sometimes you want to let your site-managers have that control, and sometimes you want to make it optional. 
     26 
     27By activating this plugin, you give your Site Admins the following options: 
     28 
     29* Auto-add users 
     30* Have a 'Join This Site' button in a widget 
     31* Keep things exactly as they are 
     32 
     33It's really that simple!  
     34 
     35If they decide to auto-add, then any time a logged in user visits a site, they will be magically added to that site. If they decide to use a 'Join This Site' button, then they can customize the button message text for users who are logged in but not members, not logged in, or already members. Don't worry, if you have registation turned off, they won't see the 'register' button. 
     36 
     37In addition, if you have registration turned on, each site can chose to use 'Per Site Registration,' which will allow them to create a page on their site just for registrations and signups. To display the signup code, just put <code>[join-my-multisite]</code> on the page. 
     38 
     39* [Plugin Site](http://halfelf.org/plugins/join-my-multisite/) 
     40* [Donate](https://www.wepay.com/donations/halfelf-wp) 
     41 
     42##Changelog## 
     43 
     44### 1.1 ### 
     4512 October, 2012 by Ipstenu 
     46 
     47* Added in a per-site registration page option. 
     48* Corrected bug where non-network admins couldn't make changes 
     49 
     50###  1.0 ### 
     5107 October, 2012 by Ipstenu 
     52 
     53* First completed version. 
     54 
     55## Installation ## 
     56 
     57This plugin is only network activatable. Configuration is done per-site via a page in the 'Users' section. 
     58 
     59## Upgrade Notice ## 
     60 
     61None yet. 
     62 
     63## Frequently Asked Questions ## 
     64 
     65### What happens if the network doesn't allow registrations? ### 
     66 
     67If registration is turned off, the widget won't display anything for logged-out users. 
     68 
     69The <code>[join-my-multisite]</code> shortcode will display a notice that registration is unavailable. 
     70 
     71### How do I style the button? ### 
     72 
     73By default it will pick up whatever style your theme has, so if it styles buttons, you'll automatically match. If you want more, the css is `input#join-site.button` to just play with the button. 
     74 
     75### How do I style the per-site registration page? ### 
     76 
     77In your theme's CSS. This is basically the default WordPress signup page, just done in short-code form, so it will default to use your site's CSS anyway. The css falls under `.mu_register` so you can override it in your theme. 
     78 
     79### Can users sign up for a blog as well as an account? ### 
     80 
     81No.  
     82 
     83That's such a massive network thing, the tinfoil hat in me didn't want to do it. You could fiddle with the signup page code, if you wanted, but I don't plan to support it. 
  • join-my-multisite/trunk/admin/help.php

    r611707 r613778  
    4343    $screen->set_help_sidebar( 
    4444        '<h4>' . __('Links:', 'jmm') .'</h4>' . 
    45          
     45        '<p><a href="http://wordpress.org/support/plugin/join-my-multisite">' . __('Support', 'jmm' ) . '</a></p>' . 
    4646        '<p><a href="http://codex.wordpress.org/Roles_and_Capabilities">' . __('WordPress Roles & Capabilities', 'jmm' ) . '</a></p>' . 
    4747        '<p><a href="http://wordpress.org/extend/plugins/multisite-user-management/">' . __('Plugin: Multisite User Management', 'jmm' ) . '</a></p>' 
     
    5959              <li><strong>'. __('None: ', 'helfjmm') . '</strong>' . __('Don\'t allow new users to add themselves this site, add them manually.', 'helfjmm') . '</li> 
    6060        </ul>' . 
    61         '<p>' . __( 'If don\'t want anything to change, then you can leave this plugin alone (i.e. on "None").', 'helfjmm' ) . '</p>'  
     61        '<p>' . __( 'If don\'t want anything to change, then you can leave this plugin alone (i.e. on "None").', 'helfjmm' ) . '</p>' . 
     62        '<p>' . __( 'Regardless of membership options, you can still use the Per Site Registration.', 'helfjmm' ) . '</p>'  
    6263        )); 
    6364         
     
    7475    $screen->add_help_tab( array( 
    7576        'id'      => 'jmm-menu-shortcode-options', 
    76         'title'   => __('Shortcode', 'helfjmm'), 
     77        'title'   => __('Per Site Registration', 'helfjmm'), 
    7778        'content' => 
    78         '<h3>' . __('Shortcode Options', 'helfjmm') .'</h3>' . 
    79         '<p>' . __( 'Check the box to turn allow for per-site registration. This will only be an option if your network has enabled registration. You then select a page from the drop-down list of pages, and on the page use the following shortcode to display your registration form.', 'helfjmm' ) . '</p>'  . 
    80         '<code>[join-my-multisite]</code>' 
     79        '<p><em>' . __('This feature is only available if your network admin has allowed regisgrations.', 'helfjmm') .'</em></p>' . 
     80        '<h3>' . __('Setup', 'helfjmm') .'</h3>' . 
     81        '<p>' . __('Create a top-level page (i.e. domain.com/pagename/) and insert the following shortcode:', 'helfjmm') .'</h3>' . 
     82        '<p><code>[join-my-multisite]</code></p>' . 
     83        '<p>' . __( 'Come back to this page and check the box to turn allow for per-site registration. You then select a page from the drop-down list of pages.', 'helfjmm' ) . '</p>' . 
     84        '<h3>' . __('If used with the \'Manual\' (i.e. widget) membership option, non-logged in users will see a button to direct them to your registration page.', 'helfjmm') .'</h3>'  
    8185      )); 
    8286} 
  • join-my-multisite/trunk/admin/settings.php

    r611707 r613778  
    2222} 
    2323  
    24     // Register and define the settings 
     24// In lieu of options.php.... 
     25if( $_POST['action'] == 'update' ) { 
     26 
     27    $new_options = get_option( 'helfjmm_options' ); 
     28        $new_options['type'] = $_POST['jmm_type'];  
     29        $new_options['role'] = $_POST['jmm_role']; 
     30        $new_options['persite'] = $_POST['jmm_persite'];  
     31        $new_options['perpage'] = $_POST['jmm_perpage']; 
     32    update_option('helfjmm_options', $new_options); 
     33    update_option( 'default_user_role', $new_options['role']); 
     34 
     35    // Echo  
     36    ?><div id='message' class='updated fade'><p><strong><?php _e('Options Updated!', 'helfjmm'); ?></strong></p></div><?php 
     37} 
     38 
    2539?> 
    2640    <div class="wrap"> 
     
    3246        ?> 
    3347     
    34         <form method="post" action="options.php"> 
     48        <form method="post" action=""> 
    3549            <input type="hidden" name="action" value="update" /> 
    3650            <input type="hidden" name="page_options" value="helfjmm_options" /> 
     
    4458                        <th scope="row"><?php _e('Membership:', 'helfjmm'); ?></th> 
    4559                        <td><p> 
    46                             <input type="radio" name="helfjmm_options[type]" value="1" <?php if ($jmm_options['type'] == 1) echo 'checked="checked"'; ?>> <label for="jmm-type"><strong><?php _e('Automatic', 'helfjmm'); ?></strong> </label><br /> 
    47                             <input type="radio" name="helfjmm_options[type]" value="2" <?php if ($jmm_options['type'] == 2) echo 'checked="checked"'; ?>> <label for="jmm-type"><strong><?php _e('Manual', 'helfjmm'); ?></strong> </label><br /> 
    48                             <input type="radio" name="helfjmm_options[type]" value="3" <?php if ($jmm_options['type'] == 3) echo 'checked="checked"'; ?>> <label for="jmm-type"><strong><?php _e('None', 'helfjmm'); ?></strong></label> 
     60                            <input type="radio" name="jmm_type" value="1" <?php if ($jmm_options['type'] == 1) echo 'checked="checked"'; ?>> <label for="jmm-type"><strong><?php _e('Automatic', 'helfjmm'); ?></strong> </label><br /> 
     61                            <input type="radio" name="jmm_type" value="2" <?php if ($jmm_options['type'] == 2) echo 'checked="checked"'; ?>> <label for="jmm-type"><strong><?php _e('Manual', 'helfjmm'); ?></strong> </label><br /> 
     62                            <input type="radio" name="jmm_type" value="3" <?php if ($jmm_options['type'] == 3) echo 'checked="checked"'; ?>> <label for="jmm-type"><strong><?php _e('None', 'helfjmm'); ?></strong></label> 
    4963                        </p></td> 
    5064                        <td><p class="description"> 
     
    6276                        <th scope="row"><?php _e('Registration:', 'helfjmm'); ?></th> 
    6377                        <td><p> 
    64                             <input type="checkbox" name="helfjmm_options[persite]" value="1" <?php if ($jmm_options['persite'] == 1) echo 'checked="checked"'; ?>> <label for="jmm-persite"><?php _e('Per-Site Registration.', 'helfjmm'); ?></label> 
     78                            <input type="checkbox" name="jmm_persite" value="1" <?php if ($jmm_options['persite'] == 1) echo 'checked="checked"'; ?>> <label for="jmm-persite"><?php _e('Per-Site Registration.', 'helfjmm'); ?></label> 
    6579                        </p></td> 
    6680                        <td><p class="description"><?php _e('Check this box if you want to use a shortcode to customize per-site registration. If unchecked, registrations will be sent to the network registration page.', 'helfjmm'); ?></p></td> 
     
    7286                        <th scope="row"></th> 
    7387                        <td> 
    74                         <p><select name="helfjmm_options[perpage]" id='jmm_options[perpage]'> 
     88                        <p><select name="jmm_perpage" id='jmm_options[perpage]'> 
    7589                            <option value="0"><?php _e( '&mdash; Select &mdash;' ); ?></option> 
    76                             <?php if ( current_user_can( 'create_posts', 'page' ) ) : ?> 
    77                             <option value="new" id="new-page"><?php _e( '&mdash; Add new page &mdash;' ); ?></option> 
    78                             <?php endif; ?> 
    7990                            <?php echo walk_page_dropdown_tree( $all_pages, 0, array( 'depth' => 1,'selected' => $jmm_options['perpage'] ) ); ?> 
    8091                        </select></p> 
     
    93104                    ?> 
    94105                     
    95                     <tr> 
     106                    <tr>  
    96107                        <th scope="row"><?php _e('New User Default Role:', 'helfjmm'); ?></th> 
    97108                        <td> 
    98                         <select name="helfjmm_options[role]" id="<?php echo $jmm_options['role']; ?>"> 
     109                        <select name="jmm_role" id="<?php echo $jmm_options['role']; ?>"> 
    99110                        <option value="none"><?php _e( '-- None --', 'helfjmm' )?></option> 
    100111                        <?php wp_dropdown_roles( get_option( 'default_user_role' ) ); ?> 
     
    109120     
    110121        </form> 
    111  
  • join-my-multisite/trunk/joinmymultisite.php

    r611707 r613778  
    44Plugin URI: http://halfelf.org/plugins/join-my-multisite/ 
    55Description: Allow logged in users to add themselves to sites (or auto-add them to all sites). 
    6 Version: 1.0 
     6Version: 1.1 
    77Author: Mika Epstein (Ipstenu) 
    88Author URI: http://ipstenu.org/ 
     
    3434    function init() { 
    3535        $jmm_options = get_option( 'helfjmm_options' ); 
    36         if ( isset($_GET['settings-updated']) && ( $_GET['page'] == 
    37 'jmm' ) ) {  
    38             add_action('admin_notices', array('JMM','updateMessage')); 
    39             if ( $jmm_options['role'] != get_option( 'default_user_role' ) ) 
    40                 { update_option( 'default_user_role', $jmm_options['role']); } 
    41         } 
    42          
     36 
     37        // If nothing's set 
    4338        if ( !isset($jmm_options['type']) ) { 
    4439            $jmm_options['type'] = '3'; // 3 = keep things the same 
     
    4944        } 
    5045    } 
    51  
    52     // Messages, used by INIT 
    53     function updateMessage() { 
    54         echo "<div id='message' class='updated fade'><p><strong>".__('Options Updated!', 'helfjmm')."</strong></p></div>"; 
    55         } 
    56  
    5746 
    5847    // donate link on manage plugin page 
  • join-my-multisite/trunk/readme.txt

    r611734 r613778  
    44Requires at least: 3.4 
    55Tested up to: 3.5 
    6 Stable tag: 1.0 
     6Stable tag: 1.1 
    77Donate link: https://www.wepay.com/donations/halfelf-wp 
    88 
     
    1818* Have a 'Join This Site' button in a widget 
    1919* Keep things exactly as they are 
     20* Create a per site registration page 
    2021 
    2122It's really that simple!  
     
    2324If they decide to auto-add, then any time a logged in user visits a site, they will be magically added to that site. If they decide to use a 'Join This Site' button, then they can customize the button message text for users who are logged in but not members, not logged in, or already members. Don't worry, if you have registation turned off, they won't see the 'register' button. 
    2425 
    25 In addition, if you have registration turned on, each site can chose to use 'Per Site Registration,' which will allow them to create a page on their site just for registrations and signups. To display the signup code, just put <code>[join-my-multisite]</code> on the page. 
     26When you have registration turned on, each site can chose to use 'Per Site Registration,' which will allow them to create a page on their site just for registrations and signups. To display the signup code, just put <code>[join-my-multisite]</code> on the page. 
    2627 
    27 * [Plugin Site](http://halfelf.org/plugins/sitewide-comment-control/) 
     28* [Plugin Site](http://halfelf.org/plugins/join-my-multisite/) 
    2829* [Donate](https://www.wepay.com/donations/halfelf-wp) 
    2930 
     
    3435 
    3536* Added in a per-site registration page option. 
     37* Corrected bug where non-network admins couldn't make changes 
    3638 
    3739=  1.0 = 
     
    6264The <code>[join-my-multisite]</code> shortcode will display a notice that registration is unavailable. 
    6365 
     66= How do I use the per-site registration page? = 
     67 
     68<em>None of this will work if the Network Admin has not enabled registrations.</em> 
     69 
     70First make a page for your registration. You can name it anything you want, however you can only use top-level pages (so domain.com/pagename/ and not domain.com/parentpage/childpage/). On that page, enter the shortcode <code>[join-my-multisite]</code> around any other content you want. 
     71 
     72Next, go to Users > Join My Multisite and check the box to allow for Per Site Registration. Once that option is saved, a new dropdown will appear that will let you select a top-level page on your site. Select which page, and you are good to go. 
     73 
     74= If I use the per-site registration, do I have to use the widget? = 
     75 
     76Nope! In fact, you can even select 'none' (i.e. leave things as they are) and <em>still</em> use the per-site shortcode, because magic. 
     77 
     78= What if the network allows registration and I don't make a site page? = 
     79 
     80Then non-logged-in users will be redirected to the network registration page, and they may not be automatically added to your site (I'm working on that). I strongly suggest you create a page. 
     81 
    6482= How do I style the button? = 
    6583 
    66 By default it will pick up whatever style your theme has, so if it styles buttons, you'll automatically match. If you want more, the css is `input#join-site.button` to just play with the button. 
     84By default it will pick up whatever style your theme has, so if it styles buttons, you'll automatically match. If you want more, the css is `input#join-site.button` to play with the button. 
    6785 
    6886= How do I style the per-site registration page? = 
    6987 
    70 In your theme's CSS. This is basically the default WordPress signup page, just done in short-code form, so it will default to use your site's CSS anyway. The css falls under `.mu_register` so you can override it in your theme. 
     88In your theme's CSS. This is basically the default WordPress signup page, just done in short-code form, so it will default to use your site's CSS anyway. The css falls under `.mu_register` of you want to override it in your theme. 
    7189 
    72 = Can users sign up for a blog as well as an account? = 
     90= Can users sign up for a blog and an account when using the shortcode? = 
    7391 
    74 No.  
    75  
    76 That's such a massive network thing, the tinfoil hat in me didn't want to do it. You could fiddle with the signup page code, if you wanted, but I don't plan to support it. 
     92No. That's such a massive network thing, the tinfoil hat in me didn't want to do it. You could fiddle with the signup page code, if you wanted, but I don't plan to support it. 
Note: See TracChangeset for help on using the changeset viewer.