glFusion Wiki

Site Tools


glfusion:development:pluginapi:userprofiles

FIXME - replace test with actual function examples

User Functions

For some plugins, it may be necessary to track creation and deletion of user accounts.

plugin_user_create_<plugin name>

This function is called when a new user account has been created. The only parameter passed is the user ID. This function does not have a return value.

Arguments

test

plugin_user_delete_<plugin name>

This function is called when a user account has been deleted. The only parameter passed is the user ID. This function does not have a return value.

Arguments

test

plugin_getuseroption_<plugin name>

Will show options under the My Account block for your plugin.

Arguments

test

Profile Functions

Plugins can add blocks or individual items to the user profile.

plugin_profilevariablesedit_<plugin name>

This function is called when glFusion 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.

Arguments

test

plugin_profileblocksedit_<plugin name>

This function is called when glFusion 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 previous) instead. The function is expected to return the HTML for a block or an empty string.

Arguments

test

plugin_profilevariablesdisplay_<plugin name>

This function is called when glFusion 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.

Arguments

test

plugin_profileblocksdisplay_<plugin name>

This function is called when glFusion 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.

Arguments

test
glfusion/development/pluginapi/userprofiles.txt · Last modified: 2017/04/12 21:13 (external edit)

Page Tools