fetchGroups

Discussion corner for Developers of Serendipity.
Post Reply
loli
Regular
Posts: 8
Joined: Tue Jan 16, 2007 1:22 pm

fetchGroups

Post by loli »

Hello,

i wonder if theres a serendipity function which fetches the User-Groups from the Database - just like fetchUsers do for Users and fetchCategories for Categories?

loli

PS: Is the somewhere the Doxygen Dokumentation of the Serendipity files?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: fetchGroups

Post by garvinhicking »

Hi!

Yes, this function does that:

serendipity_getGroups()

within include/functions_config.inc.php.
PS: Is the somewhere the Doxygen Dokumentation of the Serendipity files?
We have phpdoc style documentation in the sourcecode, but currently we have no automatted doc builds of those...

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/
loli
Regular
Posts: 8
Joined: Tue Jan 16, 2007 1:22 pm

Post by loli »

thx very much ... and the next questions follows: I want to get a list of ALL existing groups, not just from one user.

Is this possible without my own query?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Sure. serendipity_getAllGroups().

You might want to check all available functions in the include/functions_config.inc.php file ;)

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/
loli
Regular
Posts: 8
Joined: Tue Jan 16, 2007 1:22 pm

Post by loli »

Ahrg *beating myself with ... em .. er .. the screen?*

Thx again, i think i will just fetch phpdoc and do some research on my own.

Greetings,
loli
loli
Regular
Posts: 8
Joined: Tue Jan 16, 2007 1:22 pm

Post by loli »

Another one:

I want to change the author ID of an entry before it is saved ... i tried with the 'backend_entry_presave' hook, but I just can't get access to the $entry-Array (as expected) ... but i could own trace the procedure back through 'serendipity_is_iframe' and 'serendipity_iframe' .. there i got lost in $_SESSION['save_entry'] .

Any suggestions?

Thx,
loli
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

The hook is right, but you must check $eventData of course, as this is the variable passed to the method -- not $entry?

Look at the entryproperties plugin, it offers changing authorids, and you could use the same hooks/methods.

HTH,
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/
Post Reply