Merge pull request #455 from fermionic/previews-dont-work
conversation needs preview parameter
This commit is contained in:
commit
e079ffdce6
6 changed files with 8 additions and 8 deletions
|
@ -346,7 +346,7 @@ function count_descendants($item) {
|
||||||
* Recursively prepare a thread for HTML
|
* Recursively prepare a thread for HTML
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike, $thread_level=1) {
|
function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike, $previewing, $thread_level=1) {
|
||||||
$result = array();
|
$result = array();
|
||||||
|
|
||||||
$wall_template = 'wall_thread.tpl';
|
$wall_template = 'wall_thread.tpl';
|
||||||
|
@ -651,7 +651,7 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr
|
||||||
|
|
||||||
$item_result['children'] = array();
|
$item_result['children'] = array();
|
||||||
if(count($item['children'])) {
|
if(count($item['children'])) {
|
||||||
$item_result['children'] = prepare_threads_body($a, $item['children'], $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike, ($thread_level + 1));
|
$item_result['children'] = prepare_threads_body($a, $item['children'], $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike, $previewing, ($thread_level + 1));
|
||||||
}
|
}
|
||||||
$item_result['private'] = $item['private'];
|
$item_result['private'] = $item['private'];
|
||||||
$item_result['toplevel'] = ($toplevelpost ? 'toplevel_item' : '');
|
$item_result['toplevel'] = ($toplevelpost ? 'toplevel_item' : '');
|
||||||
|
@ -901,7 +901,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$threads = prepare_threads_body($a, $threads, $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike);
|
$threads = prepare_threads_body($a, $threads, $cmnt_tpl, $page_writeable, $mode, $profile_owner, $alike, $dlike, $previewing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -608,7 +608,7 @@ function item_post(&$a) {
|
||||||
|
|
||||||
if($preview) {
|
if($preview) {
|
||||||
require_once('include/conversation.php');
|
require_once('include/conversation.php');
|
||||||
$o = conversation($a,array(array_merge($contact_record,$datarray)),'search', false);
|
$o = conversation($a,array(array_merge($contact_record,$datarray)),'search', false, true);
|
||||||
logger('preview: ' . $o);
|
logger('preview: ' . $o);
|
||||||
echo json_encode(array('preview' => $o));
|
echo json_encode(array('preview' => $o));
|
||||||
killme();
|
killme();
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<a name="$item.id" ></a>
|
<a name="$item.id" ></a>
|
||||||
<!--<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" >-->
|
<!--<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" >-->
|
||||||
<div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" >
|
<div class="wall-item-content-wrapper $item.indent $item.previewing" id="wall-item-content-wrapper-$item.id" >
|
||||||
<div class="wall-item-info" id="wall-item-info-$item.id">
|
<div class="wall-item-info" id="wall-item-info-$item.id">
|
||||||
<div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$item.id"
|
<div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$item.id"
|
||||||
onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')"
|
onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')"
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<div id="tread-wrapper-$item.id" class="tread-wrapper $item.toplevel">
|
<div id="tread-wrapper-$item.id" class="tread-wrapper $item.toplevel">
|
||||||
<a name="$item.id" ></a>
|
<a name="$item.id" ></a>
|
||||||
<!--<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" >-->
|
<!--<div class="wall-item-outside-wrapper $item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" >-->
|
||||||
<div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" >
|
<div class="wall-item-content-wrapper $item.indent $item.previewing" id="wall-item-content-wrapper-$item.id" >
|
||||||
<div class="wall-item-info" id="wall-item-info-$item.id">
|
<div class="wall-item-info" id="wall-item-info-$item.id">
|
||||||
<div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$item.id"
|
<div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$item.id"
|
||||||
onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')"
|
onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<a name="$item.id" ></a>
|
<a name="$item.id" ></a>
|
||||||
<!--<div class="wall-item-outside-wrapper $item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" >-->
|
<!--<div class="wall-item-outside-wrapper $item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" >-->
|
||||||
<div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" >
|
<div class="wall-item-content-wrapper $item.indent $item.previewing wallwall" id="wall-item-content-wrapper-$item.id" >
|
||||||
<div class="wall-item-info wallwall" id="wall-item-info-$item.id">
|
<div class="wall-item-info wallwall" id="wall-item-info-$item.id">
|
||||||
<div class="wall-item-photo-wrapper wwto" id="wall-item-ownerphoto-wrapper-$item.id" >
|
<div class="wall-item-photo-wrapper wwto" id="wall-item-ownerphoto-wrapper-$item.id" >
|
||||||
<a href="$item.owner_url" target="redir" title="$item.olinktitle" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$item.id">
|
<a href="$item.owner_url" target="redir" title="$item.olinktitle" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$item.id">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<div id="tread-wrapper-$item.id" class="tread-wrapper $item.toplevel">
|
<div id="tread-wrapper-$item.id" class="tread-wrapper $item.toplevel">
|
||||||
<a name="$item.id" ></a>
|
<a name="$item.id" ></a>
|
||||||
<!--<div class="wall-item-outside-wrapper $item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" >-->
|
<!--<div class="wall-item-outside-wrapper $item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" >-->
|
||||||
<div class="wall-item-content-wrapper $item.indent" id="wall-item-content-wrapper-$item.id" >
|
<div class="wall-item-content-wrapper $item.indent $item.previewing wallwall" id="wall-item-content-wrapper-$item.id" >
|
||||||
<div class="wall-item-info wallwall" id="wall-item-info-$item.id">
|
<div class="wall-item-info wallwall" id="wall-item-info-$item.id">
|
||||||
<div class="wall-item-photo-wrapper wwto" id="wall-item-ownerphoto-wrapper-$item.id" >
|
<div class="wall-item-photo-wrapper wwto" id="wall-item-ownerphoto-wrapper-$item.id" >
|
||||||
<a href="$item.owner_url" target="redir" title="$item.olinktitle" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$item.id">
|
<a href="$item.owner_url" target="redir" title="$item.olinktitle" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$item.id">
|
||||||
|
|
Loading…
Reference in a new issue