Sync Roster with a phpBB group

phpBB integration forum

Sync Roster with a phpBB group

Postby robweeks » Sat Feb 03, 2007 10:55 am

The button will keep its current functionality.

The reason being is that when you upload the new Guild data, a member may not have created his profile yet on phpbb. So when he does, you wont have to re-upload. Just click the button.

Or, i could just remove the button totally, and have it all done via triggers? hummm
ImageImage
robweeks
WR.net Apprentice
WR.net Apprentice
 
Posts: 45
Joined: Tue Jul 04, 2006 8:17 pm

Sync Roster with a phpBB group

Postby Anaxent » Sat Feb 03, 2007 12:16 pm

Triggers is the way to go! If at all possiable build a small admin panel for selecting between the diffrent groups that are avaliable and match them group upto guild ranks then have the triggers do all the updating.
User avatar
Anaxent
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 642
Joined: Tue Jul 04, 2006 6:27 am
Location: Phoenix, Az

Sync Roster with a phpBB group

Postby robweeks » Mon Feb 05, 2007 5:43 am

At this moment in time i can be bothered making a menu, i can only see triggers being viable in the current beta release of Roster.

Think i will wait till its out of beta before developing it.

need 70! im only 63!
ImageImage
robweeks
WR.net Apprentice
WR.net Apprentice
 
Posts: 45
Joined: Tue Jul 04, 2006 8:17 pm

Sync Roster with a phpBB group

Postby PleegWat » Mon Feb 05, 2007 10:58 am

There are triggers in the current version of roster, there are just a couple of extra ones in the new version.
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

Sync Roster with a phpBB group

Postby robweeks » Mon Feb 05, 2007 11:41 am

Correct: i want those extra triggers, mainly 'pre-guild', in order to clear the tables of members before adding in the new ones
ImageImage
robweeks
WR.net Apprentice
WR.net Apprentice
 
Posts: 45
Joined: Tue Jul 04, 2006 8:17 pm

Bug

Postby Kaite » Tue Feb 20, 2007 11:11 pm

Not sure if anyone else has found this yet, but there is a bug in index.php.

index.php
Code: Select all
      echo 'Removing all members...<br>';
      // now check for users
      $sql = "DELETE FROM " . $table_prefix . "user_group WHERE group_id = ".$phpbb_defaultGroup;
      
      if ($roster_conf['sqldebug']) {
         echo "\n<!-- $sql -->\n";
      }
      $result = $db_phpbb->sql_query($sql) or die(mysql_error());   


      // Now remove all the custom groups
      foreach( $phpbb_rankGroupMappings as $key => $value){
         $sql = "DELETE FROM " . $table_prefix . "user_group WHERE group_id = ".$value;
         $result_char = $wowdb->query($sql);
      }         


The first section "removing all members" is correct. The 2nd section, "Now remove all custom groups" has an error.

index.php, line 57:
Code: Select all
         $result_char = $wowdb->query($sql);


This attempts to remove clear out the existing group information in the phpbb database. As you can see, $wowdb is NOT the phpbb database. Change line 51 to this to fix it.

FIXED index.php, line 57:
Code: Select all
         $result_char = $db_phpbb->sql_query($sql);


Without this fix, the code never removes ranked members from their special group and the group table will grow larger every time you run an update.
Kaite
WR.net Apprentice
WR.net Apprentice
 
Posts: 10
Joined: Fri Nov 17, 2006 2:49 am

Re: Bug

Postby Kaite » Tue Feb 20, 2007 11:12 pm

Ok I feel I did my part......

......so when do I get auto triggers on guild update? =)
Kaite
WR.net Apprentice
WR.net Apprentice
 
Posts: 10
Joined: Fri Nov 17, 2006 2:49 am

Sync Roster with a phpBB group

Postby robweeks » Wed Feb 21, 2007 9:54 am

haha cool, thanks m8, missed that :)

Started to re-write it, but came into problem when trying to access the conf.php file from the trigger... then i got bored :P

EDIT: Although there is an error, the removal of custom groups works fine for me, only coz there in the same database
Last edited by robweeks on Wed Feb 21, 2007 11:28 am, edited 2 times in total.
ImageImage
robweeks
WR.net Apprentice
WR.net Apprentice
 
Posts: 45
Joined: Tue Jul 04, 2006 8:17 pm

Re: Sync Roster with a phpBB group

Postby Kaite » Wed Feb 21, 2007 10:44 pm

Yeah this problem only pops up if you keep separate phpbb and roster databases (like I do.....because I'm compulsive and everything needs its own special place).
Kaite
WR.net Apprentice
WR.net Apprentice
 
Posts: 10
Joined: Fri Nov 17, 2006 2:49 am

Sync Roster with a phpBB group

Postby Eridoxi » Sat Feb 24, 2007 2:50 pm

This addon is awesome :) but it seems not to work properly with the character who have accents on their names, is that normal ?

Any idea on how to solve this issue ?

Thanks a lot and Great job robweeks ! :D
Eridoxi
WR.net Apprentice
WR.net Apprentice
 
Posts: 18
Joined: Sun Feb 18, 2007 5:44 pm

Re: Sync Roster with a phpBB group

Postby Malcolm » Mon Feb 26, 2007 8:58 pm

I liked the idea of this addon so I created my own :P

I've done my best be "AddOn Framework Standards Compliant".

I've made pointers just in case some of your users have different roster/phpbb names.

The groups and pointers are all done through a configuration area on the roster page, no hand editing files after initial configuration. Also the adding/removing of groups/pointers is all done with javascript tested with IE/Firefox/Opera.

