SMF Bridge in testing

Simple Machines Forum integration forum

SMF Bridge in testing

Postby Haiduk » Thu Nov 23, 2006 4:34 am

I have been working on a nice solid SMF bridge with WoW Roster. I need some feedback from those of you actually running SMF. I need to know, what you are all looking for.

To me, a bridge should not modify the original code, or atleast use as few modifications as possible. There are a few problems with "bridging" with WoW Roster that I can see. As of version 1.7.1 I don't see much of a "user" system other than the simple admin login password. In order to implement, it requires modifications to several of the original scripts. When new versions of WoW Roster are released, it all starts over with a new coding up a new "bridge."

Most of the bridging can be handled by modifying the Login.php script. Basically load up the SMF environment to find out what user is logged into SMF and access the SMF permissions for that user. From there there are several WoW Roster scripts that need to be modified to actually make use of the SMF permissions.

Login.php: Load up the SMF environment and gather permission information about the currently logged in user.

Update.php: Replace the "password" login with an SMF permissins check.

Admin.php: Replace the "password" login with SMF permissions check.

Menu.php: Show/Hide relevant menu options based on SMF permissions.

Some of the inital problems. SMF and WoW Roster share some of the same global variables for the Database connection. Not really an issue if they they both share the same Database, but if they are on seperate databses, it is an issue.

Basically, what I came up with was 3 new SMF permissions:
- View Roster (so you can deny specific member groups permission to view your guilds roster.)
- Admin Roster (give permission to member groups to be able to change the settings on the roster)
- Update Guild (gives permission to your guilds officers to be able to update the guilds roster.)

Added an SMF Bridge file that does nothing more than figure out which user is currently viewing the WoW Roster and retrieves the permissions for that user.

Had to make a few changes to the following files:
roster/update.php (removed the password box for users with update permission.)
roster/index.php (passwords are not needed since were using a bridge)
roster/lib/menu.php (hides the Roster Config button for non admins)
roster/lib/login.php (modifies the RosterLogin class to use the new SMF permissions)

Added new files to SMF:
sources/Roster.php (WoW Roster is called with ?action=roster from SMF)
Themes/default/Roster.template.php (sets up a dynamic iframe to view WoW roster within your SMF theme)

Modified Files in SMF:
index.php (added the ?action=roster subcommand)
Themes/default/index.template.php (added a new navigation link to "Roster")
sources/ManagePermissions.php (added new permissions)
Themes/default/languages/Modifications.english.php (describes the new permissions and shows others "<user> is viewing the guild roster.")

The bridge reads cookies from the users browser (like smf does) to see if the current user is actually logged in. If those cookies are not found the bridge defaults WoW Roster back to normal operation (with the password boxes, etc.)


This "Bridge" is for a fresh installation ONLY. It modifies some of the install files. It does eliminate the "password login" from most of the pages and uses SMF permissions in its place, BUT it still allows you to set an admin password in those cases where it cannot find a logged in user or cannot for whatever reason load the SMF environment. You should still set a password just in case.



Install Steps:
1) Extract the wow roster package to a folder on your local harddrive.

2) IMPORTANT!!!: FTP the wow roster contents to a folder named 'roster" to a folder WITHIN your SMF folder. (must be all lower case for the package installer to find the wow roster folder)
<root>/<forum>/roster

3) upload the SMF_Bridge.zip through the SMF package manager. This should set up a "Guild Roster" tab on the default theme and it also addds the new SMF permissions for WoW Roster.

4) The package manager makes the changes to the WoW Roster files to incorporate the bridge and starts the (modified) install.php from the WoW Roster package.

5) Once you get to the "you need to delete the install folder, install.php, and update.php" you can simply click the new "Guild Roster" tab in the default theme and the bridge will delete those for you. (or you can delete them manually).

6) Set up your guild settings and upload your inital guild roster.

7) Check the "Can View Guild Roster" permission for all member groups you want to be able to view the roster page.

It is always a good idea to test out new mods and new software on a local test site, never on a live board. Always back everything up before installing anything new.
Attachments
wow_roster_smf_bridge_fresh_install_1.7.1.0.8.zip
Pseudo Bridge for SMF integration with WoW Roster.
(56.98 KiB) Downloaded 535 times
Last edited by Haiduk on Thu Nov 23, 2006 4:38 am, edited 2 times in total.
User avatar
Haiduk
WR.net Apprentice
WR.net Apprentice
 
Posts: 11
Joined: Mon Nov 20, 2006 10:07 am

Re: SMF Bridge in testing

Postby Haiduk » Thu Nov 23, 2006 4:45 am

