Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Front End User Login Plugin (MySQL) - Need Testers
#1
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:
  • 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!
Reply
#2
Installed your plugin on GS v2.01. Got the following errors:

Admin page only loads up to "Edit Register Box CSS"
Call to undefined function i18n_r() in /plugins/user-login/ckeditor.php on line 9

I commented out the function call and was able to load the admin page.

When attempting to save the admin settings:
Call to undefined function safe_slash_html in /plugins/user_login.php on line 235

I copied the actual safe_slash_html function to file, then got this error
Call to undefined function asXML() in /plugins/user_login.php on line 252

Is this plugin compatable with GS v2.01? Or am I missing something?
Reply
#3
infomantra Wrote:Installed your plugin on GS v2.01. .....

Is this plugin compatable with GS v2.01? Or am I missing something?

yes you missed something ;=)

There is no sense at all to develop plugins which are backwards-compatible to such old versions

go on and update, it is a task of 10 or 15 minutes and it is described in the wiki:
http://get-simple.info/wiki/installation:upgrade

we do suggest to update ANY installation to the most actual stable version
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
#4
Connie Wrote:
infomantra Wrote:Installed your plugin on GS v2.01. .....

Is this plugin compatable with GS v2.01? Or am I missing something?

yes you missed something ;=)

There is no sense at all to develop plugins which are backwards-compatible to such old versions

go on and update, it is a task of 10 or 15 minutes and it is described in the wiki:
http://get-simple.info/wiki/installation:upgrade

we do suggest to update ANY installation to the most actual stable version


Thanks Connie, you saved me some valuable time.

I haven't kept up with GS updates for a long time.
Reply
#5
infomantra Wrote:Installed your plugin on GS v2.01. Got the following errors:

Admin page only loads up to "Edit Register Box CSS"
Call to undefined function i18n_r() in /plugins/user-login/ckeditor.php on line 9

I commented out the function call and was able to load the admin page.

When attempting to save the admin settings:
Call to undefined function safe_slash_html in /plugins/user_login.php on line 235

I copied the actual safe_slash_html function to file, then got this error
Call to undefined function asXML() in /plugins/user_login.php on line 252

Is this plugin compatable with GS v2.01? Or am I missing something?

This plugin draft is for 3.0 and up. Sorry about that, I probably should have expressed the version.
Reply
#6
I installed on Getsimple 3.0 and followed all your instructions and it works flawless. I wanted to test it quickly so i took your sidebar.php code and replaced the default one in the innovation theme and haven't had any problems yet.
Reply
#7
usmandgreat Wrote:I installed on Getsimple 3.0 and followed all your instructions and it works flawless. I wanted to test it quickly so i took your sidebar.php code and replaced the default one in the innovation theme and haven't had any problems yet.

Great! Glad it worked for you. Any suggestions or requests? On the site I made this for, It uses a paypal (IPN) script that only creates the users account once payment was succesfully made. Would anyone be interested in that?
Reply
#8
Can the protected pages be associated with certain users or groups of users? Also, I'm waiting for the XML backend to be finished before giving this a spin.
Reply
#9
polyfragmented Wrote:Can the protected pages be associated with certain users or groups of users? Also, I'm waiting for the XML backend to be finished before giving this a spin.

As of now there are no groups within users, they are stored in a database in the same mannor.
I will get started on the XML Backend, It didn't seem like there was muc interest in this plugin so I did not want to waste time.
Reply
#10
mikeh Wrote:As of now there are no groups within users, they are stored in a database in the same mannor.
Does that mean that protected pages can be associated with single users then? I'm still unsure about that aspect.
Reply
#11
polyfragmented Wrote:
mikeh Wrote:As of now there are no groups within users, they are stored in a database in the same mannor.
Does that mean that protected pages can be associated with single users then? I'm still unsure about that aspect.

At the moment no. All pages are protected the same way for all users.
However, It would not be too hard to allow for custom permissions, I might add that into the final plugin.
Reply
#12
Dear mikeh i love your plugin, i edited it a bit: http://get-simple.info/forum/topic/2708/...ser-login/

and i edited this part:

[Image: 2dvlkzp.jpg]

The public only and member only part is added because i edited the menu system so i can show menus to everyone if they the page is set to everyone, or show menu item only to members or only non registred users (like the register page)!
Reply
#13
thank you!
Reply
#14
rigor789 Wrote:Dear mikeh i love your plugin, i edited it a bit: http://get-simple.info/forum/topic/2708/...ser-login/

and i edited this part:

[Image: 2dvlkzp.jpg]

The public only and member only part is added because i edited the menu system so i can show menus to everyone if they the page is set to everyone, or show menu item only to members or only non registred users (like the register page)!

Thanks for the edits! Just want to make sure you know this is the MySQL version and there is a more updated version which uses xml files
Reply
#15
mikeh Wrote:Thanks for the edits! Just want to make sure you know this is the MySQL version and there is a more updated version which uses xml files

Ofcourse i know Wink I'm developing my own user system based on this (hope it's not a problem) It's changed almost 100%! Here are some pics:

User managment Admin Panel:
[Image: 978thv.jpg]
[Image: e18b4p.jpg]

If you click on the icons you can activate/deactivate an account or ban/unban! Smile

Edit User (When clicking on the username):
[Image: 334ix41.jpg]

Newsletter part:
[Image: dbnqj6.jpg]

Settings Panel:
[Image: 33c9dtf.jpg]
Reply




Users browsing this thread: 1 Guest(s)