private $owner_photo = '';
private $owner_name = '';
private $wall_to_wall = false;
+ private $threaded = false;
public function __construct($data) {
$a = $this->get_app();
$ssl_state = ((local_user()) ? true : false);
$this->redirect_url = $a->get_baseurl($ssl_state) . '/redir/' . $this->get_data_value('cid') ;
+ if(get_config('system','thread_allow') && $a->theme_thread_allow)
+ $this->threaded = true;
+
// Prepare the children
if(count($data['children'])) {
foreach($data['children'] as $item) {
'osparkle' => $osparkle,
'sparkle' => $sparkle,
'title' => template_escape($item['title']),
+ 'localtime' => datetime_convert('UTC', date_default_timezone_get(), $item['created'], 'r'),
'ago' => (($item['app']) ? sprintf( t('%s from %s'),relative_date($item['created']),$item['app']) : relative_date($item['created'])),
'lock' => $lock,
'location' => template_escape($location),
$result['private'] = $item['private'];
$result['toplevel'] = ($this->is_toplevel() ? 'toplevel_item' : '');
- if(get_config('system','thread_allow') && $a->theme_thread_allow) {
+ if($this->is_threaded()) {
$result['flatten'] = false;
$result['threaded'] = true;
}
return $this->get_data_value('id');
}
+ public function is_threaded() {
+ return $this->threaded;
+ }
+
/**
* Add a child item
*/
$qcomment = (($qc) ? explode("\n",$qc) : null);
}
$comment_box = replace_macros($template,array(
- '$return_path' => '',
+ '$return_path' => '',
+ '$threaded' => $this->is_threaded(),
'$jsreload' => (($conv->get_mode() === 'display') ? $_SESSION['return_url'] : ''),
'$type' => (($conv->get_mode() === 'profile') ? 'wall-comment' : 'net-comment'),
'$id' => $this->get_id(),