Support » Plugin: Subscribe To Comments Reloaded » Management page missing the option to set to ALL comments

  • Hi

    When I go to manage subscriptions as a user, I only get the following Action options:
    Delete, Suspend, Replies to my comments, Activate

    I think one is missing that allows the user to set themselves to receiving All comments.

    I had a look in the plugin files and have made some changes that I think have fixed this.

    In templates/user.php I replaced:

    $action = ! empty( $_POST['sra'] ) ? $_POST['sra'] : ( ! empty( $_GET['sra'] ) ? $_GET['sra'] : '' );
    	switch ( $action ) {
    	case 'delete':
    		$rows_affected = $wp_subscribe_reloaded->delete_subscriptions( $post_list, $email );
    		echo '<p class="updated">' . __( 'Subscriptions deleted:', 'subscribe-reloaded' ) . " $rows_affected</p>";
    		break;
    	case 'suspend':
    		$rows_affected = $wp_subscribe_reloaded->update_subscription_status( $post_list, $email, 'C' );
    		echo '<p class="updated">' . __( 'Subscriptions suspended:', 'subscribe-reloaded' ) . " $rows_affected</p>";
    		break;
    	case 'activate':
    		$rows_affected = $wp_subscribe_reloaded->update_subscription_status( $post_list, $email, '-C' );
    		echo '<p class="updated">' . __( 'Subscriptions activated:', 'subscribe-reloaded' ) . " $rows_affected</p>";
    		break;
    	case 'force_r':
    		$rows_affected = $wp_subscribe_reloaded->update_subscription_status( $post_list, $email, 'R' );
    		echo '<p class="updated">' . __( 'Subscriptions updated:', 'subscribe-reloaded' ) . " $rows_affected</p>";
    		break;
    	default:
    		break;
    	}

    with this:

    $action = ! empty( $_POST['sra'] ) ? $_POST['sra'] : ( ! empty( $_GET['sra'] ) ? $_GET['sra'] : '' );
    	switch ( $action ) {
    	case 'delete':
    		$rows_affected = $wp_subscribe_reloaded->delete_subscriptions( $post_list, $email );
    		echo '<p class="updated">' . __( 'Subscriptions deleted:', 'subscribe-reloaded' ) . " $rows_affected</p>";
    		break;
    	case 'suspend':
    		$rows_affected = $wp_subscribe_reloaded->update_subscription_status( $post_list, $email, 'C' );
    		echo '<p class="updated">' . __( 'Subscriptions suspended:', 'subscribe-reloaded' ) . " $rows_affected</p>";
    		break;
    	case 'activate':
    		$rows_affected = $wp_subscribe_reloaded->update_subscription_status( $post_list, $email, '-C' );
    		echo '<p class="updated">' . __( 'Subscriptions activated:', 'subscribe-reloaded' ) . " $rows_affected</p>";
    		break;
    	case 'force_y':
    		$rows_affected = $wp_subscribe_reloaded->update_subscription_status( $post_list, $email, 'Y' );
    		echo '<p class="updated">' . __( 'Subscriptions updated:', 'subscribe-reloaded' ) . " $rows_affected</p>";
    		break;
    	case 'force_r':
    		$rows_affected = $wp_subscribe_reloaded->update_subscription_status( $post_list, $email, 'R' );
    		echo '<p class="updated">' . __( 'Subscriptions updated:', 'subscribe-reloaded' ) . " $rows_affected</p>";
    		break;
    	default:
    		break;
    	}

    (In other words just added in a line to deal with case ‘force_y’).

    Then also in user.php I replaced:

    echo '<p id="subscribe-reloaded-action-p">' . __( 'Action:', 'subscribe-reloaded' ) . '
    			<input type="radio" name="sra" value="delete" id="action_type_delete" /> <label for="action_type_delete">' . __( 'Delete', 'subscribe-reloaded' ) . '</label>     
    			<input type="radio" name="sra" value="suspend" id="action_type_suspend" checked="checked" /> <label for="action_type_suspend">' . __( 'Suspend', 'subscribe-reloaded' ) . '</label>     
    			<input type="radio" name="sra" value="force_r" id="action_type_force_y" /> <label for="action_type_force_y">' . __( 'Replies to my comments', 'subscribe-reloaded' ) . '</label>     
    			<input type="radio" name="sra" value="activate" id="action_type_activate" /> <label for="action_type_activate">' . __( 'Activate', 'subscribe-reloaded' ) . '</label></p>';

    with this:

    echo '<p id="subscribe-reloaded-action-p">' . __( 'Action:', 'subscribe-reloaded' ) . '
    			<input type="radio" name="sra" value="delete" id="action_type_delete" /> <label for="action_type_delete">' . __( 'Delete', 'subscribe-reloaded' ) . '</label>     
    			<input type="radio" name="sra" value="suspend" id="action_type_suspend" checked="checked" /> <label for="action_type_suspend">' . __( 'Suspend', 'subscribe-reloaded' ) . '</label>     
    			<input type="radio" name="sra" value="force_y" id="action_type_force_y" /> <label for="action_type_force_y">' . __( 'All comments', 'subscribe-reloaded' ) . '</label>     
    			<input type="radio" name="sra" value="force_r" id="action_type_force_r" /> <label for="action_type_force_r">' . __( 'Replies to my comments', 'subscribe-reloaded' ) . '</label>     
    			<input type="radio" name="sra" value="activate" id="action_type_activate" /> <label for="action_type_activate">' . __( 'Activate', 'subscribe-reloaded' ) . '</label></p>';

    (In other words just added in the radio for All comments and tidied up the id and label on Replies only.)

    Then in templates/author.php I replaced:

    echo '<p id="subscribe-reloaded-action-p">' . __( 'Action:', 'subscribe-reloaded' ) . '
    			<input type="radio" name="sra" value="delete" id="action_type_delete" /> <label for="action_type_delete">' . __( 'Delete', 'subscribe-reloaded' ) . '</label>     
    			<input type="radio" name="sra" value="suspend" id="action_type_suspend" checked="checked" /> <label for="action_type_suspend">' . __( 'Suspend', 'subscribe-reloaded' ) . '</label>     
    			<input type="radio" name="sra" value="force_y" id="action_type_force_y" /> <label for="action_type_force_y">' . __( 'Set to Y', 'subscribe-reloaded' ) . '</label>     
    			<input type="radio" name="sra" value="activate" id="action_type_activate" /> <label for="action_type_activate">' . __( 'Activate', 'subscribe-reloaded' ) . '</label></p>';

    with this:

    echo '<p id="subscribe-reloaded-action-p">' . __( 'Action:', 'subscribe-reloaded' ) . '
    			<input type="radio" name="sra" value="delete" id="action_type_delete" /> <label for="action_type_delete">' . __( 'Delete', 'subscribe-reloaded' ) . '</label>     
    			<input type="radio" name="sra" value="suspend" id="action_type_suspend" checked="checked" /> <label for="action_type_suspend">' . __( 'Suspend', 'subscribe-reloaded' ) . '</label>     
    			<input type="radio" name="sra" value="force_y" id="action_type_force_y" /> <label for="action_type_force_y">' . __( 'All comments', 'subscribe-reloaded' ) . '</label>     
    			<input type="radio" name="sra" value="force_r" id="action_type_force_r" /> <label for="action_type_force_r">' . __( 'Replies to my comments', 'subscribe-reloaded' ) . '</label>     
    			<input type="radio" name="sra" value="activate" id="action_type_activate" /> <label for="action_type_activate">' . __( 'Activate', 'subscribe-reloaded' ) . '</label></p>';

    (Again, just adding in the All comments radio and tidying up id and label)

    Haven’t tested extensively but seems to be working as I think it should.

    Cheers
    Jon

    https://wordpress.org/plugins/subscribe-to-comments-reloaded/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello, I just notice the same problem, your solution is correct but must be done by the plugin developer, in my case I´m using the plugin queries to construct my own custom manage subscription page.

    It would be nice if the plugin has all queries serve to make our custom front-end manage page

    Hello Guys,

    Thank you for taking time to code a little. You can submit all this changes directly on the developing Repository here:

    https://github.com/stcr/subscribe-to-comments-reloaded

    You can fork the plugin and submit your changes with a Merge request, then we can review the code and test it, if everything is OK we will merge it.

    Regards and thank you again for your effort to make this plugin better.

    Thread Starter janwyl

    (@janwyl)

    Hi there

    I’ve never used Github and I’ve just spent 10 minutes trying to get my head round how to use it but it’s just not very intuitive – at least not to me it isn’t.

    Sorry – too much hassle for me to put it on there at the moment…

    Thread Starter janwyl

    (@janwyl)

    OK think I’ve managed to do a fork and a pull request in GitHub, but really not sure…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Management page missing the option to set to ALL comments’ is closed to new replies.