2 tables are added to the database, with configurable names in the conf.php file, no core tables are altered in any way.

Updates (next version) on 'guild_post' trigger.

Also has uninstall.

I finished that up last night and I'm going to be working on the actual phpBB group update function when I get home tonight. If someone wants to get a head start on it the update function is at the bottom of functions.php.

Beyond the wiping/populating groups function everything else is working nicely.

Umm... that's about it I think, try it out and tell me when you think :)

{edit}
Download below
Last edited by Malcolm on Thu Mar 01, 2007 3:09 pm, edited 1 time in total.
Malcolm
WR.net Apprentice
WR.net Apprentice
 
Posts: 22
Joined: Sun Jul 23, 2006 8:57 am

Re: Sync Roster with a phpBB group

Postby Malcolm » Thu Mar 01, 2007 1:09 am

Sorry for the delay, please read the readme.txt file in the archive :)

NOTES:
-- Populates phpBB usergroups based on their guild rank
-- Allows you to create roster->phpBB pointers, just incase
your member has a different name on the forums from the roster.
-- Allows you to assign each guild rank to as may groups as you'd
like.
-- Should be 'AddOn Framework Standards Compliant'
Attachments
phpbb_groups.zip
(9 KiB) Downloaded 387 times
Malcolm
WR.net Apprentice
WR.net Apprentice
 
Posts: 22
Joined: Sun Jul 23, 2006 8:57 am

Sync Roster with a phpBB group

Postby arcadin » Fri Mar 02, 2007 6:19 am

Malcolm, I tried you mod, but I'm getting the following when I click on submit with "Add/Update groups" selected:

Code: Select all
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /var/www/htmlxyzzy/roster/lib/wowdb.php on line 136


and when I add a pointer, then hit delete then save I'm getting

Code: Select all
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/htmlxyzzy/roster/addons/phpbb_groups/index.php on line 184


In the "Update/Add groups" pulldown I'm getting a valid list of Roster groups, but the phpBB list is empty.

If I uninstall I'm also getting the following

Code: Select all
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /var/www/htmlxyzzy/roster/lib/wowdb.php on line 136


I have the following addons installed

aldor_scryer
AltMonitor
By The Numbers
Categorized Guildbank
Equipment Viewer
Gear Browser
Guild Stats
ItemSets
Made By
Max. Resists
Missing Recipes
phpRaid sync
Raid Tracker
Reputation
SigGen
SortMembers
Spell Books
Talented

and the following mods to my phpbb 2.0.22 installation:

ItemStats
phpbb attach_mod
Smartfeed
WoWMoonclaw01 v2.01 for phpBB 2.0.22
Multiple BBCode MOD
Youtube Video BBCode

A.
arcadin
WR.net Apprentice
WR.net Apprentice
 
Posts: 32
Joined: Thu Sep 14, 2006 3:20 pm

Re: Sync Roster with a phpBB group

Postby Malcolm » Fri Mar 02, 2007 7:45 am

Thanks for the feedback arcadin! I've fixed the array error and I believe that I nailed the fetch_assoc ones aswell.

Please replace the function.php and index.php files with those included in the archive below.

If it does not work could you please let me know which prefix you are using for your phpBB groups?

Also, for debugging, could you uncomment the error 1, 2 and 3 lines in the function.php file and quote the error messages in your response?

Thanks,

Malcolm
Attachments
updates.zip
(4.09 KiB) Downloaded 343 times
Malcolm
WR.net Apprentice
WR.net Apprentice
 
Posts: 22
Joined: Sun Jul 23, 2006 8:57 am

Sync Roster with a phpBB group

Postby Grobsnelf » Fri Mar 09, 2007 9:11 pm

Thanks for an addon I've been wishing would exists...now if I could only get it to work ;-)

My setup is this:

PHPNuke 7.9 with it's included phpBB 2.0.17

Roster 1.7.3

Database where PHPNuke/phpBB and Roster resides: subscrib_nuke1

PHPNuke/phpBB access is with subscrib_nuke1

Roster access is with subscrib_roster

Both users have ALL privileges to subscrib_nuke1

Roster is installed in /roster

phpBB is installed in /modules/Forums

Addon is installed in /roster/addon/pbpBB

I've changed $phpbb_dir from '../.' to '../modules/Forums/.' in conf.php

/modules/Forums/config.php includes ../../mainfile.php

../../mainfile.php subsequently does a require_once on ./config.php (which is the config.php at the root of the site)

./config.php contains this:

$dbhost = "localhost";

$dbuname = "subscrib_nuke1";

$dbpass = "asifiwouldtelltheworldmygarbledpassword";

$dbname = "subscrib_nuke1";

$prefix = "nuke";

$user_prefix = "nuke";

$dbtype = "MySQL";

The error I get is this:

Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'subscrib'@'localhost' (using password: NO) in /home/subscrib/public_html/guild-succession.com/modules/Forums/db/mysql4.php on line 48
Failed to connect to your phpBB database. Verify the settings in conf.php


The thing that puzzles me is that the errormessage talks about 'subscrib'@'localhost' instead of 'subscrib_nuke1'@'localhost' which $dbuname specifies in config.php

Another thing is that it says "using password: NO" even if $dbpass is specified in config.php
Grobsnelf
WR.net Apprentice
WR.net Apprentice
 
Posts: 2
Joined: Sat Aug 26, 2006 3:07 am

PreviousNext

Return to phpBB

Who is online

Users browsing this forum: No registered users and 1 guest

cron