Friends 1.x

Legacy documentation for Friends 1.x.

File: ./mod.friends.php

File: ./libraries/Friends_status.php

friends_group_wall_form_end

  • Files:
    • mod.friends.php
  • Method:
    • mod.friends.php -> group_wall_form()
  • Possible Uses:
    • Allows developers to alter the output HTML for the Group Wall form.
  • Variables:
    • $r: (string) - Group Wall form HTML
  • Return:
    • type: string
    • required: yes

Hook Code:

if (ee()->extensions->active_hook('friends_group_wall_form_end') === TRUE)
{
    $r = ee()->extensions->universal_call('friends_group_wall_form_end', $r);
    if (ee()->extensions->end_script === TRUE) return;
}

Extension function example:

public function friends_group_wall_form_end($r)
{
    //have other extensions already manipulated?
    if (ee()->extensions->last_call !== FALSE)
    {
        $errors = ee()->extensions->last_call;
    }

    // Add a title above form
    $r = '<h2>' . lang('group_wall_form') . '</h2>' . $r;

    return $r;
}

friends_profile_wall_form_end

  • Files:
    • mod.friends.php
  • Method:
    • mod.friends.php -> profile_wall_form()
  • Possible Uses:
    • Allows developers to alter the output HTML for the Profile Wall form.
  • Variables:
    • $r: (string) - Profile Wall form HTML
  • Return:
    • type: string
    • required: yes

Hook Code:

if (ee()->extensions->active_hook('friends_profile_wall_form_end') === TRUE)
{
    $r = ee()->extensions->universal_call('friends_profile_wall_form_end', $r);
    if (ee()->extensions->end_script === TRUE) return;
}

Extension function example:

public function friends_profile_wall_form_end($r)
{
    //have other extensions already manipulated?
    if (ee()->extensions->last_call !== FALSE)
    {
        $errors = ee()->extensions->last_call;
    }

    // Add a title above form
    $r = '<h2>' . lang('profile_wall_form') . '</h2>' . $r;

    return $r;
}

friends_profile_comment_delete

  • Files:
    • mod.friends.php
  • Method:
    • mod.friends.php -> profile_comment_delete()
  • Possible Uses:
    • Allows developers to modify the profile comment delete message.
  • Variables:
    • $this: (object) - The Friends class variables
    • $data: (array) - Data array, used to add variables to be parsed in conditionals
  • Return:
    • type: array
    • required: yes

Hook Code:

if (ee()->extensions->active_hook('friends_profile_comment_delete') === TRUE)
{
    $data   = ee()->extensions->universal_call( 'friends_profile_comment_delete', $this, $data );
    if ( ee()->extensions->end_script === TRUE ) exit();
}

Extension function example:

public function friends_profile_comment_delete($this, $data)
{
    //have other extensions already manipulated?
    if (ee()->extensions->last_call !== FALSE)
    {
        $errors = ee()->extensions->last_call;
    }

    // Add alternate success message to the array
    $data['success_message'] = lang('success_message');

    return $data;
}

friends_group_comment_delete

  • Files:
    • mod.friends.php
  • Method:
    • mod.friends.php -> group_comment_delete()
  • Possible Uses:
    • Allows developers to modify the group comment delete message.
  • Variables:
    • $this: (object) - The Friends class variables
    • $data: (array) - Data array, used to add variables to be parsed in conditionals
  • Return:
    • type: array
    • required: yes

Hook Code:

if (ee()->extensions->active_hook('friends_group_comment_delete') === TRUE)
{
    $data   = ee()->extensions->universal_call( 'friends_group_comment_delete', $this, $data );
    if ( ee()->extensions->end_script === TRUE ) exit();
}

Extension function example:

public function friends_group_comment_delete($this, $data)
{
    //have other extensions already manipulated?
    if (ee()->extensions->last_call !== FALSE)
    {
        $errors = ee()->extensions->last_call;
    }

    // Add alternate success message to the array
    $data['success_message'] = lang('success_message');

    return $data;
}

friends_status_delete_status

  • Files:
    • libraries/Friends_status.php
  • Method:
    • libraries/Friends_status.php -> status_delete()
  • Possible Uses:
    • Allows developers to modify the status delete message.
  • Variables:
    • $this: (object) - The Friends_status class variables
    • $data: (array) - Data array, used to add variables to be parsed in conditionals
  • Return:
    • type: array
    • required: yes

Hook Code:

if (ee()->extensions->active_hook('friends_status_delete_status') === TRUE)
{
    $data   = ee()->extensions->universal_call( 'friends_status_delete_status', $this, $data );
    if ( ee()->extensions->end_script === TRUE ) exit();
}

Extension function example:

public function friends_status_delete_status($this, $data)
{
    //have other extensions already manipulated?
    if (ee()->extensions->last_call !== FALSE)
    {
        $errors = ee()->extensions->last_call;
    }

    // Add alternate success message to the array
    $data['success_message'] = lang('success_message');

    return $data;
}

friends_status_update_status

  • Files:
    • libraries/Friends_status.php
  • Method:
    • libraries/Friends_status.php -> status_update()
  • Possible Uses:
    • Allows developers to modify the status update message.
  • Variables:
    • $this: (object) - The Friends_status class variables
    • $data: (array) - Data array, used to add variables to be parsed in conditionals
  • Return:
    • type: array
    • required: yes

Hook Code:

if (ee()->extensions->active_hook('friends_status_update_status') === TRUE)
{
    $data   = ee()->extensions->universal_call( 'friends_status_update_status', $this, $data );
    if ( ee()->extensions->end_script === TRUE ) exit();
}

Extension function example:

public function friends_status_update_status($this, $data)
{
    //have other extensions already manipulated?
    if (ee()->extensions->last_call !== FALSE)
    {
        $errors = ee()->extensions->last_call;
    }

    // Add alternate success message to the array
    $data['success_message'] = lang('success_message');

    return $data;
}