function follow_default_networks in Follow 6
Same name and namespace in other branches
- 5 follow.module \follow_default_networks()
- 7.2 follow.inc \follow_default_networks()
- 7 follow.module \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 846 - 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' => '',
'regex callback' => 'follow_network_regex_internal',
'tooltip callback' => 'follow_link_tooltip_rss',
);
$networks['newsletter'] = array(
'title' => t('Newsletter'),
'domain' => '',
'regex callback' => 'follow_network_regex_external',
'tooltip callback' => 'follow_link_tooltip_newsletter',
);
}
return $networks;
}