Some things that I plan to change and add to the SMF bridge:

- Another SMF permission for "Can Upload Character Data" Would allow the roster to be viewed by guests but not allow them to upload character data (added security).

- Add a user settings page. So the individuals can set their own display options. Some users may want to only show what they are wearing, but not their mailbox, bank and inventory contents. This page would allow each user to setup what is actually displayed about their character(s) on the roster page.

- Admin settings Page in SMF itself. From this page, the admin can modify how WoW Roster is displayed. Like use a dynamic iframe (as it is now), or display as a full page. Also the admin should be able to display and modify the individual features of WoW Roster (which buttons are shown etc.)

Please offer suggestions and ideas that will improve this bridge package. I am completely open to suggestions.
Last edited by Haiduk on Thu Nov 23, 2006 4:46 am, edited 1 time in total.
User avatar
Haiduk
WR.net Apprentice
WR.net Apprentice
 
Posts: 11
Joined: Mon Nov 20, 2006 10:07 am

SMF Bridge in testing

Postby zanix » Thu Nov 23, 2006 6:20 am

Nice stuff
I do hope your are still around for Roster 1.8 which will have a user auth system that should be replaceable to work with other CMS's
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

Re: SMF Bridge in testing

Postby Haiduk » Thu Nov 23, 2006 12:26 pm

zanix wrote:Nice stuff
I do hope your are still around for Roster 1.8 which will have a user auth system that should be replaceable to work with other CMS's


Aye, I mostly built this bridge as a temporary workaround. Hopefully more can be done within a bridge itsself and not have to mod any of the original files. That would be perfect. Kinda hoping 1.8 has a functional user system with different permission settings with all of their functionality throughout WoW Roster. I would be more than happy to help where I can.
User avatar
Haiduk
WR.net Apprentice
WR.net Apprentice
 
Posts: 11
Joined: Mon Nov 20, 2006 10:07 am

SMF Bridge in testing

Postby zanix » Thu Nov 23, 2006 2:24 pm

That's the goal
We'd appreciate any and all help to improve this community
Last edited by zanix on Thu Nov 23, 2006 2:25 pm, edited 1 time in total.
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

Re: SMF Bridge in testing

Postby Golin » Thu Nov 23, 2006 2:58 pm

As we are a multi-guild alliance I currently use the 'public' roster, loading it in a dynamic Iframe. I use SMF's custom actions addon and Tiny Portal's menu. No guests are allowed on the site, thus avoiding some security problems.

Different guilds are different usergroups in SMF (all with the same rights). Could you make the SMF permissions so that it will allow players from different guilds to upload their char's to the roster? I'm not sure if Roster will allow this in the first place btw.
Last edited by Golin on Fri Nov 24, 2006 6:58 am, edited 1 time in total.
User avatar
Golin
WR.net Apprentice
WR.net Apprentice
 
Posts: 10
Joined: Thu Jul 27, 2006 3:54 pm

Re: SMF Bridge in testing

Postby Haiduk » Fri Nov 24, 2006 11:34 am

it is possible, but not without modifying the original WoW Roster code. As it is now, WoW roster only updates those uploaded characters that have the same "Guild" tag in their data.

I suppose the update.php file could be modified to allow character from a member of a list of guilds. Thats certainly doable.

I hesitate to do much modifications to the original wow roster code mainly because upcoming patches will break those mods. Personally I'd much rather wait and see if those features are part of 1.8. Hopefully a functional permission system with a user base.

anyway back to your original idea of including characters from a list of guilds rather than just one. Either a new page would have to be made to configure what guilds were allowed to upload character data, or it could simply be an included file with those guilds listed.

Let me mess around with this idea some and see what I can come up with.

EDIT: Aye, after a cursory look through the original scripts I found a few places that would need to be modified. Almost every function in wowdb.php that reads data that originally comes from the lua files would have to have their database queries modifed to select from a list of guilds rather than just one. (LOTS of changes to original scripts)

Also the Update.php would have to be modified some.

Not really an "easy" fix. Note this is not an actual code fix, but just some of my inital thoughts about what the modding process would go like.

basically every place you see
Code: Select all
$querystr = "SELECT * FROM `".ROSTER_GUILDTABLE."` WHERE `guild_name` = '$guild_name_escape' AND `server` = '$server_escape'";

any any varients of this would be changed to something like
Code: Select all
require(ROSTER_BASE.'guild_list.php');
$guilds='(\''.implode('\',\'',$guild_list).'\')';
$querystr = "SELECT * FROM `".ROSTER_GUILDTABLE."` WHERE guild_name IN $guilds AND `server` = '$server_escape'";


