collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: module to list org members  (Read 1463 times)

0 Members and 1 Guest are viewing this topic.

Offline ilon

  • BeBot User
  • **
  • Posts: 22
  • Karma: +0/-0
module to list org members
« on: January 06, 2007, 01:57:43 pm »
So, the thing i really miss to be able to maintain the org (kick inactive members, remove shops for players who left etc is a command (!members?) that shows all the members that are in the org.

A really nice additional function would be a sort function (per default) for it to group alts togheter, like:

amain
 amains-alt1
 amains-alt2
cmain
 cmain-alt1

etc, sort them alphabetical and just throw in the alts under the main-char.

would help alot for me, and i bet other ppl could use it too. :)

would be really happy if someone who know more about coding than me could help me out here and maybe do suck a module. i dont know much about php, but i assume it wouldnt be much code, like fetch memberslist, fetch alt list, sort method, sort the list, show it, or something >_>

Offline pusikas

  • BeBot Apprentice
  • ***
  • Posts: 161
  • Karma: +0/-0
Re: module to list org members
« Reply #1 on: January 06, 2007, 03:02:25 pm »
I am still not good at coding php, but the info you are looking for is in the database already. Would prolly be possible to make a SELECT statement that gives you just what you need. Stil haven't had my morning coffee, so the following is all I could come up with in 2 minutes, sounds useful, will see if I can come up with something better. Lists all members with their alts (only those in org), ordered by name of the main, then name of the alt. Note that this may be the wrong way to do it in mysql, I usually use postgresql and oracle. And even in those databases, it would be considered ugly. ^^
Code: [Select]
SELECT mains.main, alt
  FROM (SELECT nickname main
          FROM members
         WHERE nickname NOT IN (SELECT alt FROM alts)) mains
  LEFT JOIN (SELECT alts.main, alts.alt
               FROM alts, members
              WHERE alts.alt = members.nickname) altsinorg
       ON (mains.main = altsinorg.main)
 ORDER BY main, alt;
Luuv  Bot-Keeper of Vengeance ^^*

Offline ilon

  • BeBot User
  • **
  • Posts: 22
  • Karma: +0/-0
Re: module to list org members
« Reply #2 on: January 07, 2007, 02:06:43 am »
anyone feels like making this into a working module? i simply dosnt have the knowledge in SQL / PHP for it :<

Offline jjones666

  • Contributor
  • *******
  • Posts: 353
  • Karma: +0/-0
Re: module to list org members
« Reply #3 on: January 07, 2007, 02:14:25 am »
http://www.jjones.co.uk/files/memberlist2.php

that was something wolfbiter wrote and i changed slightly for our org.  should fit roughly what you need.

-jj-

Offline ilon

  • BeBot User
  • **
  • Posts: 22
  • Karma: +0/-0
Re: module to list org members
« Reply #4 on: January 07, 2007, 02:56:46 am »
ok, tyvm :))

will try it out tomorrow when i wake up, need some sleep badly now :P

gnite

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 527
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal