262451
simonvl
Xoopsmembers search by group and rank (HACK)
  • 2004/4/16 0:17

  • simonvl

  • Just popping in

  • Posts: 44

  • Since: 2004/1/28


I am developing a hack to allow xoopsmembers to be searched by group and rank.

I am posting this unfinished hack here in case other people better at php want to help me to develop this.

Current problems to solve:
---------------------------
1) the array within the array: user groups within the userdata array- how can I access these for both matching in the search, and for displaying in the smarty template?
2) XoopsFormSelectGroup- how to use?
(see below for where I want to use these)

So far I have got the searchresults section of index.php to be able to access this information, as follows:
section to get groups
(added just after
$start = (!empty($HTTP_POST_VARS['start'])) ? intval($HTTP_POST_VARS['start']) : 0;
$member_handler =& xoops_gethandler('member');
$total = $member_handler->getUserCount($criteria);
//----------------------hack show groups by samuels- edited by simonvl------------------------
        
function GetGroupsNames ($uid)
        {
            
$member_handler =& xoops_gethandler('member');
            
$User= new XoopsUser($uid);
            
$user_groups=$User->getGroups();
            
$count count($user_groups);
    
//$groups =& $member_handler->getGroups();
            
for ($i=0;$i<$count;$i++)
            {
                
$thisgroup =& $member_handler->getGroup($user_groups[$i]);
                
$g[$i]=$thisgroup->getVar('name');
            }
            return (
$g);

        }

This gets the groups each user found by the search is subscribed to and pust them in the array $g, where $g['0'] is the first group the user was assigned, etc.

The next bit puts this info into the $userdata array which xoopsmembers uses to store info and put it into a smarty variable as an array.
Added after
$userdata['id'] = $foundusers[$j]->getVar("uid");
$userdata['groups'] = GetGroupsNames($userdata['id']);
            
$usergroupinfo $userdata['groups'];
            echo 
$usergroupinfo['0']; //just for testing
// this bit thanks to Mithrandir:
            
$rank $foundusers[$j]->rank();
            
$userdata['rank'] = $rank['title'];
            
$rankinfo $userdata['rank'];
            echo 
$rankinfo//just for testing

At the moment, this successfully echos the rank information of each user, but of course returns "array" for the group.

using this for the search form
I can add a standard text matching search field for user ranks, or a selection box, or a hidden field that only lets visitors see certain ranked users- this I might use for a custom implementation of ranks on my site as a classification system.

Now, I want to select groups and put their name into the search form, to find members in that group. Should I use
XoopsFormSelectGroup($caption, $name, $include_anon=false, $value=null, $size=1, $multiple=false) (and if so, how!)
or should I use a normal xoopsformselect element and name the groups (making the implementation less flexible)?

Also, how do you get it to try to match the entry to all of the values in the array $g?

Ultimately, I would like members to be able to search all members, but anonymous visitors to be only allowed to search (and view) special members, moderators and admins- these are the society committee members at chillout.org.uk

Anyone want to help out here?
Thanks in advance
Simon



262452
xoopie
Problem with System Admin
  • 2004/4/16 0:15

  • xoopie

  • Just popping in

  • Posts: 9

  • Since: 2004/4/16


I've just recently installed the latest version of XOOPS and everything was going fine, then I edited the group permissions for the webmaster and now I cannot see the System Admin icon when I login to the Adminstration panel.

I have searched the forums here but I can't seem to find a solution that works for me.

When I tryhttp://www.mysite.net/modules/system/admin.php?fct=groups as suggested elsewhere I get a message saying selected module does not exist

Does anyone know how the group permissions are stored ? If it's in the database I can access that but I'm not sure exactly what I should change if anything.

I really hope someone can help, it was all going so well...



262453
oneil
Re: Blocks Buttons and Tigers - Oh My
  • 2004/4/15 23:59

  • oneil

  • Just popping in

  • Posts: 2

  • Since: 2004/4/14


Thanks Herko you rock.

This gives me direction. I realize now that I should have narrowed my question because I was asking for the moon. <g> I will tell you that I decided to use XOOPS over some other platforms based on the openess of this site and the feedback people receive. Kudos to you and your peers for trying to make it easy!!!

I printed out the 'Visual Intro' and downloaded the IMenus mod. I also intend on buying a 'Script for Idiots' book - but I would much rather have the comprehensive 'xoops for fools'. Why don't you get on that - I'll keep checking B&N.

If anyone else has comments for me - I'll take anything you got!

Thanks again for being a great partner!
Oneil



262454
Anonymous
Re: is xcgal still being developed?
  • 2004/4/15 23:11

  • Anonymous

  • Posts: 0

  • Since:


Well, the spirit of open source projects is the community and it is impossible to do everything alone, so more hands ( not only two hands ) will force developing and every productive help is needed and welcome for further developing...



262455
djsckizo
Re: is xcgal still being developed?
  • 2004/4/15 23:00

  • djsckizo

  • Just can't stay away

  • Posts: 401

  • Since: 2003/5/9 8


And the fans cheer for the future development of xcGal!

Resized Image



262456
sunsnapper
Re: Rollover Images

I recommend what is called the "Pixy Fast Rollovers" which uses CSS and handles the image preload without JavaScript.

http://www.pixy.cz/blogg/clanky/cssnopreloadrollovers/update.html

This page above is the latest version, which includes a means to bypass an IE bug. To get step-by-step instructions, follow the link on the page to the original document.

It is super, super easy and works fantastic.

If you need help, let me know, and I will try.

Basically, you create a single image file with all the button states in it (hover, click, active, visited, etc.). Then you use offsets in CSS to have the proper button state pull up on demand.

In your case, think of the picture of the house as a giant button. Also, you might consider using hover instead of click if you don't really need the user to click.



262457
brash
Re: is xcgal still being developed?
  • 2004/4/15 22:53

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


Wohoo! More XcGal development . The new version of Coppermine has watermark support too doesn't it?



262458
Anonymous
Re: is xcgal still being developed?
  • 2004/4/15 22:46

  • Anonymous

  • Posts: 0

  • Since:


Quote:

Brad wrote:
How would you recommend that I get ahold of Predator to discuss this? (Pred, this is where you jump in...)


Sorry for delay jump in had a lot of work in my company.

Quote:

I am aware of the integrated xcGal module. However, I don't feel that it'll be updated anytime soon and as I have spare time in the middle of the night between baby feedings, I figured I'd take a stab at integrating the newest Coppermine. Especially because I'd like the video hack included.

If you'd rather that I didn't release my version, I won't. If you'd like me to turn my version over to Predator, I will. If you want me to bark like a dog, I'll do that too (but quietly as I'm at work right now). Just let me know what direction you'd feel is best for me to go in.


As djsckizo has quoted above there is at the moment no free time left to work also on this, so Brad if you want to jump in the Site of the xcGal is open for you and you can use it to merge your work and the work of derya for a newer release, it would help the community a lot and keeps my heat free for other things

So again you`re welcome... ( the rest we talk by mail )

Greetz Predator



262459
brash
Re: article module needed
  • 2004/4/15 22:44

  • brash

  • Friend of XOOPS

  • Posts: 2206

  • Since: 2003/4/10


I would wait for the new verson of WF-Section by Catzwolf, by the sounds it should be one of the best article management modules available for any CMS. I'm going to wait for it myself.



262460
niktarin
article module needed
  • 2004/4/15 22:39

  • niktarin

  • Just popping in

  • Posts: 28

  • Since: 2003/9/21


I need a article module.
I have looked a bit around here but am still confused

Any idea on what to use?

Thanks







Login

Who's Online

125 user(s) are online (63 user(s) are browsing Support Forums)


Members: 0


Guests: 125


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits