Some changes...

Adds complete user authorization to Roster

Moderator: mdeshane

Some changes...

Postby mdeshane » Sun Nov 25, 2007 2:43 am

Alright, I've been looking at my code, and it's a bit of a mess and isn't quite doing what I want it to as far as session data. So, now I'm deciding whether I want to re-write the login/session part of the accounts class. Currently it doesn't really have any kind of session handling and uses a standard login system. I think I may write a seperate login class and a seperate session handler class.

Should I do a massive re-write or should I just cleanup what I have and make it work. I've been looking at session handler classes, and have decided that a session handler using the db might provide more security. More security is generally worth a re-write in my opinion.

Other than that I've switched around the index and user pages, cause it makes more sense to have the index.php doing display things and the user.php do data related things. Also, I dumped the user, guild, and realm directories and the files in them. I decided that user.php and index.php could handle everything that would have been in those 3 directories.

Once I get a few more things cleaned up and get more of the plugin framework built I'll make an SVN update. In the mean time feel free to let me know what you think!

I've also noticed that the custom menu pane no longer shows up. Is that because of the recent changes made to roster? Also, I keep getting the a=g:2 anchor tag added to most links in the addon.
Last edited by mdeshane on Mon Nov 26, 2007 10:52 am, edited 1 time in total.
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

Some changes...

Postby mdeshane » Fri Nov 30, 2007 5:50 am

Everyone ignore my previous post! With the changes to Roster I will now re-write the user/login class to use a modified form of the RosterLogin class. I may add some session handling in but I'm still unsure of how well it will work in Alternative URLs mode.

While I'm at it, I'll also be adding a pages directory which will contain the accounts pages. I decided that it's probably the easiest solution to make the addon work with the Alternative URLs mode on. Since I can't get the $_GET variables to read properly when it is on.

I may make other on-the-fly changes to make the addon do what it's intended to. Also, I'll be figuring out what the Auth Plug-in system will need to work with various CMS', so far I figure it will need a user table, a group table, the user and pass columns, the group id column and anything else a CMS would have in it's basic auth system.

Hopefully when it's all said and done, you'll be able to add a file to the inc\plugins directory and the addon will work as an interface between RosterAuth and the CMS Auth.

** Anyone that would like to help by providing me with information on a CMS Auth system (user tables, column names, group tables, etc.), please don't hesitate to post or send me a message. It will help me know what others will need to make a plugin.**
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

Some changes...

Postby zanix » Fri Nov 30, 2007 10:29 am

What $_GET variables are you trying to read?
Give me an example url
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Some changes...

Postby mdeshane » Fri Nov 30, 2007 11:09 am

I need $_GET['fct']

www.yoursite.com/roster/index.php?p=util-accounts-index&fct=login


which comes out as

www.yoursite.com/roster/util/accounts/index&fct=login.html


unless comming from another util page, which adds another util/

in Alternative URL mode. For some reason I can't the $_GET variable in alt url mode, but it works fine otherwise.
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

Some changes...

Postby zanix » Fri Nov 30, 2007 12:35 pm

Weird

The second link isn't going to work because thre is no request uri since it has to start with ?
In alt url mode, that url should be
www.yoursite.com/roster/util/accounts/index/fct=login.html


We inject all the key=>value pairs in this url mode directly into $_GET
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Some changes...

Postby PleegWat » Fri Nov 30, 2007 4:46 pm

You are passing the wrong thing to makelink(). You should pass links entity_encoded.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Some changes...

Postby mdeshane » Fri Nov 30, 2007 11:07 pm

If I were to use makelink('util-accounts-index-login') would I be able to get the login part using $roster->pages[3] and cut out the use of $_GET all together? I just thought of doing it that way after seeing the roster index and how it uses $roster->pages[0] to get the scope.

I've tried passing the links entity_encoded, but it either can't find the page or sits and loads forever, then can't find the page.
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

Some changes...

Postby PleegWat » Fri Nov 30, 2007 11:46 pm

You can.

Assuming addons/accounts/login.php does not exist you can also use makelink('util-accounts-login') and check $roster->pages[2]. This would then shorten the url a bit more.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Some changes...

Postby mdeshane » Sat Dec 01, 2007 12:19 am

I've decided to put the template system to good use, so I'll just have index.php and style.css, so it should work perfectly! Thank you! I'll make the changes and post the results.
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US

Some changes...

Postby mdeshane » Sat Dec 01, 2007 1:32 am

Great news! I've made some changes, and the addon seems to be working perfectly with and without SEO URLs. I had problems with re-directs in the permission function, but adding an if statement checking the seo_url config helped fix it. Now I just need to build all the templates and some of the php for them.
Image
Accounts Addon - Roster v2 User Account Addon

PKC Dev Site - http://dev.pkcomp.net
My Roster Dev Site - http://myroster.dontexist.net
User avatar
mdeshane
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 204
Joined: Sun Dec 10, 2006 4:54 am
Location: Grand Rapids, MI USA
Realm: Khadgar (PvE) - US


Return to Accounts

Who is online

Users browsing this forum: No registered users and 0 guests

cron