1
dickinsd
Does anyone know what determines the order of modules in User Profile?
  • 2005/12/3 2:09

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


hi.

Can anyone tell me how XOOPS works out its module order when looking at a user profile?

For example a user profile may list 5 web links the user posted follwed by 5 forum post and then 5 news posts, how or why does XOOPS order these modules.

Does anyone know how I can re-order the modules so that I can dictate the order in which they will be displayed.

I simply consider some areas of the site to be more important than others, if someone looks at a users profile I want them to see that this user has contributed to important areas of the site before they see that the user posted a web link (example)

I have looked in the table prefix_modules and I can see that the order has something to do with this table, but making changes here causes undesirable results.

Any ideas?

Dave

2
gestroud
Re: Does anyone know what determines the order of modules in User Profile?
  • 2005/12/3 6:33

  • gestroud

  • Home away from home

  • Posts: 1538

  • Since: 2004/12/22


Looks like if you go into phpmyadmin and look for "yourdatabasename_profile_category" you can edit the primary key to display its order by category id, title, description or weight. I would be very careful with it, but it looks right.

3
Mithrandir
Re: Does anyone know what determines the order of modules in User Profile?

not really to do with profile fieldcategories.

which XOOPS version are you using?

In XOOPS 2.0.x, you should look in userinfo.php, in XOOPS 2.2.x, you should look in modules/profile/userinfo.php

Locate this code:
$module_handler =& xoops_gethandler('module');
    
$criteria = new CriteriaCompo(new Criteria('hassearch'1));
    
$criteria->add(new Criteria('isactive'1));
    
$modules =& $module_handler->getObjects($criteriatrue);

and add
$criteria->setSort("weight");

so it will look like this:
$module_handler =& xoops_gethandler('module');
    
$criteria = new CriteriaCompo(new Criteria('hassearch'1));
    
$criteria->add(new Criteria('isactive'1));
    [
color=red]$criteria->setSort("weight");[/color]
    
$modules =& $module_handler->getObjects($criteriatrue);
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."

Cusix Software

4
dickinsd
Re: Does anyone know what determines the order of modules in User Profile?
  • 2005/12/3 16:56

  • dickinsd

  • Quite a regular

  • Posts: 278

  • Since: 2004/11/14


Thanks.

$criteria->setSort("weight");

Worked great!

Cheers for that one.

Dave

Login

Who's Online

115 user(s) are online (68 user(s) are browsing Support Forums)


Members: 0


Guests: 115


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