GetSimple Support Forum
Front End User Login Plugin (MySQL) - Need Testers - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: Front End User Login Plugin (MySQL) - Need Testers (/showthread.php?tid=1905)



Front End User Login Plugin (MySQL) - Need Testers - mikeh - 2011-07-01

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!


Front End User Login Plugin (MySQL) - Need Testers - infomantra - 2011-07-13

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?


Front End User Login Plugin (MySQL) - Need Testers - Connie - 2011-07-13

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


Front End User Login Plugin (MySQL) - Need Testers - infomantra - 2011-07-13

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.


Front End User Login Plugin (MySQL) - Need Testers - mikeh - 2011-07-14

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.


Front End User Login Plugin (MySQL) - Need Testers - usmandgreat - 2011-07-20

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.


Front End User Login Plugin (MySQL) - Need Testers - mikeh - 2011-07-21

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?


Front End User Login Plugin (MySQL) - Need Testers - polyfragmented - 2011-07-21

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.


Front End User Login Plugin (MySQL) - Need Testers - mikeh - 2011-07-21

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.


Front End User Login Plugin (MySQL) - Need Testers - polyfragmented - 2011-07-21

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.


Front End User Login Plugin (MySQL) - Need Testers - mikeh - 2011-07-21

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.


Front End User Login Plugin (MySQL) - Need Testers - rigor789 - 2011-10-12

Dear mikeh i love your plugin, i edited it a bit: http://get-simple.info/forum/topic/2708/some-changes-made-to-frontend-user-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)!


Front End User Login Plugin (MySQL) - Need Testers - Johonwayni - 2011-10-19

thank you!


Front End User Login Plugin (MySQL) - Need Testers - mikeh - 2011-10-19

rigor789 Wrote:Dear mikeh i love your plugin, i edited it a bit: http://get-simple.info/forum/topic/2708/some-changes-made-to-frontend-user-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


Front End User Login Plugin (MySQL) - Need Testers - rigor789 - 2011-10-29

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]