From 90fff1de1c81eca9cdca8c41ec8083b72965b4a2 Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 6 Dec 2013 00:11:03 -0800 Subject: doc updates --- doc/html/identity_8php.html | 327 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 317 insertions(+), 10 deletions(-) (limited to 'doc/html/identity_8php.html') diff --git a/doc/html/identity_8php.html b/doc/html/identity_8php.html index 8885d5be7..6bd7cb296 100644 --- a/doc/html/identity_8php.html +++ b/doc/html/identity_8php.html @@ -126,10 +126,48 @@ Functions    identity_basic_export ($channel_id)   - identity_basic_import ($arr, $seize_primary=false) -  + profile_load (&$a, $nickname, $profile= '') +  + profile_create_sidebar (&$a, $connect=true) +  + profile_sidebar ($profile, $block=0, $show_connect=true) +  + get_birthdays () +  + get_events () +  + advanced_profile (&$a) +  + get_my_url () +  + get_my_address () +  + zid_init (&$a) +  + zid ($s, $address= '') +  + get_theme_uid () + 

Function Documentation

+ +
+
+ + + + + + + + +
advanced_profile ($a)
+
+ +

Referenced by profile_content().

+ +
+
@@ -142,6 +180,8 @@ Functions
+

() Return the total number of channels on this site. No filtering is performed.

+
Returns
int on error returns boolean false

Referenced by zfinger_init().

@@ -159,6 +199,8 @@ Functions
+

create_dir_account() Create a system channel - which has no account attached

+

Currently unused.

@@ -175,9 +217,96 @@ Functions
+

create_identity($arr) Create a new channel Also creates the related xchan, hubloc, profile, and "self" abook records, and an empty "Friends" group/collection for the new channel

+
Parameters
+ + +
array$arr'name' => full name of channel 'nickname' => "email/url-compliant" nickname 'account_id' => account_id to attach with this channel [other identity fields as desired]
+
+
+
Returns
array 'success' => boolean true or false 'message' => optional error text if success is false 'channel' => if successful the created channel array

Referenced by create_dir_account(), and new_channel_post().

+
+ + +
+
+ + + + + + + +
get_birthdays ()
+
+ +
+
+ +
+
+ + + + + + + +
get_events ()
+
+ +
+
+ +
+
+ + + + + + + +
get_my_address ()
+
+ +

Referenced by App\build_pagehead(), rmagic_init(), zid(), and zid_init().

+ +
+
+ +
+
+ + + + + + + +
get_my_url ()
+
+ +

Referenced by nav(), and zid().

+ +
+
+ +
+
+ + + + + + + +
get_theme_uid ()
+
+
@@ -193,26 +322,94 @@ Functions
+

identity_basic_export($channel_id) Create an array representing the important channel information which would be necessary to create a nomadic identity clone. This includes most channel resources and connection information with the exception of content.

+
Parameters
+ + +
int$channel_idChannel_id to export
+
+
+
Returns
array See function for details

Referenced by api_export_basic(), and uexport_init().

- + +
+
+ + + + + + + + +
identity_check_service_class ( $account_id)
+
+

identity_check_service_class($account_id) Called when creating a new channel. Checks the account's service class and number of current channels to determine whether creating a new channel is within the current service class constraints.

+
Parameters
+ + +
int$account_idAccount_id used for this request
+
+
+
Returns
array 'success' => boolean true if creating a new channel is allowed for this account 'message' => if success is false, optional error text
+ +

Referenced by create_identity().

+ +
+
+
- + + + + + + + - + + + + + + + +
identity_basic_import profile_create_sidebar ($a,
 $arr, $connect = true 
)
+
+
+ +
+
+ + + + + + + + + + + + - + @@ -221,24 +418,59 @@ Functions
profile_load ($a,
 $nickname,
 $seize_primary = false $profile = '' 
+

: profile_load(&$a, $nickname, $profile) Generate

+
Parameters
+ + + + +
App$a
string$nickname
string$profileSummary: Loads a profile into the App structure. The function requires a writeable copy of the main App structure, and the nickname of a valid channel.
+
+
+

Permissions of the current observer are checked. If a restricted profile is available to the current observer, that will be loaded instead of the channel default profile.

+

The channel owner can set $profile to a valid profile_guid to preview that profile.

+

The channel default theme is also selected for use, unless over-riden elsewhere.

+

load/reload current theme info

+ +

Referenced by blocks_content(), channel_init(), common_init(), connect_init(), hcard_init(), lastpost_init(), layouts_content(), page_init(), profile_init(), profile_photo_init(), profiles_init(), profperm_init(), viewconnections_init(), and webpages_content().

- +
- + - + + + + + + + + + + + + + + + + +
identity_check_service_class profile_sidebar (  $account_id)$profile,
 $block = 0,
 $show_connect = true 
)
+

Function: profile_sidebar

+

Formats a profile for display in the sidebar. It is very difficult to templatise the HTML completely because of all the conditional logic.

+

: array $profile

+

Returns HTML string stuitable for sidebar inclusion Exceptions: Returns empty string if passed $profile is wrong type or not populated

-

Referenced by create_identity().

+

Referenced by profile_create_sidebar(), and widget_profile().

@@ -271,6 +503,16 @@ Functions
+

set_default_login_identity($account_id, $channel_id, $force = true) Set default channel to be used on login

+
Parameters
+ + + + +
int$account_idlogin account
int$channel_idchannel id to set as default for this account
booleanforce if true, set this default unconditionally if $force is false only do this if there is no existing default
+
+
+
Returns
nil

Referenced by create_identity(), and import_post().

@@ -289,9 +531,74 @@ Functions
+

validate_channelname($name) Determine if the channel name is allowed when creating a new channel. This action is pluggable.

+
Parameters
+ + +
string$name
+
+
+
Returns
nil return if name is valid, or string describing the error state.
+

We're currently only checking for an empty name or one that exceeds our storage limit (255 chars). 255 chars is probably going to create a mess on some pages. Plugins can set additional policies such as full name requirements, character sets, multi-byte length, etc.

Referenced by create_identity(), and settings_post().

+
+ + +
+
+ + + + + + + + + + + + + + + + + + +
zid ( $s,
 $address = '' 
)
+
+

zid($s,$address = '') Adds a zid parameter to a url

+
Parameters
+ + + +
string$sThe url to accept the zid
boolean$address$address to use instead of session environment
+
+
+
Returns
string
+

'zid' string url - url to accept zid string zid - urlencoded zid string result - the return string we calculated, change it if you want to return something else

+ +

Referenced by conversation(), format_categories(), get_plink(), intro_content(), like_puller(), localize_item(), match_content(), menu_render(), new_contact(), and viewconnections_content().

+ +
+
+ +
+
+ + + + + + + + +
zid_init ($a)
+
+

zid_init(&$a) If somebody arrives at our site using a zid, add their xchan to our DB if we don't have it already. And if they aren't already authenticated here, attempt reverse magic auth.

+

'zid_init' string 'zid' - their zid string 'url' - the destination url

+
-- cgit v1.2.3