Profile Functions

From GeeklogWiki
Jump to: navigation, search

Plugins can add blocks or individual items to the user profile.</p>

Table 9. Misc. functions
Function Description of Function
plugin_profilevariablesedit_<plugin name> This function is called when Geeklog is about to display the edit form for a user's profile. The plugin is given the user id and a reference to the template of the edit form. It can now add its own variables and input fields to the form.
This function does not return anything. The plugin should use the template functions (set_var etc.) to add things to the template.
plugin_profileblocksedit_<plugin name> This function is called when Geeklog is about to display the edit form for a user's profile. The user id is passed as a parameter to this function. The plugin can return the HTML for a block (including block header and footer) that it wants to be displayed on the profile edit form. When a plugin asks for several items, it may make more sense to group the items this way. Otherwise, you may want to use plugin_profilevariablesedit_<plugin name> (see above) instead.
The function is expected to return the HTML for a block or an empty string.
plugin_profilevariablesdisplay_<plugin name> This function is called when Geeklog is about to display a user's profile. The plugin is given the user id and a reference to the template of the profile. It can now add its own variables to the profile.
This function does not return anything. The plugin should use the template functions (set_var etc.) to add things to the template.
plugin_profileblocksdisplay_<plugin name> This function is called when Geeklog is about to display a user's profile. The plugin is given the user id and can now return the HTML for any additional blocks that it wants to be displayed on the profile page.
The function is expected to return the HTML for a block or an empty string.