SMFSync svn[14]

Sync your member list to Simple Machines Forum

Moderator: boyo

SMFSync svn[14]

Postby boyo » Tue Sep 18, 2007 1:25 pm

SMFSync beta svn[14] for Roster 2.0 Beta


I couldnt find a solution for syncing my members list to SMF, so I wrote my one, and wanted to share with the community.

What does this do?
-Create a member group for each rank in your guild.
-Put your members into the group which they belong in on a guild update.
-Set your users avatar to what you want (designed for use with siggen)
-Set your users signature to what you want (again, designed for use with siggen)
-Suspend a users account on seperation from your guild, on guild update.
-Set your users "Location" to either the members Hearth or Zone (selectable, on player update, designed to work in conjunction with Armorysync)
-Set the users Personal Text to their guild note, on guild update.

Other important things-
-The addon does not enable itself by default, you need to go thru the settings and turn on what you want on. It is set by default to use guild 1, but can be changed.
-When the option to manage groups is turned on, it will not put members in the group if it hasnt been created yet. It will take two guild uploads to get it running 100%.
-Create groups turns itself off after a successful run so it's not trying to create them, causing excess queries on every guild update. Just turn it back on if your ranks change and run a guild update
-This only works with Roster 2 beta

Help me out by testing it, and reporting back any bugs you may encounter.
Locale translations are welcomed.

Boyo.
boyo
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Wed Jan 24, 2007 7:37 am

SMFSync svn[14]

Postby Anaxent » Tue Sep 18, 2007 1:48 pm

hmm.... This is great smf is a awesome forums product and i like the fact that you realize the ability's of roster 2.0 and it's addon system(if only we had a user auth system...intime is all I have to say unless some on wants to build an addon for one).
User avatar
Anaxent
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 642
Joined: Tue Jul 04, 2006 6:27 am
Location: Phoenix, Az

SMFSync svn[14]

Postby Suzzanne » Mon Sep 24, 2007 5:56 pm

im gunna try this out does it work with PHP nuke ? or phpBB ?
Image
Image
Image
User avatar
Suzzanne
WR.net Apprentice
WR.net Apprentice
 
Posts: 25
Joined: Mon Aug 14, 2006 2:37 pm

SMFSync svn[14]

Postby zanix » Tue Sep 25, 2007 12:38 am

It's for SMF
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

SMFSync svn[14]

Postby whatchamccallum » Sat Oct 13, 2007 4:07 am

I would love this but can't seem to get it setup correctly. When I enable the addon I start to get error messages when I try and update profiles


Parse error: syntax error, unexpected '(', expecting '}' in blah/blah/www/roster/addons/smfsync/inc/update_hook.php on line 130

I'm using SMF 1.1.4
Last edited by whatchamccallum on Sat Oct 13, 2007 4:08 am, edited 1 time in total.
whatchamccallum
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Sat Feb 10, 2007 7:52 am

SMFSync svn[14]

Postby boyo » Sat Oct 13, 2007 7:24 am

Hrm... i'll look into that..
boyo
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Wed Jan 24, 2007 7:37 am

SMFSync svn[14]

Postby boyo » Sat Oct 13, 2007 8:14 am

Ok, try the version I just uploaded, and let me know...
boyo
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Wed Jan 24, 2007 7:37 am

SMFSync svn[14]

Postby whatchamccallum » Tue Oct 16, 2007 5:50 am

with 271 I get hit with the same thing but different line

I click on the update profile button and it's followed with

Parse error: syntax error, unexpected '(', expecting '}' in /home/havoc/public_html/roster/addons/smfsync/inc/update_hook.php on line 215
whatchamccallum
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Sat Feb 10, 2007 7:52 am

SMFSync svn[14]

Postby boyo » Tue Oct 16, 2007 7:05 am

Ok, that line reads:
214: $query = "UPDATE `{$this->data['config']['forum_prefix']}members` SET `personalText` =
215: '{$roster->db->escape($data['Note'])}' WHERE `memberName` = '{$data['Name']}' LIMIT 1 ;";

The only thing I can think is it has something to do with the $roster->db->escape. What version of roster are you using?

The only other thing I can think is to remove the line break in it, which was put there simply to make it easier to read, but shouldn't affect the functionality.

