• I figured I should just pop this here in case it is of some use to someone..

    RE: Members Only Plugin v0.6.5
    members-only.php
    Start: Line 496
    End: Line 558
    Cleanup code rendered for admin settings/options page.

    <div class="wrap">
    	<h2>Members Only Options</h2>
    	<form method="post" action="<?php echo $_SERVER['PHP_SELF'] . '?page=' . basename(__FILE__); ?>&amp;updated=true">
    	<fieldset class="options" style="border: none">
    	<p>
    	Checking the <em>Members Only</em> option below will make your site only viewable to users that are logged in. If a visitor is not logged in,
    	they will be redirected to the login page or a page that you can specify. Once logged in they can be redirected back to the page that they originally requested if you choose to.
    	</p>
    	<table width="100%" <?php $wpversion >= 2.5 ? _e('class="form-table"') : _e('cellspacing="2" cellpadding="5" class="editform"'); ?> >
    		<tr valign="top">
    			<th scope="row">Members Only?</th>
    			<td>
    				<input name="members_only" type="checkbox" id="members_only_inp" value="1" <?php checked('1', $optionarray_def['members_only']); ?> />
    				</td>
    			<td><span style="color: #555; font-size: .85em;">Choose between making your blog only accessable to users that are logged in</span></td>
    		</tr>
    	</table>
    
    	<h3>Blog Access Options</h3>
    	<table width="100%" <?php $wpversion >= 2.5 ? _e('class="form-table"') : _e('cellspacing="2" cellpadding="5" class="editform"'); ?> >
    		<tr valign="top">
    			<th scope="row">Redirect To</th>
    			<td><select name="redirect_to" id="redirect_to_inp"><?php echo $redirectoptions ?></select></td>
    			<td><span style="color: #555; font-size: .85em;">Choose where a user that isn't logged in is redirected to</span></td>
    		</tr>
    		<tr valign="top">
    			<th scope="row">Return User</th>
    			<td>
    				<input name="redirect" type="checkbox" id="redirect_inp" value="1" <?php checked('1', $optionarray_def['redirect']); ?> />
    				</td>
    			<td><span style="color: #555; font-size: .85em;">Choose whether once logged in, the user returns to the originally requested page <em>(Only applies if your redirecting to the login page)</em></span></td>
    		</tr>
    		<tr valign="top">
    			<th scope="row">Redirection Page</th>
    			<td colspan="2"><?php bloginfo('url');?>/<input type="text" name="redirect_url" id="redirect_url_inp" value="<?php echo $optionarray_def['redirect_url']; ?>" size="35" /><br />
    			<span style="color: #555; font-size: .85em;">If the field is left blank, users will be redirected to the login page instead.
    			<em>(Only applies if your redirecting to the specific page)</em></span>
    			</td>
    		</tr>
    	</table>
    	<h3>Feed Access Options</h3>
    	<p>
    	<em>Members Only</em> can also protect your site's feeds either by requiring a user to be logged in, or using <em>Feed Keys</em>. <em>Feed Keys</em> are unique 32bit keys that are created for every user on your site. This allows each user on your site to access your feeds using their own unique URL, so you can protect your feeds whilst still allowing your users to use other methods, such as feed readers, to access your feeds. Your users can also find their <em>Feed Key</em> in their profile page, and you can allow them to reset their <em>Feed Keys</em> if you choose.
    	</p>
    	<table width="100%" <?php $wpversion >= 2.5 ? _e('class="form-table"') : _e('cellspacing="2" cellpadding="5" class="editform"'); ?> >
    		<tr valign="top">
    			<th scope="row">Feed Access</th>
    			<td><select name="feed_access" id="feed_access_inp"><?php echo $feedprotectionoptions ?></select></td>
    			<td><span style="color: #555; font-size: .85em;">Choose if Feeds are accessable, by using Feed Keys, User Login or Open Feeds to anyone.<br /></span></td>
    		</tr>
    		<tr valign="top">
    			<th scope="row">Require Feed Keys</th>
    			<td>
    				<input name="require_feedkeys" type="checkbox" id="require_feedkeys_inp" value="1" <?php checked('1', $optionarray_def['require_feedkeys']); ?>  />
    				</td>
    			<td><span style="color: #555; font-size: .85em;">Choose whether to always use Feed Keys even if user is logged in. <em>(Only applies if your using Feed Keys)</em></span></td>
    		</tr>
    		<tr valign="top">
    			<th scope="row">User Reset</th>
    			<td><input name="feedkey_reset" type="checkbox" id="feedkey_reset_inp" value="1" <?php checked('1', $optionarray_def['feedkey_reset']); ?> /></td>
    			<td><span style="color: #555; font-size: .85em;">Choose whether users can reset their own Feed Keys. <em>(Only applies if your using Feed Keys)</em></span></td>
    		</tr>
    	</table>
    	</fieldset>
    	<div class="submit">
    		<input type="submit" name="submit" value="<?php _e('Update Options') ?> &raquo;" />
    	</div>
    	</form>
    	</div>
Viewing 1 replies (of 1 total)
  • Thread Starter CaribWave

    (@caribwave)

    There is one issue, so far, I have found that I have not resolved, using WordPress 2.6.2, and that is the Feed Keys options, to reset etc., is not available in the users profile.

    Your users can also find their Feed Key in their profile page, and you can allow them to reset their Feed Keys if you choose.

Viewing 1 replies (of 1 total)

The topic ‘Members Only Plugin – Some Cleanup’ is closed to new replies.