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');
145 if($mode === 'network-new' || $mode === 'search' || $mode === 'community') {
147 // "New Item View" on network page or search page results
148 // - just loop through the items and format them minimally for display
150 $tpl = get_markup_template('search_item.tpl');
152 foreach($items as $item) {
160 if($mode === 'search' || $mode === 'community') {
161 if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE)))
162 && ($item['id'] != $item['parent']))
164 $nickname = $item['nickname'];
167 $nickname = $a->user['nickname'];
169 $profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']);
172 $profile_link = best_link_url($item,$sp);
174 $sparkle = ' sparkle';
175 if($profile_link === 'mailbox')
179 $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
180 if(($normalised != 'mailbox') && (x($a->contacts[$normalised])))
181 $profile_avatar = $a->contacts[$normalised]['thumb'];
183 $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']);
185 $location = (($item['location']) ? '<a target="map" title="' . $item['location'] . '" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : '');
186 $coord = (($item['coord']) ? '<a target="map" title="' . $item['coord'] . '" href="http://maps.google.com/?q=' . urlencode($item['coord']) . '">' . $item['coord'] . '</a>' : '');
189 $location .= '<br /><span class="smalltext">(' . $coord . ')</span>';
191 $location = '<span class="smalltext">' . $coord . '</span>';
196 localize_item($item);
197 if($mode === 'network-new')
198 $t = "#TODO:drop#"; //$droptpl;
200 $t = "#TODO:fakedrop#"; //$fakedrop;
202 $drop = replace_macros($t,array('$id' => $item['id']));
203 $lock = '<div class="wall-item-lock"></div>';
206 $body = prepare_body($item,true);
208 $o .= replace_macros($tpl,array(
209 '$id' => $item['item_id'],
210 '$linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
211 '$profile_url' => $profile_link,
212 '$item_photo_menu' => item_photo_menu($item),
213 '$name' => template_escape($profile_name),
214 '$sparkle' => $sparkle,
216 '$thumb' => $profile_avatar,
217 '$title' => template_escape($item['title']),
218 '$body' => template_escape($body),
219 '$ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
220 '$location' => template_escape($location),
222 '$owner_url' => $owner_url,
223 '$owner_photo' => $owner_photo,
224 '$owner_name' => template_escape($owner_name),
227 '$conv' => '<a href="' . $a->get_baseurl() . '/display/' . $nickname . '/' . $item['id'] . '">' . t('View in context') . '</a>'
241 // Figure out how many comments each parent has
242 // (Comments all have gravity of 6)
243 // Store the result in the $comments array
246 foreach($items as $item) {
247 if((intval($item['gravity']) == 6) && ($item['id'] != $item['parent'])) {
248 if(! x($comments,$item['parent']))
249 $comments[$item['parent']] = 1;
251 $comments[$item['parent']] += 1;
255 // map all the like/dislike activities for each parent item
256 // Store these in the $alike and $dlike arrays
258 foreach($items as $item) {
259 like_puller($a,$item,$alike,'like');
260 like_puller($a,$item,$dlike,'dislike');
263 $comments_collapsed = false;
267 // array with html for each thread (parent+comments)
271 foreach($items as $item) {
277 $owner_url = $owner_photo = $owner_name = '';
279 // We've already parsed out like/dislike for special treatment. We can ignore them now
281 if(((activity_match($item['verb'],ACTIVITY_LIKE))
282 || (activity_match($item['verb'],ACTIVITY_DISLIKE)))
283 && ($item['id'] != $item['parent']))
286 $toplevelpost = (($item['id'] == $item['parent']) ? true : false);
287 $toplevelprivate = false;
289 // Take care of author collapsing and comment collapsing
290 // If a single author has more than 3 consecutive top-level posts, squash the remaining ones.
291 // If there are more than two comments, squash all but the last 2.
294 $toplevelprivate = (($toplevelpost && $item['private']) ? true : false);
295 $item_writeable = (($item['writable'] || $item['self']) ? true : false);
297 /*if($blowhard == $item['cid'] && (! $item['self']) && ($mode != 'profile') && ($mode != 'notes')) {
299 if($blowhard_count == 3) {
300 $o .= '<div class="icollapse-wrapper fakelink" id="icollapse-wrapper-' . $item['parent']
301 . '" onclick="openClose(' . '\'icollapse-' . $item['parent'] . '\'); $(\'#icollapse-wrapper-' . $item['parent'] . '\').hide();" >'
302 . t('See more posts like this') . '</div>' . '<div class="icollapse" id="icollapse-'
303 . $item['parent'] . '" style="display: none;" >';
307 $blowhard = $item['cid'];
308 if($blowhard_count >= 3)
314 $comments_collapsed = false;
317 $treads[$treadsid] = "";
320 // prevent private email from leaking into public conversation
321 if((! $toplevelpost) && (! toplevelprivate) && ($item['private']) && ($profile_owner != local_user()))
326 $override_comment_box = ((($page_writeable) && ($item_writeable)) ? true : false);
327 $show_comment_box = ((($page_writeable) && ($item_writeable) && ($comments_seen == $comments[$item['parent']])) ? true : false);
329 if(($comments[$item['parent']] > 2) && ($comments_seen <= ($comments[$item['parent']] - 2)) && ($item['gravity'] == 6)) {
330 if(! $comments_collapsed) {
331 $treads[$treadsid] .= '<div class="ccollapse-wrapper fakelink" id="ccollapse-wrapper-' . $item['parent']
332 . '" onclick="openClose(' . '\'ccollapse-' . $item['parent'] . '\'); $(\'#ccollapse-wrapper-' . $item['parent'] . '\').hide();" >'
333 . sprintf( t('See all %d comments'), $comments[$item['parent']]) . '</div>'
334 . '<div class="ccollapse" id="ccollapse-' . $item['parent'] . '" style="display: none;" >';
335 $comments_collapsed = true;
338 if(($comments[$item['parent']] > 2) && ($comments_seen == ($comments[$item['parent']] - 1))) {
339 $treads[$treadsid] .= '</div>';
342 $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
344 $lock = ((($item['private']) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid'])
345 || strlen($item['deny_cid']) || strlen($item['deny_gid']))))
346 ? t('Private Message')
350 // Top-level wall post not written by the wall owner (wall-to-wall)
351 // First figure out who owns it.
355 if(($toplevelpost) && (! $item['self']) && ($mode !== 'profile')) {
359 // On the network page, I am the owner. On the display page it will be the profile owner.
360 // This will have been stored in $a->page_contact by our calling page.
361 // Put this person on the left of the wall-to-wall notice.
363 $owner_url = $a->page_contact['url'];
364 $owner_photo = $a->page_contact['thumb'];
365 $owner_name = $a->page_contact['name'];
366 $template = $wallwall;
369 if((! $item['wall']) && (strlen($item['owner-link'])) && ($item['owner-link'] != $item['author-link'])) {
373 $owner_url = $item['owner-link'];
374 $owner_photo = $item['owner-avatar'];
375 $owner_name = $item['owner-name'];
376 $template = $wallwall;
378 // If it is our contact, use a friendly redirect link
379 if((link_compare($item['owner-link'],$item['url']))
380 && ($item['network'] === 'dfrn')) {
381 $owner_url = $redirect_url;
382 $osparkle = ' sparkle';
388 $shareable = ((($profile_owner == local_user()) && ($mode != 'display') && (! $item['private'])) ? true : false);
390 if($page_writeable) {
392 $likebuttons = array(
393 'like' => array( t("I like this \x28toggle\x29"), t("like")),
394 'dislike' => array( t("I don't like this \x28toggle\x29"), t("dislike")),
396 if ($shareable) $likebuttons['share'] = array( t('Share this'), t('share'));
399 if(($show_comment_box) || (($show_comment_box == false) && ($override_comment_box == false) && ($item['last-child']))) {
400 $comment = replace_macros($cmnt_tpl,array(
401 '$return_path' => '',
402 '$jsreload' => (($mode === 'display') ? $_SESSION['return_url'] : ''),
403 '$type' => (($mode === 'profile') ? 'wall-comment' : 'net-comment'),
404 '$id' => $item['item_id'],
405 '$parent' => $item['parent'],
406 '$profile_uid' => $profile_owner,
407 '$mylink' => $a->contact['url'],
408 '$mytitle' => t('This is you'),
409 '$myphoto' => $a->contact['thumb'],
410 '$comment' => t('Comment'),
411 '$submit' => t('Submit'),
412 '$ww' => (($mode === 'network') ? $commentww : '')
417 $edpost = (((($profile_owner == local_user()) && ($toplevelpost) && (intval($item['wall']) == 1)) || ($mode === 'notes'))
418 ? array($a->get_baseurl()."/editpost/".$item['id'], t("Edit"))
425 if((intval($item['contact-id']) && $item['contact-id'] == remote_user()) || ($item['uid'] == local_user()))
429 'dropping' => $dropping,
430 'select' => t('Select'),
431 'delete' => t('Delete'),
436 if ($profile_owner == local_user() && $toplevelpost) {
437 $isstarred = (($item['starred']) ? "starred" : "unstarred");
440 'do' => t("add star"),
441 'undo' => t("remove star"),
442 'toggle' => t("toggle star status"),
443 'classdo' => (($item['starred']) ? "hidden" : ""),
444 'classundo' => (($item['starred']) ? "" : "hidden"),
445 'starred' => t('starred'),
451 $photo = $item['photo'];
452 $thumb = $item['thumb'];
454 // Post was remotely authored.
456 $diff_author = ((link_compare($item['url'],$item['author-link'])) ? false : true);
458 $profile_name = (((strlen($item['author-name'])) && $diff_author) ? $item['author-name'] : $item['name']);
461 $profile_link = best_link_url($item,$sp);
463 $sparkle = ' sparkle';
465 if($profile_link === 'mailbox')
468 $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']);
469 if(($normalised != 'mailbox') && (x($a->contacts,$normalised)))
470 $profile_avatar = $a->contacts[$normalised]['thumb'];
472 $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $thumb);
478 $like = ((x($alike,$item['id'])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');
479 $dislike = ((x($dlike,$item['id'])) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : '');
481 $location = (($item['location']) ? '<a target="map" title="' . $item['location']
482 . '" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : '');
483 $coord = (($item['coord']) ? '<a target="map" title="' . $item['coord']
484 . '" href="http://maps.google.com/?q=' . urlencode($item['coord']) . '">' . $item['coord'] . '</a>' : '');
487 $location .= '<br /><span class="smalltext">(' . $coord . ')</span>';
489 $location = '<span class="smalltext">' . $coord . '</span>';
492 $indent = (($toplevelpost) ? '' : ' comment');
494 if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
498 localize_item($item);
502 $body = prepare_body($item,true);
505 $tmp_item = replace_macros($template,array(
506 '$body' => template_escape($body),
507 '$id' => $item['item_id'],
508 '$linktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['author-link'])) ? $item['author-link'] : $item['url'])),
509 '$olinktitle' => sprintf( t('View %s\'s profile @ %s'), $profile_name, ((strlen($item['owner-link'])) ? $item['owner-link'] : $item['url'])),
511 '$wall' => t('Wall-to-Wall'),
512 '$vwall' => t('via Wall-To-Wall:'),
513 '$profile_url' => $profile_link,
514 '$item_photo_menu' => item_photo_menu($item),
515 '$name' => template_escape($profile_name),
516 '$thumb' => $profile_avatar,
517 '$osparkle' => $osparkle,
518 '$sparkle' => $sparkle,
519 '$title' => template_escape($item['title']),
520 '$ago' => ((($item['app']) && ($item['id'] == $item['parent'])) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
522 '$location' => template_escape($location),
523 '$indent' => $indent,
524 '$owner_url' => $owner_url,
525 '$owner_photo' => $owner_photo,
526 '$owner_name' => template_escape($owner_name),
527 '$plink' => get_plink($item),
528 '$edpost' => $edpost,
529 '$isstarred' => $isstarred,
532 '$vote' => $likebuttons,
534 '$dislike' => $dislike,
535 '$comment' => $comment,
536 '$wait' => t('Please wait'),
541 $arr = array('item' => $item, 'output' => $tmp_item);
542 call_hooks('display_item', $arr);
544 $treads[$treadsid] .= $arr['output'];
550 // if author collapsing is in force but didn't get closed, close it off now.
552 /*if($blowhard_count >= 3)
553 $treads[$treadsid] .= '</div>';*/
555 $page_template = get_markup_template("conversation.tpl");
556 $o .= replace_macros($page_template, array(
557 '$treads' => $treads,
558 '$dropping' => ($dropping?t('Delete Selected Items'):False),
564 function best_link_url($item,&$sparkle) {
571 $clean_url = normalise_link($item['author-link']);
573 if((local_user()) && (local_user() == $item['uid'])) {
574 if(isset($a->contacts) && x($a->contacts,$clean_url)) {
575 if($a->contacts[$clean_url]['network'] === NETWORK_DFRN) {
576 $best_url = $a->get_baseurl() . '/redir/' . $a->contacts[$clean_url]['id'];
580 $best_url = $a->contacts[$clean_url]['url'];
584 if(strlen($item['author-link']))
585 $best_url = $item['author-link'];
587 $best_url = $item['url'];
594 if(! function_exists('item_photo_menu')){
595 function item_photo_menu($item){
598 if (local_user() && (! count($a->contacts)))
599 load_contact_links(local_user());
608 $profile_link = best_link_url($item,$sparkle);
609 if($profile_link === 'mailbox')
613 $cid = intval(basename($profile_link));
614 $status_link = $profile_link . "?url=status";
615 $photos_link = $profile_link . "?url=photos";
616 $profile_link = $profile_link . "?url=profile";
617 $pm_url = $a->get_baseurl() . '/message/new/' . $cid;
620 if(local_user() && local_user() == $item['uid'] && link_compare($item['url'],$item['author-link'])) {
621 $cid = $item['contact-id'];
627 if(($cid) && (! $item['self'])) {
628 $contact_url = $a->get_baseurl() . '/contacts/' . $cid;
629 $posts_link = $a->get_baseurl() . '/network/?cid=' . $cid;
633 t("View status") => $status_link,
634 t("View profile") => $profile_link,
635 t("View photos") => $photos_link,
636 t("View recent") => $posts_link,
637 t("Edit contact") => $contact_url,
638 t("Send PM") => $pm_url,
642 $args = array($item, &$menu);
644 call_hooks('item_photo_menu', $args);
647 foreach($menu as $k=>$v){
648 if ($v!="") $o .= "<li><a href='$v'>$k</a></li>\n";
653 if(! function_exists('like_puller')) {
654 function like_puller($a,$item,&$arr,$mode) {
658 $verb = (($mode === 'like') ? ACTIVITY_LIKE : ACTIVITY_DISLIKE);
660 if((activity_match($item['verb'],$verb)) && ($item['id'] != $item['parent'])) {
661 $url = $item['author-link'];
662 if((local_user()) && (local_user() == $item['uid']) && ($item['network'] === 'dfrn') && (! $item['self']) && (link_compare($item['author-link'],$item['url']))) {
663 $url = $a->get_baseurl() . '/redir/' . $item['contact-id'];
664 $sparkle = ' class="sparkle" ';
666 if(! ((isset($arr[$item['parent'] . '-l'])) && (is_array($arr[$item['parent'] . '-l']))))
667 $arr[$item['parent'] . '-l'] = array();
668 if(! isset($arr[$item['parent']]))
669 $arr[$item['parent']] = 1;
671 $arr[$item['parent']] ++;
672 $arr[$item['parent'] . '-l'][] = '<a href="'. $url . '"'. $sparkle .'>' . $item['author-name'] . '</a>';
677 // Format the like/dislike text for a profile item
678 // $cnt = number of people who like/dislike the item
679 // $arr = array of pre-linked names of likers/dislikers
680 // $type = one of 'like, 'dislike'
682 // returns formatted text
684 if(! function_exists('format_like')) {
685 function format_like($cnt,$arr,$type,$id) {
688 $o .= (($type === 'like') ? sprintf( t('%s likes this.'), $arr[0]) : sprintf( t('%s doesn\'t like this.'), $arr[0])) . EOL ;
690 $spanatts = 'class="fakelink" onclick="openClose(\'' . $type . 'list-' . $id . '\');"';
691 $o .= (($type === 'like') ?
692 sprintf( t('<span %1$s>%2$d people</span> like this.'), $spanatts, $cnt)
694 sprintf( t('<span %1$s>%2$d people</span> don\'t like this.'), $spanatts, $cnt) );
696 $total = count($arr);
697 if($total >= MAX_LIKERS)
698 $arr = array_slice($arr, 0, MAX_LIKERS - 1);
699 if($total < MAX_LIKERS)
700 $arr[count($arr)-1] = t('and') . ' ' . $arr[count($arr)-1];
701 $str = implode(', ', $arr);
702 if($total >= MAX_LIKERS)
703 $str .= sprintf( t(', and %d other people'), $total - MAX_LIKERS );
704 $str = (($type === 'like') ? sprintf( t('%s like this.'), $str) : sprintf( t('%s don\'t like this.'), $str));
705 $o .= "\t" . '<div id="' . $type . 'list-' . $id . '" style="display: none;" >' . $str . '</div>';
711 function status_editor($a,$x, $notes_cid = 0) {
715 $geotag = (($x['allow_location']) ? get_markup_template('jot_geotag.tpl') : '');
717 $tpl = get_markup_template('jot-header.tpl');
719 $a->page['htmlhead'] .= replace_macros($tpl, array(
720 '$baseurl' => $a->get_baseurl(),
721 '$geotag' => $geotag,
722 '$nickname' => $x['nickname'],
723 '$ispublic' => t('Visible to <strong>everybody</strong>'),
724 '$linkurl' => t('Please enter a link URL:'),
725 '$utubeurl' => t('Please enter a YouTube link:'),
726 '$vidurl' => t("Please enter a video\x28.ogg\x29 link/URL:"),
727 '$audurl' => t("Please enter an audio\x28.ogg\x29 link/URL:"),
728 '$whereareu' => t('Where are you right now?'),
729 '$title' => t('Enter a title for this item')
733 $tpl = get_markup_template("jot.tpl");
738 $mail_disabled = ((function_exists('imap_open') && (! get_config('system','imap_disabled'))) ? 0 : 1);
740 $mail_enabled = false;
741 $pubmail_enabled = false;
743 if(($x['is_owner']) && (! $mail_disabled)) {
744 $r = q("SELECT * FROM `mailacct` WHERE `uid` = %d AND `server` != '' LIMIT 1",
748 $mail_enabled = true;
749 if(intval($r[0]['pubmail']))
750 $pubmail_enabled = true;
755 $selected = (($pubmail_enabled) ? ' checked="checked" ' : '');
756 $jotnets .= '<div class="profile-jot-net"><input type="checkbox" name="pubmail_enable"' . $selected . ' value="1" /> '
757 . t("Post to Email") . '</div>';
760 call_hooks('jot_tool', $jotplugins);
761 call_hooks('jot_networks', $jotnets);
764 $jotnets .= '<input type="hidden" name="contact_allow[]" value="' . $notes_cid .'" />';
766 $tpl = replace_macros($tpl,array('$jotplugins' => $jotplugins));
768 $o .= replace_macros($tpl,array(
769 '$return_path' => $a->cmd,
771 '$share' => (($x['button']) ? $x['button'] : t('Share')),
772 '$upload' => t('Upload photo'),
773 '$attach' => t('Attach file'),
774 '$weblink' => t('Insert web link'),
775 '$youtube' => t('Insert YouTube video'),
776 '$video' => t('Insert Vorbis [.ogg] video'),
777 '$audio' => t('Insert Vorbis [.ogg] audio'),
778 '$setloc' => t('Set your location'),
779 '$noloc' => t('Clear browser location'),
780 '$title' => t('Set title'),
781 '$wait' => t('Please wait'),
782 '$permset' => t('Permission settings'),
783 '$ptyp' => (($notes_cid) ? 'note' : 'wall'),
786 '$baseurl' => $a->get_baseurl(),
787 '$defloc' => $x['default_location'],
788 '$visitor' => $x['visitor'],
789 '$pvisit' => (($notes_cid) ? 'none' : $x['visitor']),
790 '$emailcc' => t('CC: email addresses'),
791 '$public' => t('Public post'),
792 '$jotnets' => $jotnets,
793 '$emtitle' => t('Example: bob@example.com, mary@example.com'),
794 '$lockstate' => $x['lockstate'],
796 '$bang' => $x['bang'],
797 '$profile_uid' => $x['profile_uid'],