Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Front End User Login Plugin (XML Or Database - ver: 3.0)
#1
User Login Plugin
Click Here To Download From Extend
View GitHub Repos.

Outline Of Plugin:
  • Users Can Register For An Account
  • Users Can Sign In And Logout
  • Pages Can Be Protected Via A Checkbox On Edit Page Screen
  • CSS For All Plugin Related Elements Can Be Edited Via Plugin Settings Page In Admin
  • Protected Page Message Can Be Edited Via WYSIWYG Editor In Plugins Settings Page - (The Protected Message is what shows up if the user is not logged in and is trying to view a protected page)
  • Features "Email All Users" form to easily send emails to all your site's users. The email form has fields for changing the "from address", "subject line", and ckeditor textarea to edit the message body. The message can contain html/css/js etc..
  • Expanded User Login Plugin Management via "Manage Users" page accessible through settings page. You can now add, edit, delete, and view all users.
  • An email is sent to the user upon them registering. It includes their username, password, and a link your website. The "From" Address can be edited from the plugins settings page (However, it can remain the default, noreply@yourdomain.com).

Instructions:

Step 1: Drag The contents of user-login.zip into the plugins folder

Step 2:Protect Desired Pages

Step 3: Include plugin functions in theme

Step 4: Go to the plugins settings page (User Management->Settings) and choose storage method if you plan on using a database


Below Are The Available Functions:
  • The Below Code Displays The Login Form
Code:
<?php echo show_login_box(); ?>
  • The Below Code Displays The Welcome Message & logout Link (Shown When User Is Logged In)
Code:
<?php echo welcome_message_login(); ?>
  • The Below Code Displays The Register Form
Code:
<?php user_login_register(); ?>


An Example Of Usage For The Innovation Theme:
In sidebar.php You will see I added the welcome message, login box, and register box (Looks Towards The Bottom of The Code).
Code:
<?php if(!defined('IN_GS')){ die('you cannot load this page directly.'); }
/****************************************************
*
* @File:             sidebar.php
* @Package:        GetSimple
* @Action:        Innovation theme for the GetSimple 3.0
*
*****************************************************/
?><aside id="sidebar">

    <div class="section" id="socialmedia" >
        <h2>Connect</h2>
        <div class="icons">
            
            <!-- Social Media URLs are set within this theme's settings plugin -->
            <?php if (defined('FACEBOOK')) { ?>
                <a href="<?php echo FACEBOOK; ?>"><img src="<?php get_theme_url(); ?>/assets/images/facebook.png" /></a>
            <?php } ?>
            <?php if (defined('TWITTER')) { ?>
                <a href="<?php echo TWITTER; ?>"><img src="<?php get_theme_url(); ?>/assets/images/twitter.png" /></a>
            <?php } ?>
            <?php if (defined('LINKEDIN')) { ?>
                <a href="<?php echo LINKEDIN; ?>"><img src="<?php get_theme_url(); ?>/assets/images/linkedin.png" /></a>
            <?php } ?>
            
            <img src="<?php get_theme_url(); ?>/assets/images/break.png" />
            
            <!-- addthis popup - you can add your username if you want analytics: http://www.addthis.com/help/customizing-addthis -->
            <div class="addthis_toolbox" style="display:inline;width:24px;" >
                <a href="http://www.addthis.com/bookmark.php?v=250" class="addthis_button_compact"><img src="<?php get_theme_url(); ?>/assets/images/share.png" /></a>
            </div>
            <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js"></script>
        </div>
        <?php echo welcome_message_login(); echo show_login_box(); ?>
        <?php user_login_register(); ?>
    </div>
    
    
    <!-- wrap each sidebar section like this -->
    <div class="section">
        <?php get_component('sidebar');    ?>
    </div>

    
</aside>

I appreciate any & all input & Suggestions!

In version 3.0 the plugin has been completely re-coded to allow for the future addition of paypal integration and custom fields.

IF THE AUTO DATABASE/DATABASE TABLE CREATE FAILS::
You will have to create them yourself.
Below is the SQL coding to create the table (Change 'db_table_name_on_settings_form' to the table name you chose on settings form)
Code:
CREATE TABLE `db_table_name_on_settings_form` (
                    userID INT NOT NULL AUTO_INCREMENT,
                    PRIMARY KEY(userID),
                    `Username` text,
                    `Password` text,
                    `EmailAddress` text
                    )
Reply


Messages In This Thread
Front End User Login Plugin (XML Or Database - ver: 3.0) - by mikeh - 2011-07-31, 09:01:25
Example site down, having issues - by Rich_K - 2012-11-14, 07:36:37
login box won't display - by horstuff - 2015-11-20, 04:57:25



Users browsing this thread: 3 Guest(s)