Guest ICE-Lark Posted October 7, 2006 Share Posted October 7, 2006 Hi, I am webmaster of ICE-squad.com. We just purchased IPB 2.1.7. What I would like to do is use the forums database to create a squad members page.Info I'd like to export to page:name, joined, icq, email, age (calculated using bday_day, bday_month, bday_year), custom profile 1, custom profile 2we have our squad members seperated in the forums two ways...first, the command of the squad are admins in the forum (group4) and the rest of the squad members are seperated into a ICE_MEMBERS group (group7)presently, i have to write our members.htm page by hand, and its a real pain every time we add or remove a member from the squad. but if the list was exported from the forums DB, then i could do it real easily. it would be as simple as moving a member of the forums from the default MEMBERS group the the ICE_MEMBERS group.does this make sense? anyway, i suck at PHP, I tried to write a script, but 6 hours of frustrations led to nothing happening. so i'm here.. Quote Link to comment Share on other sites More sharing options...
printf Posted October 7, 2006 Share Posted October 7, 2006 Ok, so your commanders are admins and squad members are in the ICE_MEMBERS group, so how does one distinguish what squad member belongs to what commanders group? explain that and I will give a query and a piece code that you can add to the admin CP so the [b]cached[/b] serialized storage page can be updated every time a member is added or removed from ICE_MEMBERS group. You would use the cached serialized php page to build your members display page. Also when you answer my above question, please include your IPB version so I know what version you are working with!me! Quote Link to comment Share on other sites More sharing options...
Guest ICE-Lark Posted October 7, 2006 Share Posted October 7, 2006 i, as a forum admin, assign members of the forum to groups...so i assigned our commanders to the forum admin group and i assigned our regular members to the ICE_MEMBERS group.I think I'd like to write this myself, with your help of course. I have started a php page, please look it overObviously, you want to right-click and SAVE TARGET AS. [url=http://ice-squad.com/Commandlist.php]Commandlist.php[/url]I've added as many comments as I could. Please look over it and make a few suggestions in these forums. I'll edit the file myself. Quote Link to comment Share on other sites More sharing options...
Guest ICE-Lark Posted October 8, 2006 Share Posted October 8, 2006 bump Quote Link to comment Share on other sites More sharing options...
trq Posted October 8, 2006 Share Posted October 8, 2006 [quote]Obviously, you want to right-click and SAVE TARGET AS. Commandlist.php[/quote]Php does not work that way. We need to see your code. Quote Link to comment Share on other sites More sharing options...
Guest ICE-Lark Posted October 8, 2006 Share Posted October 8, 2006 my bad[code]<?php//----------------------------// Require//----------------------------require "forums/conf_global.php"; //because this file will not be located in the forums directory.//-------------------------------// Connect To MySQL//-------------------------------mysql_connect($INFO['sql_host'], $INFO['sql_user'], $INFO['sql_pass']) or die(mysql_error());mysql_select_db($INFO['sql_database']) or die(mysql_error());//-----------------------------------//Get Info//-----------------------------------$main = mysql_query("SELECT id, name, email, joined, bday_day, bday_month, bday_year FROM ibf_members WHERE mgroup=4 ORDER BY id");$main = mysql_fetch_array($main); $id = $main['id'];$name = $main['name'];$email = $main['email'];$join_date = $main['joined'];$bday_day = $main['bday_day']; //I'd like to take this info and$bday_month = $main['bday_month']; //calculate the age,$bday_year = $main['bday_year']; //but only display it as years.$icq = mysql_query("SELECT icq_number FROM ibf_member_extra WHERE `id` = $id"); //can i grab only the admins icq? seems like it should work. does this grab all admins or just the first?$icq = mysql_fetch_object($icq); $today = getdate(); //Needed for a little arithmetic.//Some fancy arithmetic for the age thingy. I have no clue!$extra_two = mysql_query("SELECT field_1, field_2, field_3, field_4 FROM ibf_pfields_content WHERE `member_id` = $id");$extra_two = mysql_fetch_array($extra_two);$stats = $extra_two['field_1'];$character = $extra_two['field_2'];$country = $extra_two['field_3'];$state = $extra_two['field_4'];//Some HTML for the formattingprint('<table cellspacing=0 cellpadding=0 border=1><tr>');//-----------------------------------//Lets make the list//-----------------------------------echo ("<td>NAME $name </td><td>JOIN $join_date</td><td>COUNTRY $country STATE $state </td><td>ICQ $icq </td><td>EMAIL $email </td><td>AGE $age </td><td>STATS $stats </td><td>CHARACTER $charactor </td>");//So, can you make some minor suggestions for me?//This is my first php script. I have written a //hand-full of PERL scripts, so I thought I'd give//this a shot.//Finish the HTML tableprint('</tr></table>');?> [/code] Quote Link to comment Share on other sites More sharing options...
Guest ICE-Lark Posted October 9, 2006 Share Posted October 9, 2006 bump...can someone help Quote Link to comment Share on other sites More sharing options...
Guest ICE-Lark Posted October 10, 2006 Share Posted October 10, 2006 bump, sigh :-[ Quote Link to comment Share on other sites More sharing options...
Guest ICE-Lark Posted October 11, 2006 Share Posted October 11, 2006 bump, is anybody even reading this? Quote Link to comment Share on other sites More sharing options...
effigy Posted October 12, 2006 Share Posted October 12, 2006 For future reference, don't PM people asking them to read your post. And don't make whiny bumps either--it won't help. If anything, reclarify and try to be as verbose as possible. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.