Modify UserProfiles

Creating and modifying plugins.
Post Reply
Linus
Regular
Posts: 66
Joined: Mon Mar 06, 2006 1:59 pm
Location: Mannheim
Contact:

Modify UserProfiles

Post by Linus »

Hi,
I´ve got problems finding the best way to modify the userprofiles-plugin.

What I want is to have all the users(authors) of one group shown on a page (like index.php?serendipity[subpage]=userprofiles does) - but with all the values that a user has entered in the profile(address, hobbies,...).

My plan is to combine this with a accordion from mootools:
http://nimax.homelinux.org/bretsch/sere ... erprofiles
(select Herren1 from the box on the left and hit "Los").

I´m not able to select the properties from the profiles with the sql statement that fetches the users from a group, because the statement contains a "group by" clause.
I´m searching for an easier way to solve this problem without changing the database table. One row for every user with the all his properties as columns, instead of saving every property alone).

Maybe someone got a better idea...
Thanks in Advance
Andi
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Modify UserProfiles

Post by garvinhicking »

Hi!

Hm, the normalization of the DB is not really meant for such a single query; you'll need to fetch the properties of each user with one large SQL query, and then use PHP to combine it with the list of authors?

You will definitely need to patch the PHP code of the plugin to achieve that, but it should be possible. I'm lacking some time right now to check this, if you still have problems with this on the weekend I can have another look :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Linus
Regular
Posts: 66
Joined: Mon Mar 06, 2006 1:59 pm
Location: Mannheim
Contact:

Post by Linus »

Hi Garvin,
thanks for your answer.
I´ve got it already up and running ;)
Still needs a lot of work but I solved the problem without changes to the db.

Thanks to everybody working on serendipity, pushing it forward and delivering such a great piece of software. It´s always a pleasure for me to work with s9y. :D
DANKE!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

And what was the exact solution! Tell me! :-)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Linus
Regular
Posts: 66
Joined: Mon Mar 06, 2006 1:59 pm
Location: Mannheim
Contact:

Post by Linus »

Mmh I set up a new sql statement memberinfos saved as array and passed it via smarty to the tpl - hey I'm no virgin in Smarty anymore ;)
Then i added a new foreach in the tpl and voila it works. I had problems sorting the properties with smarty, so i added a number to the properties and sorted the sql statement- very dirty (brrrr) but works....
Post Reply