You are here

function follow_default_networks in Follow 7

Same name and namespace in other branches
  1. 5 follow.module \follow_default_networks()
  2. 6 follow.module \follow_default_networks()
  3. 7.2 follow.inc \follow_default_networks()

Retrieves the default networks available.

Return value

An associative array, keyed by the machine name. The values are an array including title of the network, along with the domain to be used for input validation of the network.

1 call to follow_default_networks()
follow_networks_load in ./follow.module
Loads all follow networks

File

./follow.module, line 806
Allows users to add links to their social network profiles.

Code

function follow_default_networks($uid) {
  $networks = array(
    'facebook' => array(
      'title' => t('Facebook'),
      'domain' => 'facebook.com',
    ),
    'googleplus' => array(
      'title' => t('Google+'),
      'domain' => 'plus.google.com',
    ),
    'virb' => array(
      'title' => t('Virb'),
      'domain' => 'virb.com',
    ),
    'myspace' => array(
      'title' => t('MySpace'),
      'domain' => 'myspace.com',
    ),
    'twitter' => array(
      'title' => t('Twitter'),
      'domain' => 'twitter.com',
    ),
    'picasa' => array(
      'title' => t('Picasa'),
      'domain' => 'picasaweb.google.com',
    ),
    'flickr' => array(
      'title' => t('Flickr'),
      'domain' => 'flickr.com',
    ),
    'youtube' => array(
      'title' => t('YouTube'),
      'domain' => 'youtube.com',
    ),
    'vimeo' => array(
      'title' => t('Vimeo'),
      'domain' => 'vimeo.com',
    ),
    'bliptv' => array(
      'title' => t('blip.tv'),
      'domain' => 'blip.tv',
    ),
    'lastfm' => array(
      'title' => t('last.fm'),
      'domain' => 'last.fm',
    ),
    'linkedin' => array(
      'title' => t('LinkedIn'),
      'domain' => 'linkedin.com',
    ),
    'delicious' => array(
      'title' => t('Delicious'),
      'domain' => 'delicious.com',
    ),
    'tumblr' => array(
      'title' => t('Tumblr'),
      'domain' => 'tumblr.com',
    ),
    'viadeo' => array(
      'title' => t('Viadeo'),
      'domain' => 'viadeo.com',
    ),
    'xing' => array(
      'title' => t('Xing'),
      'domain' => 'xing.com',
    ),
    'spiceworks' => array(
      'title' => t('Spiceworks'),
      'domain' => 'spiceworks.com',
    ),
  );
  if ($uid == 0) {
    $networks['this-site'] = array(
      'title' => t('This site (RSS)'),
      'domain' => '',
    );
    $networks['newsletter'] = array(
      'title' => t('Newsletter'),
      'domain' => '',
    );
  }
  return $networks;
}