3 function follow_widget() {
5 return replace_macros(get_markup_template('follow.tpl'),array(
6 '$connect' => t('Add New Contact'),
7 '$desc' => t('Enter address or web location'),
8 '$hint' => t('Example: bob@example.com, http://example.com/barbara'),
9 '$follow' => t('Connect')
14 function findpeople_widget() {
18 if(get_config('system','invitation_only')) {
19 $x = get_pconfig(local_user(),'system','invites_remaining');
20 if($x || is_site_admin()) {
21 $a->page['aside'] .= '<div class="side-link" id="side-invite-remain">'
22 . sprintf( tt('%d invitation available','%d invitations available',$x), $x)
27 return replace_macros(get_markup_template('peoplefind.tpl'),array(
28 '$findpeople' => t('Find People'),
29 '$desc' => t('Enter name or interest'),
30 '$label' => t('Connect/Follow'),
31 '$hint' => t('Examples: Robert Morgenstein, Fishing'),
32 '$findthem' => t('Find'),
33 '$suggest' => t('Friend Suggestions'),
34 '$similar' => t('Similar Interests'),
35 '$inv' => t('Invite Friends')
41 function networks_widget($baseurl,$selected = '') {
49 $r = q("select distinct(network) from contact where uid = %d and self = 0",
55 require_once('include/contact_selectors.php');
58 $nets[] = array('ref' => $rr['network'], 'name' => network_to_name($rr['network']), 'selected' => (($selected == $rr['network']) ? 'selected' : '' ));
65 return replace_macros(get_markup_template('nets.tpl'),array(
66 '$title' => t('Networks'),
68 '$sel_all' => (($selected == '') ? 'selected' : ''),
69 '$all' => t('All Networks'),
76 function fileas_widget($baseurl,$selected = '') {
81 $saved = get_pconfig(local_user(),'system','filetags');
87 $cnt = preg_match_all('/\[(.*?)\]/',$saved,$matches,PREG_SET_ORDER);
89 foreach($matches as $mtch) {
90 $unescaped = file_tag_decode($mtch[1]);
91 $terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : ''));
95 return replace_macros(get_markup_template('fileas_widget.tpl'),array(
96 '$title' => t('File Selections'),
98 '$sel_all' => (($selected == '') ? 'selected' : ''),
99 '$all' => t('Everything'),