Page 1 of 1
fetchGroups
Posted: Tue Jan 16, 2007 1:26 pm
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?
Re: fetchGroups
Posted: Tue Jan 16, 2007 1:34 pm
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
Posted: Tue Jan 16, 2007 1:41 pm
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?
Posted: Tue Jan 16, 2007 1:53 pm
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
Posted: Tue Jan 16, 2007 1:55 pm
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
Posted: Tue Jan 16, 2007 2:48 pm
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
Posted: Tue Jan 16, 2007 3:11 pm
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