This doesn't include all of the "UPDATE" queries that update while indexing a specific guild_id. When its all said and done, with a multiple guild listing, you might even be better off creating a new table altogether to hold the info for each of the allowed guilds. Basically changing the majority of the queries throughout all of wow roster.

Perhaps an idea to post as a "feature request".

For one guild that I maintain their website for, they have asked to have a "guild roster" as well as a "raid roster' (which includes characters from other guilds). This could be a project I could tackle in the near future.

The thing is, if I were to tackle a project of this scope, I would implement a full blown CMS capable user system with permissions simply because it would end up being cleaner and more user configurable code in the process, but the mods would be destroyed with each new version of wow roster. Hence the desire to wait to see what 1.8 has in store for us.

(lol sorry for another novelette post)
Last edited by Haiduk on Fri Nov 24, 2006 12:40 pm, edited 2 times in total.
User avatar
Haiduk
WR.net Apprentice
WR.net Apprentice
 
Posts: 11
Joined: Mon Nov 20, 2006 10:07 am

Re: SMF Bridge in testing

Postby Haiduk » Fri Nov 24, 2006 1:20 pm

Umm.. .okay I feel like a dumb ass. I just reread your post and noticed this:

Golin wrote:I currently use the 'public' roster


Seems the legwork has been done for the most part. It's getting late here. I will download and take a look at the 'public' roster tomorrow sometime (or when I get the time to mess with it. Should be fairly simple to just add new SMF permissions using that mod.

Maybe even a "settings" page within SMF itself to cofigure "features" of WoW Roster. Maybe that should go within WoW Roster?

Actually it might not be a bad idea to simply add a new SMF permission, something like "Can update characters regardless of guild". Perhaps when this permission is set, the user is promted with a list of characters with check boxes so they can select which characters they want updated. I dunno, just a thought.
Last edited by Haiduk on Fri Nov 24, 2006 1:30 pm, edited 4 times in total.
User avatar
Haiduk
WR.net Apprentice
WR.net Apprentice
 
Posts: 11
Joined: Mon Nov 20, 2006 10:07 am

SMF Bridge in testing

Postby PleegWat » Fri Nov 24, 2006 3:34 pm

Multiguild and a full auth system will be in 1.8. The auth system has been designed to fit entirely in a single file, so creating an auth bridge using SMF's auth should be possible.
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

SMF Bridge in testing

Postby zanix » Fri Nov 24, 2006 3:57 pm

Roster 1.8 will be multi-guild / no-guild capable with a user auth system

We are adding some big features

Currently, the alpha builds of 1.8 allow uploading and updating multiple guilds, although you can only view the main guild at this point
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

SMF Bridge in testing

Postby Haiduk » Sat Nov 25, 2006 3:08 am

Sounds like waiting for 1.8 is a good idea then. This bridge I made for version 1.7.1 feels like such a hack. but it works.

Any chance I could get ahold of whats done with 1.8 so I can get started on an SMF bridge so it would be ready by release?
User avatar
Haiduk
WR.net Apprentice
WR.net Apprentice
 
Posts: 11
Joined: Mon Nov 20, 2006 10:07 am

SMF Bridge in testing

Postby zanix » Sat Nov 25, 2006 7:21 pm

Well, it's not quite ready for any type of beta testing

We are planning on expanding our beta testing to the public instead of invite only starting with version 1.7.2
So you'll get a chance to get a hold of 1.8 when it hits beta
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

Re: SMF Bridge in testing

Postby Haiduk » Thu Nov 30, 2006 12:49 pm

ill definately be all over that. would be nice to have a solid, fully tested SMF bridge ready for 1.8 when a full release version is released.
User avatar
Haiduk
WR.net Apprentice
WR.net Apprentice
 
Posts: 11
Joined: Mon Nov 20, 2006 10:07 am

SMF Bridge in testing

Postby Golin » Thu Nov 30, 2006 5:32 pm

Can't wait untill it's there! That combined with TinyPortal and you have a great combo for any guild to build it's website on. Btw, while at it could you make an eqdkp integration as well? /jk Just kiddin, this is great already.
User avatar
Golin
WR.net Apprentice
WR.net Apprentice
 
Posts: 10
Joined: Thu Jul 27, 2006 3:54 pm

SMF Bridge in testing

Postby Cismani » Sun Dec 10, 2006 10:39 pm

SMF, and tiny portal addin = Very very useful for me....

*sits on a bench and waits*
Cismani
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Fri Aug 11, 2006 4:30 pm

Next

Return to SMF

Who is online

Users browsing this forum: No registered users and 0 guests

cron