Is it generating a roster error? Can you post the log.
Also, can you post or pm the section of the sql query for /addons/smfsync/inc/update_hook.php It could possibly be something in the sql that your site is generating.

Other then that i'm absolutely stumped.
boyo
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Wed Jan 24, 2007 7:37 am

SMFSync svn[14]

Postby whatchamccallum » Tue Oct 23, 2007 2:36 am

Currently using SMFSync v1.9.9.271
and Roster v1.9.9.1389
Running SMF 1.1.4
with TinyPortal v0.9.8

in the roster error log I am getting the following error message
[22-Oct-2007 13:32:01] PHP Warning: Zend Optimizer does not support this version of PHP - please upgrade to the latest version of Zend Optimizer in Unknown on line 0

I'm running php 4.4.7 Zend Engine v1.3.0

Also, can you post or pm the section of the sql query for /addons/smfsync/inc/update_hook.php It could possibly be something in the sql that your site is generating.

I'm at a loss on how I would get this for you.


I've got my host checking their zend version to see if they can upgrade to get rid of these error messages.
Last edited by whatchamccallum on Tue Oct 23, 2007 2:54 am, edited 1 time in total.
whatchamccallum
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Sat Feb 10, 2007 7:52 am

SMFSync svn[14]

Postby whatchamccallum » Tue Oct 23, 2007 3:05 am

alright Host updated zend so I'm not getting any errors in error_log anymore.
whatchamccallum
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Sat Feb 10, 2007 7:52 am

SMFSync svn[14]

Postby whatchamccallum » Tue Oct 23, 2007 3:09 am

removing the line break didn't do anything but change the error to line 214
whatchamccallum
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Sat Feb 10, 2007 7:52 am

SMFSync svn[14]

Postby whatchamccallum » Tue Oct 23, 2007 3:38 am

Well I commented out line 214 and 215 and the rest works just fine. I ran it and got to go straited out my SMF forum permissions =) upset a few officers removing their permissions LOL..

This is really cool. Not sure what the issue is with that line but I'm not worried about setting the personal Text

Another addition I would consider is instead of doing the strait up suspend with the removal of passwords and stuff just have it change their group to nonMember but still allow the ability to log into the site.

For anyone else it looks like the suspend section is on line 318. I'm just changing this so it will just change the group the end user is in.
Last edited by whatchamccallum on Tue Oct 23, 2007 3:47 am, edited 2 times in total.
whatchamccallum
WR.net Apprentice
WR.net Apprentice
 
Posts: 7
Joined: Sat Feb 10, 2007 7:52 am

SMFSync svn[14]

Postby boyo » Tue Oct 23, 2007 4:22 am

That sounds like a great idea, I'll take a look into integrating that and giving the option of either suspending the account completely, or just changing the group.

Just as a note, I still need to do some more testing on the protected group.

I have updated it to use the built in update check now and on the next upload that should take effect.

What I was asking for about the sql query, was when you run the update, in the debug data there will be a thing for that file, and I was wanting the query from that. I'm interested mainly in that line that's causing the problem. I will play with this a little bit more when I get a chance and see what I can come up with as to why it might be doing this.

What version of PHP are you running? And with Zend, i've had problems from my host before about that too, it's a royal pain to try to get a hosting company to do something too..
boyo
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Wed Jan 24, 2007 7:37 am

Re: SMFSync svn[14]

Postby boyo » Wed Oct 24, 2007 1:48 am

Alright, I finally figured out the unexpected '(', expecting '}'. It's a problem with php4. Now that i've figured out the problem, i'm going to work on a solution.

I fixed it, it was definitly the $roster->db->escape inside the sql query.
Here's the fix:
Code: Select all
214:               $Note = $roster->db->escape($data['Note']);
215:               $query = "UPDATE `{$this->data['config']['forum_prefix']}members` SET `personalText` =
216:                        '{$Note}' WHERE `memberName` = '{$data['Name']}' LIMIT 1 ;";
Last edited by boyo on Wed Oct 24, 2007 1:51 am, edited 1 time in total.
boyo
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 103
Joined: Wed Jan 24, 2007 7:37 am

Next

Return to SMFSync

Who is online

Users browsing this forum: No registered users and 0 guests

cron