4 * Render actions localized
6 function localize_item(&$item){
8 if ($item['verb']=== ACTIVITY_LIKE || $item['verb']=== ACTIVITY_DISLIKE){
10 $r = q("SELECT * from `item`,`contact` WHERE
11 `item`.`contact-id`=`contact`.`id` AND `item`.`uri`='%s';",
12 dbesc($item['parent-uri']));
13 if(count($r)==0) return;
16 $author = '[url=' . $item['author-link'] . ']' . $item['author-name'] . '[/url]';
17 $objauthor = '[url=' . $obj['author-link'] . ']' . $obj['author-name'] . '[/url]';
21 switch ($obj['object-type']){
22 case ACTIVITY_OBJ_EVENT:
23 $post_type = t('event');
26 $post_type = t('status');
30 if($obj['resource-id']){
31 $post_type = t('photo');
32 $m=array(); preg_match("/\[url=([^]]*)\]/", $obj['body'], $m);
35 $post_type = t('status');
39 $plink = '[url=' . $obj['plink'] . ']' . $post_type . '[/url]';
41 switch($item['verb']){
43 $bodyverb = t('%1$s likes %2$s\'s %3$s');
45 case ACTIVITY_DISLIKE:
46 $bodyverb = t('%1$s doesn\'t like %2$s\'s %3$s');
49 $item['body'] = sprintf($bodyverb, $author, $objauthor, $plink);
52 if ($item['verb']=== ACTIVITY_FRIEND){
54 if ($item['object-type']=="" || $item['object-type']!== ACTIVITY_OBJ_PERSON) return;
56 $Aname = $item['author-name'];
57 $Alink = $item['author-link'];
59 $xmlhead="<"."?xml version='1.0' encoding='UTF-8' ?".">";
61 $obj = parse_xml_string($xmlhead.$item['object']);
62 $links = parse_xml_string($xmlhead."<links>".unxmlify($obj->link)."</links>");
65 $Blink = ""; $Bphoto = "";
66 foreach ($links->link as $l){
67 $atts = $l->attributes();
69 case "alternate": $Blink = $atts['href'];
70 case "photo": $Bphoto = $atts['href'];
75 $A = '[url=' . $Alink . ']' . $Aname . '[/url]';
76 $B = '[url=' . $Blink . ']' . $Bname . '[/url]';
77 if ($Bphoto!="") $Bphoto = '[url=' . $Blink . '][img]' . $Bphoto . '[/img][/url]';
79 $item['body'] = sprintf( t('%1$s is now friends with %2$s'), $A, $B)."\n\n\n".$Bphoto;
87 * "Render" a conversation or list of items for HTML display.
88 * There are two major forms of display:
89 * - Sequential or unthreaded ("New Item View" or search results)
91 * The $mode parameter decides between the various renderings and also
92 * figures out how to determine page owner and other contextual items
93 * that are based on unique features of the calling module.
96 function conversation(&$a, $items, $mode, $update) {
98 require_once('bbcode.php');
101 $page_writeable = false;
103 if($mode === 'network') {
104 $profile_owner = local_user();
105 $page_writeable = true;
108 if($mode === 'profile') {
109 $profile_owner = $a->profile['profile_uid'];
110 $page_writeable = can_write_wall($a,$profile_owner);
113 if($mode === 'notes') {
114 $profile_owner = local_user();
115 $page_writeable = true;
118 if($mode === 'display') {
119 $profile_owner = $a->profile['uid'];
120 $page_writeable = can_write_wall($a,$profile_owner);
123 if($mode === 'community') {
125 $page_writeable = false;
129 $return_url = $_SESSION['return_url'];
131 $return_url = $_SESSION['return_url'] = $a->cmd;
133 load_contact_links(local_user());
136 $cmnt_tpl = get_markup_template('comment_item.tpl');
137 $tpl = get_markup_template('wall_item.tpl');
138 $wallwall = get_markup_template('wallwall_item.tpl');
144 // array with html for each thread (parent+comments)
150 if($mode === 'network-new' || $mode === 'search' || $mode === 'community') {
152 // "New Item View" on network page or search page results
153 // - just loop through the items and format them minimally for display
155 $tpl = get_markup_template('search_item.tpl');
157 foreach($items as $item) {
166 if($mode === 'search' || $mode === 'community') {
167 if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE)))
168 && ($item['id'] != $item['parent']))
170 $nickname = $item['nickname'];
173 $nickname = $a->user['nickname'];
175 $profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']);
178 $profile_link = best_link_url($item,$sp);
180 $sparkle = ' sparkle';
181 if($profile_link === 'mailbox')
185 $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
186 if(($normalised != 'mailbox') && (x($a->contacts[$normalised])))
187 $profile_avatar = $a->contacts[$normalised]['thumb'];
189 $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']);
191 $location = (($item['location']) ? '<a target="map" title="' . $item['location'] . '" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : '');
192 $coord = (($item['coord']) ? '<a target="map" title="' . $item['coord'] . '" href="http://maps.google.com/?q=' . urlencode($item['coord']) . '">' . $item['coord'] . '</a>' : '');
195 $location .= '<br /><span class="smalltext">(' . $coord . ')</span>';
197 $location = '<span class="smalltext">' . $coord . '</span>';
201 localize_item($item);
202 if($mode === 'network-new')
209 'dropping' => $dropping,
210 'select' => t('Select'),
211 'delete' => t('Delete'),
215 $isstarred = "unstarred";
218 $likebuttons = false;
221 $body = prepare_body($item,true);
223 $treads[$treadsid] .= replace_macros($tpl,array(
224 '$id' => $item['item_id'],
225 '$linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
226 '$profile_url' => $profile_link,
227 '$item_photo_menu' => item_photo_menu($item),
228 '$name' => template_escape($profile_name),
229 '$sparkle' => $sparkle,
231 '$thumb' => $profile_avatar,
232 '$title' => template_escape($item['title']),
233 '$body' => template_escape($body),
234 '$ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
236 '$location' => template_escape($location),
238 '$owner_name' => template_escape($owner_name),
239 '$owner_url' => $owner_url,
240 '$owner_photo' => $owner_photo,
241 '$plink' => get_plink($item),
243 '$isstarred' => $isstarred,
246 '$vote' => $likebuttons,
250 '$conv' => array('href'=> $a->get_baseurl() . '/display/' . $nickname . '/' . $item['id'], 'title'=> t('View in context')),
251 '$wait' => t('Please wait'),
262 // Figure out how many comments each parent has
263 // (Comments all have gravity of 6)
264 // Store the result in the $comments array
267 foreach($items as $item) {
268 if((intval($item['gravity']) == 6) && ($item['id'] != $item['parent'])) {
269 if(! x($comments,$item['parent']))
270 $comments[$item['parent']] = 1;
272 $comments[$item['parent']] += 1;
276 // map all the like/dislike activities for each parent item
277 // Store these in the $alike and $dlike arrays
279 foreach($items as $item) {
280 like_puller($a,$item,$alike,'like');
281 like_puller($a,$item,$dlike,'dislike');
284 $comments_collapsed = false;
289 foreach($items as $item) {
295 $owner_url = $owner_photo = $owner_name = '';
297 // We've already parsed out like/dislike for special treatment. We can ignore them now
299 if(((activity_match($item['verb'],ACTIVITY_LIKE))
300 || (activity_match($item['verb'],ACTIVITY_DISLIKE)))
301 && ($item['id'] != $item['parent']))
304 $toplevelpost = (($item['id'] == $item['parent']) ? true : false);
305 $toplevelprivate = false;
307 // Take care of author collapsing and comment collapsing
308 // If a single author has more than 3 consecutive top-level posts, squash the remaining ones.
309 // If there are more than two comments, squash all but the last 2.
312 $toplevelprivate = (($toplevelpost && $item['private']) ? true : false);
313 $item_writeable = (($item['writable'] || $item['self']) ? true : false);
315 /*if($blowhard == $item['cid'] && (! $item['self']) && ($mode != 'profile') && ($mode != 'notes')) {
317 if($blowhard_count == 3) {
318 $o .= '<div class="icollapse-wrapper fakelink" id="icollapse-wrapper-' . $item['parent']
319 . '" onclick="openClose(' . '\'icollapse-' . $item['parent'] . '\'); $(\'#icollapse-wrapper-' . $item['parent'] . '\').hide();" >'
320 . t('See more posts like this') . '</div>' . '<div class="icollapse" id="icollapse-'
321 . $item['parent'] . '" style="display: none;" >';
325 $blowhard = $item['cid'];
326 if($blowhard_count >= 3)
332 $comments_collapsed = false;
335 $treads[$treadsid] = "";
338 // prevent private email from leaking into public conversation
339 if((! $toplevelpost) && (! toplevelprivate) && ($item['private']) && ($profile_owner != local_user()))
344 $override_comment_box = ((($page_writeable) && ($item_writeable)) ? true : false);
345 $show_comment_box = ((($page_writeable) && ($item_writeable) && ($comments_seen == $comments[$item['parent']])) ? true : false);
347 if(($comments[$item['parent']] > 2) && ($comments_seen <= ($comments[$item['parent']] - 2)) && ($item['gravity'] == 6)) {
348 if(! $comments_collapsed) {
349 $treads[$treadsid] .= '<div class="ccollapse-wrapper fakelink" id="ccollapse-wrapper-' . $item['parent']
350 . '" onclick="openClose(' . '\'ccollapse-' . $item['parent'] . '\'); $(\'#ccollapse-wrapper-' . $item['parent'] . '\').hide();" >'
351 . sprintf( t('See all %d comments'), $comments[$item['parent']]) . '</div>'
352 . '<div class="ccollapse" id="ccollapse-' . $item['parent'] . '" style="display: none;" >';
353 $comments_collapsed = true;
356 if(($comments[$item['parent']] > 2) && ($comments_seen == ($comments[$item['parent']] - 1))) {
357 $treads[$treadsid] .= '</div>';
360 $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
362 $lock = ((($item['private']) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
363 || strlen($item['deny_cid']) || strlen($item['deny_gid']))))
364 ? t('Private Message')
368 // Top-level wall post not written by the wall owner (wall-to-wall)
369 // First figure out who owns it.
373 if(($toplevelpost) && (! $item['self']) && ($mode !== 'profile')) {
377 // On the network page, I am the owner. On the display page it will be the profile owner.
378 // This will have been stored in $a->page_contact by our calling page.
379 // Put this person on the left of the wall-to-wall notice.
381 $owner_url = $a->page_contact['url'];
382 $owner_photo = $a->page_contact['thumb'];
383 $owner_name = $a->page_contact['name'];
384 $template = $wallwall;
387 if((! $item['wall']) && (strlen($item['owner-link'])) && ($item['owner-link'] != $item['author-link'])) {
391 $owner_url = $item['owner-link'];
392 $owner_photo = $item['owner-avatar'];
393 $owner_name = $item['owner-name'];
394 $template = $wallwall;
396 // If it is our contact, use a friendly redirect link
397 if((link_compare($item['owner-link'],$item['url']))
398 && ($item['network'] === 'dfrn')) {
399 $owner_url = $redirect_url;
400 $osparkle = ' sparkle';
406 $shareable = ((($profile_owner == local_user()) && ($mode != 'display') && (! $item['private'])) ? true : false);
408 if($page_writeable) {
410 $likebuttons = array(
411 'like' => array( t("I like this \x28toggle\x29"), t("like")),
412 'dislike' => array( t("I don't like this \x28toggle\x29"), t("dislike")),
414 if ($shareable) $likebuttons['share'] = array( t('Share this'), t('share'));
417 if(($show_comment_box) || (($show_comment_box == false) && ($override_comment_box == false) && ($item['last-child']))) {
418 $comment = replace_macros($cmnt_tpl,array(
419 '$return_path' => '',
420 '$jsreload' => (($mode === 'display') ? $_SESSION['return_url'] : ''),
421 '$type' => (($mode === 'profile') ? 'wall-comment' : 'net-comment'),
422 '$id' => $item['item_id'],
423 '$parent' => $item['parent'],
424 '$profile_uid' => $profile_owner,
425 '$mylink' => $a->contact['url'],
426 '$mytitle' => t('This is you'),
427 '$myphoto' => $a->contact['thumb'],
428 '$comment' => t('Comment'),
429 '$submit' => t('Submit'),
430 '$ww' => (($mode === 'network') ? $commentww : '')
435 $edpost = (((($profile_owner == local_user()) && ($toplevelpost) && (intval($item['wall']) == 1)) || ($mode === 'notes'))
436 ? array($a->get_baseurl()."/editpost/".$item['id'], t("Edit"))
443 if((intval($item['contact-id']) && $item['contact-id'] == remote_user()) || ($item['uid'] == local_user()))
447 'dropping' => $dropping,
448 'select' => t('Select'),
449 'delete' => t('Delete'),
453 $starred = "unstarred";
454 if ($profile_owner == local_user() && $toplevelpost) {
455 $isstarred = (($item['starred']) ? "starred" : "unstarred");
458 'do' => t("add star"),
459 'undo' => t("remove star"),
460 'toggle' => t("toggle star status"),
461 'classdo' => (($item['starred']) ? "hidden" : ""),
462 'classundo' => (($item['starred']) ? "" : "hidden"),
463 'starred' => t('starred'),
469 $photo = $item['photo'];
470 $thumb = $item['thumb'];
472 // Post was remotely authored.
474 $diff_author = ((link_compare($item['url'],$item['author-link'])) ? false : true);
476 $profile_name = (((strlen($item['author-name'])) && $diff_author) ? $item['author-name'] : $item['name']);
479 $profile_link = best_link_url($item,$sp);
481 $sparkle = ' sparkle';
483 if($profile_link === 'mailbox')
486 $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
487 if(($normalised != 'mailbox') && (x($a->contacts,$normalised)))
488 $profile_avatar = $a->contacts[$normalised]['thumb'];
490 $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $thumb);
496 $like = ((x($alike,$item['id'])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');
497 $dislike = ((x($dlike,$item['id'])) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : '');
499 $location = (($item['location']) ? '<a target="map" title="' . $item['location']
500 . '" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : '');
501 $coord = (($item['coord']) ? '<a target="map" title="' . $item['coord']
502 . '" href="http://maps.google.com/?q=' . urlencode($item['coord']) . '">' . $item['coord'] . '</a>' : '');
505 $location .= '<br /><span class="smalltext">(' . $coord . ')</span>';
507 $location = '<span class="smalltext">' . $coord . '</span>';
510 $indent = (($toplevelpost) ? '' : ' comment');
512 if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
516 localize_item($item);
520 $body = prepare_body($item,true);
523 $tmp_item = replace_macros($template,array(
524 '$body' => template_escape($body),
525 '$id' => $item['item_id'],
526 '$linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
527 '$olinktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['owner-link'])) ? $item['owner-link'] : $item['url'])),
529 '$wall' => t('Wall-to-Wall'),
530 '$vwall' => t('via Wall-To-Wall:'),
531 '$profile_url' => $profile_link,
532 '$item_photo_menu' => item_photo_menu($item),
533 '$name' => template_escape($profile_name),
534 '$thumb' => $profile_avatar,
535 '$osparkle' => $osparkle,
536 '$sparkle' => $sparkle,
537 '$title' => template_escape($item['title']),
538 '$ago' => ((($item['app']) && ($item['id'] == $item['parent'])) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
540 '$location' => template_escape($location),
541 '$indent' => $indent,
542 '$owner_url' => $owner_url,
543 '$owner_photo' => $owner_photo,
544 '$owner_name' => template_escape($owner_name),
545 '$plink' => get_plink($item),
546 '$edpost' => $edpost,
547 '$isstarred' => $isstarred,
550 '$vote' => $likebuttons,
552 '$dislike' => $dislike,
553 '$comment' => $comment,
554 '$wait' => t('Please wait'),
559 $arr = array('item' => $item, 'output' => $tmp_item);
560 call_hooks('display_item', $arr);
562 $treads[$treadsid] .= $arr['output'];
568 // if author collapsing is in force but didn't get closed, close it off now.
570 /*if($blowhard_count >= 3)
571 $treads[$treadsid] .= '</div>';*/
573 $page_template = get_markup_template("conversation.tpl");
574 $o .= replace_macros($page_template, array(
575 '$treads' => $treads,
576 '$dropping' => ($dropping?t('Delete Selected Items'):False),
582 function best_link_url($item,&$sparkle) {
589 $clean_url = normalise_link($item['author-link']);
591 if((local_user()) && (local_user() == $item['uid'])) {
592 if(isset($a->contacts) && x($a->contacts,$clean_url)) {
593 if($a->contacts[$clean_url]['network'] === NETWORK_DFRN) {
594 $best_url = $a->get_baseurl() . '/redir/' . $a->contacts[$clean_url]['id'];
598 $best_url = $a->contacts[$clean_url]['url'];
602 if(strlen($item['author-link']))
603 $best_url = $item['author-link'];
605 $best_url = $item['url'];
612 if(! function_exists('item_photo_menu')){
613 function item_photo_menu($item){
616 if (local_user() && (! count($a->contacts)))
617 load_contact_links(local_user());
626 $profile_link = best_link_url($item,$sparkle);
627 if($profile_link === 'mailbox')
631 $cid = intval(basename($profile_link));
632 $status_link = $profile_link . "?url=status";
633 $photos_link = $profile_link . "?url=photos";
634 $profile_link = $profile_link . "?url=profile";
635 $pm_url = $a->get_baseurl() . '/message/new/' . $cid;
638 if(local_user() && local_user() == $item['uid'] && link_compare($item['url'],$item['author-link'])) {
639 $cid = $item['contact-id'];
645 if(($cid) && (! $item['self'])) {
646 $contact_url = $a->get_baseurl() . '/contacts/' . $cid;
647 $posts_link = $a->get_baseurl() . '/network/?cid=' . $cid;
651 t("View status") => $status_link,
652 t("View profile") => $profile_link,
653 t("View photos") => $photos_link,
654 t("View recent") => $posts_link,
655 t("Edit contact") => $contact_url,
656 t("Send PM") => $pm_url,
660 $args = array($item, &$menu);
662 call_hooks('item_photo_menu', $args);
665 foreach($menu as $k=>$v){
666 if ($v!="") $o .= "<li><a href='$v'>$k</a></li>\n";
671 if(! function_exists('like_puller')) {
672 function like_puller($a,$item,&$arr,$mode) {
676 $verb = (($mode === 'like') ? ACTIVITY_LIKE : ACTIVITY_DISLIKE);
678 if((activity_match($item['verb'],$verb)) && ($item['id'] != $item['parent'])) {
679 $url = $item['author-link'];
680 if((local_user()) && (local_user() == $item['uid']) && ($item['network'] === 'dfrn') && (! $item['self']) && (link_compare($item['author-link'],$item['url']))) {
681 $url = $a->get_baseurl() . '/redir/' . $item['contact-id'];
682 $sparkle = ' class="sparkle" ';
684 if(! ((isset($arr[$item['parent'] . '-l'])) && (is_array($arr[$item['parent'] . '-l']))))
685 $arr[$item['parent'] . '-l'] = array();
686 if(! isset($arr[$item['parent']]))
687 $arr[$item['parent']] = 1;
689 $arr[$item['parent']] ++;
690 $arr[$item['parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['author-name'] . '</a>';
695 // Format the like/dislike text for a profile item
696 // $cnt = number of people who like/dislike the item
697 // $arr = array of pre-linked names of likers/dislikers
698 // $type = one of 'like, 'dislike'
700 // returns formatted text
702 if(! function_exists('format_like')) {
703 function format_like($cnt,$arr,$type,$id) {
706 $o .= (($type === 'like') ? sprintf( t('%s likes this.'), $arr[0]) : sprintf( t('%s doesn\'t like this.'), $arr[0])) . EOL ;
708 $spanatts = 'class="fakelink" onclick="openClose(\'' . $type . 'list-' . $id . '\');"';
709 $o .= (($type === 'like') ?
710 sprintf( t('<span %1$s>%2$d people</span> like this.'), $spanatts, $cnt)
712 sprintf( t('<span %1$s>%2$d people</span> don\'t like this.'), $spanatts, $cnt) );
714 $total = count($arr);
715 if($total >= MAX_LIKERS)
716 $arr = array_slice($arr, 0, MAX_LIKERS - 1);
717 if($total < MAX_LIKERS)
718 $arr[count($arr)-1] = t('and') . ' ' . $arr[count($arr)-1];
719 $str = implode(', ', $arr);
720 if($total >= MAX_LIKERS)
721 $str .= sprintf( t(', and %d other people'), $total - MAX_LIKERS );
722 $str = (($type === 'like') ? sprintf( t('%s like this.'), $str) : sprintf( t('%s don\'t like this.'), $str));
723 $o .= "\t" . '<div id="' . $type . 'list-' . $id . '" style="display: none;" >' . $str . '</div>';
729 function status_editor($a,$x, $notes_cid = 0) {
733 $geotag = (($x['allow_location']) ? get_markup_template('jot_geotag.tpl') : '');
735 $tpl = get_markup_template('jot-header.tpl');
737 $a->page['htmlhead'] .= replace_macros($tpl, array(
738 '$baseurl' => $a->get_baseurl(),
739 '$geotag' => $geotag,
740 '$nickname' => $x['nickname'],
741 '$ispublic' => t('Visible to <strong>everybody</strong>'),
742 '$linkurl' => t('Please enter a link URL:'),
743 '$utubeurl' => t('Please enter a YouTube link:'),
744 '$vidurl' => t("Please enter a video\x28.ogg\x29 link/URL:"),
745 '$audurl' => t("Please enter an audio\x28.ogg\x29 link/URL:"),
746 '$whereareu' => t('Where are you right now?'),
747 '$title' => t('Enter a title for this item')
751 $tpl = get_markup_template("jot.tpl");
756 $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
758 $mail_enabled = false;
759 $pubmail_enabled = false;
761 if(($x['is_owner']) && (! $mail_disabled)) {
762 $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1",
766 $mail_enabled = true;
767 if(intval($r[0]['pubmail']))
768 $pubmail_enabled = true;
773 $selected = (($pubmail_enabled) ? ' checked="checked" ' : '');
774 $jotnets .= '<div class="profile-jot-net"><input type="checkbox" name="pubmail_enable"' . $selected . ' value="1" /> '
775 . t("Post to Email") . '</div>';
778 call_hooks('jot_tool', $jotplugins);
779 call_hooks('jot_networks', $jotnets);
782 $jotnets .= '<input type="hidden" name="contact_allow[]" value="' . $notes_cid .'" />';
784 $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins));
786 $o .= replace_macros($tpl,array(
787 '$return_path' => $a->cmd,
789 '$share' => (($x['button']) ? $x['button'] : t('Share')),
790 '$upload' => t('Upload photo'),
791 '$attach' => t('Attach file'),
792 '$weblink' => t('Insert web link'),
793 '$youtube' => t('Insert YouTube video'),
794 '$video' => t('Insert Vorbis [.ogg] video'),
795 '$audio' => t('Insert Vorbis [.ogg] audio'),
796 '$setloc' => t('Set your location'),
797 '$noloc' => t('Clear browser location'),
798 '$title' => t('Set title'),
799 '$wait' => t('Please wait'),
800 '$permset' => t('Permission settings'),
801 '$ptyp' => (($notes_cid) ? 'note' : 'wall'),
804 '$baseurl' => $a->get_baseurl(),
805 '$defloc' => $x['default_location'],
806 '$visitor' => $x['visitor'],
807 '$pvisit' => (($notes_cid) ? 'none' : $x['visitor']),
808 '$emailcc' => t('CC: email addresses'),
809 '$public' => t('Public post'),
810 '$jotnets' => $jotnets,
811 '$emtitle' => t('Example: bob@example.com, mary@example.com'),
812 '$lockstate' => $x['lockstate'],
814 '$bang' => $x['bang'],
815 '$profile_uid' => $x['profile_uid'],