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() {
15 require_once('include/Contact.php');
19 if(get_config('system','invitation_only')) {
20 $x = get_pconfig(local_user(),'system','invites_remaining');
21 if($x || is_site_admin()) {
22 $a->page['aside'] .= '<div class="side-link" id="side-invite-remain">'
23 . sprintf( tt('%d invitation available','%d invitations available',$x), $x)
28 return replace_macros(get_markup_template('peoplefind.tpl'),array(
29 '$findpeople' => t('Find People'),
30 '$desc' => t('Enter name or interest'),
31 '$label' => t('Connect/Follow'),
32 '$hint' => t('Examples: Robert Morgenstein, Fishing'),
33 '$findthem' => t('Find'),
34 '$suggest' => t('Friend Suggestions'),
35 '$similar' => t('Similar Interests'),
36 '$random' => t('Random Profile'),
37 '$inv' => t('Invite Friends')
43 function networks_widget($baseurl,$selected = '') {
51 $r = q("select distinct(network) from contact where uid = %d and self = 0",
57 require_once('include/contact_selectors.php');
60 $nets[] = array('ref' => $rr['network'], 'name' => network_to_name($rr['network']), 'selected' => (($selected == $rr['network']) ? 'selected' : '' ));
67 return replace_macros(get_markup_template('nets.tpl'),array(
68 '$title' => t('Networks'),
70 '$sel_all' => (($selected == '') ? 'selected' : ''),
71 '$all' => t('All Networks'),
78 function fileas_widget($baseurl,$selected = '') {
83 $saved = get_pconfig(local_user(),'system','filetags');
89 $cnt = preg_match_all('/\[(.*?)\]/',$saved,$matches,PREG_SET_ORDER);
91 foreach($matches as $mtch) {
92 $unescaped = xmlify(file_tag_decode($mtch[1]));
93 $terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : ''));
97 return replace_macros(get_markup_template('fileas_widget.tpl'),array(
98 '$title' => t('Saved Folders'),
100 '$sel_all' => (($selected == '') ? 'selected' : ''),
101 '$all' => t('Everything'),
108 function categories_widget($baseurl,$selected = '') {
111 $saved = get_pconfig($a->profile['profile_uid'],'system','filetags');
117 $cnt = preg_match_all('/<(.*?)>/',$saved,$matches,PREG_SET_ORDER);
119 foreach($matches as $mtch) {
120 $unescaped = xmlify(file_tag_decode($mtch[1]));
121 $terms[] = array('name' => $unescaped,'selected' => (($selected == $unescaped) ? 'selected' : ''));
125 return replace_macros(get_markup_template('categories_widget.tpl'),array(
126 '$title' => t('Categories'),
128 '$sel_all' => (($selected == '') ? 'selected' : ''),
129 '$all' => t('Everything'),