From 4af339da636e70b2695c12881f5dbc086e55a656 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 9 Sep 2015 18:18:27 -0700 Subject: slight hack to improve public forum detection in the forum widget --- include/message.php | 1 + include/widgets.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/message.php b/include/message.php index 396e3162c..efe1a7710 100644 --- a/include/message.php +++ b/include/message.php @@ -49,6 +49,7 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto=' // look for any existing conversation structure + if(strlen($replyto)) { $r = q("select convid from mail where channel_id = %d and ( mid = '%s' or parent_mid = '%s' ) limit 1", intval(local_channel()), diff --git a/include/widgets.php b/include/widgets.php index 8c5e92140..9f7380c87 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -1007,7 +1007,9 @@ function widget_forums($arr) { $perms_sql = item_permissions_sql(local_channel()) . item_normal(); - $r1 = q("select * from abook left join xchan on abook_xchan = xchan_hash where xchan_pubforum = 1 and abook_channel = %d order by xchan_name $limit ", + $r1 = q("select * from abook left join xchan on abook_xchan = xchan_hash where ( xchan_pubforum = 1 or ((abook_their_perms & %d ) != 0 and (abook_their_perms & %d ) = 0) ) and abook_channel = %d order by xchan_name $limit ", + intval(PERMS_W_TAGWALL), + intval(PERMS_W_STREAM), intval(local_channel()) ); if(! $r1) -- cgit v1.2.3 From 43e064749cfb5cd9d4a0e64991bf297f28a3a6d4 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 9 Sep 2015 18:50:15 -0700 Subject: major changes to "forum mode" on the network/matrix page --- include/widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/widgets.php b/include/widgets.php index 9f7380c87..5e40bf54a 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -1036,7 +1036,7 @@ function widget_forums($arr) { foreach($r1 as $rr) { if($unseen && (! intval($rr['unseen']))) continue; - $o .= '
  • ' . ((intval($rr['unseen'])) ? intval($rr['unseen']) : '') . ' ' . $rr['xchan_name'] . '
  • '; + $o .= '
  • ' . ((intval($rr['unseen'])) ? intval($rr['unseen']) : '') . ' ' . $rr['xchan_name'] . '
  • '; } $o .= ''; } -- cgit v1.2.3 From db58b6223503a63f92cccddd87179ae8e3ae1e46 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 9 Sep 2015 19:54:16 -0700 Subject: don't auto-open the editor in forum mode. Save the forum selection text until we open it. --- include/conversation.php | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/conversation.php b/include/conversation.php index a3fdf39df..fb8ef8585 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1137,6 +1137,7 @@ function status_editor($a, $x, $popup = false) { '$newpost' => 'true', '$baseurl' => $a->get_baseurl(true), '$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'), + '$pretext' => ((x($x,'pretext')) ? $x['pretext'] : ''), '$geotag' => $geotag, '$nickname' => $x['nickname'], '$ispublic' => t('Visible to everybody'), -- cgit v1.2.3