aboutsummaryrefslogtreecommitdiffstats
path: root/include/conversation.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-07-25 18:57:04 -0700
committerfriendica <info@friendica.com>2012-07-25 18:57:04 -0700
commitfc53a7a09ed16504ae88b064640c91882c34ef8b (patch)
treebe792b3af939592331f933f0323665a8adb80121 /include/conversation.php
parent78b8684ab4202d62d815ad2dbef3d1b620cef3ef (diff)
downloadvolse-hubzilla-fc53a7a09ed16504ae88b064640c91882c34ef8b.tar.gz
volse-hubzilla-fc53a7a09ed16504ae88b064640c91882c34ef8b.tar.bz2
volse-hubzilla-fc53a7a09ed16504ae88b064640c91882c34ef8b.zip
recover existing conversation loading functionality for home,search,community,display,etc. whilst working on the ajax stuff in network
Diffstat (limited to 'include/conversation.php')
-rw-r--r--include/conversation.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 50ce51558..c7406b1dc 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -309,7 +309,7 @@ function localize_item(&$item){
*/
if(!function_exists('conversation')) {
-function conversation(&$a, $items, $mode, $update, $preview = false) {
+function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
require_once('bbcode.php');
@@ -319,6 +319,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$profile_owner = 0;
$page_writeable = false;
+ $preview = (($page_mode === 'preview') ? true : false);
$previewing = (($preview) ? ' preview ' : '');
if($mode === 'network') {
@@ -441,6 +442,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$drop = array(
+ 'pagedropping' => $page_dropping,
'dropping' => $dropping,
'select' => t('Select'),
'delete' => t('Delete'),
@@ -732,6 +734,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$dropping = true;
$drop = array(
+ 'pagedropping' => $page_dropping,
'dropping' => $dropping,
'select' => t('Select'),
'delete' => t('Delete'),
@@ -873,9 +876,19 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
}
}
- logger('threads: ' . count($threads) . ' update: ' . $update);
+// logger('threads: ' . count($threads) . ' update: ' . $update);
- if($update) {
+ if($page_mode === 'traditional' || $page_mode === 'preview') {
+ $page_template = get_markup_template("conversation.tpl");
+ $o = replace_macros($page_template, array(
+ '$baseurl' => $a->get_baseurl($ssl_state),
+ '$mode' => $mode,
+ '$user' => $a->user,
+ '$threads' => $threads,
+ '$dropping' => ($page_dropping?t('Delete Selected Items'):False),
+ ));
+ }
+ elseif($update) {
$page_template = get_markup_template("conv.tpl");
$o = replace_macros($page_template, array(
'$baseurl' => $a->get_baseurl($ssl_state),