2011-07-01, 08:01:15
I had created a simple user login system for a getsimple website of mine and decided to convert it into a plugin to release in the extend.
Before I upload it to extend I would like some testers so I can resolve any errors and revise it.
(The Plugin Is Attached To This Post)
The system uses MySQL right now, in the future there will be the option to choose xml or MySQL.
Outline Of Plugin:
The Installation Should Actually Be Very Easy For The Semi-Experienced..
Instructions:
Step 1: Create a database and assign a username and password to it.
Step 2: Open PHPMyAdmin (Or whatever interface you have available to edit a database) And Create A table with the following 4 columns:
You can use the below SQL Query To Make It Easier:
Step 3: Drag The contents of user-login.zip into the plugins folder
Step 4: Fill In Database Information Into User Log Settings (In Admin Panel go to Settings->User LogiN Settings)
Step 5:Include The Functions In Your Theme's Template File
Below Are The Available Functions:
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).
I appreciate any & all input & Suggestions!
Before I upload it to extend I would like some testers so I can resolve any errors and revise it.
(The Plugin Is Attached To This Post)
The system uses MySQL right now, in the future there will be the option to choose xml or MySQL.
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)
The Installation Should Actually Be Very Easy For The Semi-Experienced..
Instructions:
Step 1: Create a database and assign a username and password to it.
Step 2: Open PHPMyAdmin (Or whatever interface you have available to edit a database) And Create A table with the following 4 columns:
- UserID (Primary Key)
- Username
- Password
- EmailAddress
You can use the below SQL Query To Make It Easier:
Code:
CREATE TABLE `users` (
`UserID` INT(25) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`Username` VARCHAR(65) NOT NULL ,
`Password` VARCHAR(32) NOT NULL ,
`EmailAddress` VARCHAR(255) NOT NULL
);
Step 3: Drag The contents of user-login.zip into the plugins folder
Step 4: Fill In Database Information Into User Log Settings (In Admin Panel go to Settings->User LogiN Settings)
Step 5:Include The Functions In Your Theme's Template File
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!