$newbody .= $origbody;
$cnt = 0;
- foreach($images as $image) {
+ foreach ($images as $image) {
// We're depending on the property of 'foreach' (specified on the PHP website) that
// it loops over the array starting from the first element and going sequentially
// to the last element
// add sparkle links to appropriate permalinks
$x = stristr($item['plink'],'/display/');
- if($x) {
+ if ($x) {
$sparkle = false;
$y = best_link_url($item,$sparkle,true);
- if(strstr($y,'/redir/'))
+
+ if (strstr($y,'/redir/')) {
$item['plink'] = $y . '?f=&url=' . $item['plink'];
+ }
}
`item`.`shadow`,
*/
- return "`item`.`author-link`, `item`.`author-name`, `item`.`author-avatar`,
- `item`.`owner-link`, `item`.`owner-name`, `item`.`owner-avatar`,
+ return "`item`.`author-id`, `item`.`author-link`, `item`.`author-name`, `item`.`author-avatar`,
+ `item`.`owner-id`, `item`.`owner-link`, `item`.`owner-name`, `item`.`owner-avatar`,
`item`.`contact-id`, `item`.`uid`, `item`.`id`, `item`.`parent`,
`item`.`uri`, `item`.`thr-parent`, `item`.`parent-uri`,
`item`.`commented`, `item`.`created`, `item`.`edited`,
*/
if(!function_exists('conversation')) {
-function conversation(&$a, $items, $mode, $update, $preview = false) {
+function conversation(App $a, $items, $mode, $update, $preview = false) {
require_once('include/bbcode.php');
require_once('include/Contact.php');
}
$o = replace_macros($page_template, array(
- '$baseurl' => $a->get_baseurl($ssl_state),
+ '$baseurl' => App::get_baseurl($ssl_state),
'$return_path' => $a->query_string,
'$live_update' => $live_update_div,
'$remove' => t('remove'),
else
$conv_responses[$mode][$item['thr-parent']] ++;
- if((local_user()) && (local_user() == $item['uid']) && ($item['self']))
+ if (public_contact() == $item['author-id']) {
$conv_responses[$mode][$item['thr-parent'] . '-self'] = 1;
+ }
$conv_responses[$mode][$item['thr-parent'] . '-l'][] = $url;
function status_editor($a,$x, $notes_cid = 0, $popup=false) {
-
$o = '';
$geotag = (($x['allow_location']) ? replace_macros(get_markup_template('jot_geotag.tpl'), array()) : '');
-/* $plaintext = false;
- if( local_user() && (intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled(local_user(),'richtext')) )
- $plaintext = true;*/
- $plaintext = true;
- if( local_user() && feature_enabled(local_user(),'richtext') )
- $plaintext = false;
-
$tpl = get_markup_template('jot-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$newpost' => 'true',
- '$baseurl' => $a->get_baseurl(true),
- '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
+ '$baseurl' => App::get_baseurl(true),
'$geotag' => $geotag,
'$nickname' => $x['nickname'],
'$ispublic' => t('Visible to <strong>everybody</strong>'),
'$delitems' => t('Delete item(s)?')
));
-
$tpl = get_markup_template('jot-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
'$newpost' => 'true',
- '$baseurl' => $a->get_baseurl(true),
- '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
+ '$baseurl' => App::get_baseurl(true),
'$geotag' => $geotag,
'$nickname' => $x['nickname'],
'$ispublic' => t('Visible to <strong>everybody</strong>'),
'$ptyp' => (($notes_cid) ? 'note' : 'wall'),
'$content' => $x['content'],
'$post_id' => $x['post_id'],
- '$baseurl' => $a->get_baseurl(true),
+ '$baseurl' => App::get_baseurl(true),
'$defloc' => $x['default_location'],
'$visitor' => $x['visitor'],
'$pvisit' => (($notes_cid) ? 'none' : $x['visitor']),