diff options
author | zottel <github@zottel.net> | 2014-02-28 08:16:56 +0100 |
---|---|---|
committer | zottel <github@zottel.net> | 2014-02-28 08:16:56 +0100 |
commit | 4bb8e294a10a11d964759026bb1e899ca3926984 (patch) | |
tree | 48fec5a7c0af5bc929f94223a7175aa9b484de69 /include | |
parent | f8b3f032a95ccc9b1730a532e7b9fe185f7db910 (diff) | |
parent | 7cb295bbe627eab2546e859248eacd26da948ed9 (diff) | |
download | volse-hubzilla-4bb8e294a10a11d964759026bb1e899ca3926984.tar.gz volse-hubzilla-4bb8e294a10a11d964759026bb1e899ca3926984.tar.bz2 volse-hubzilla-4bb8e294a10a11d964759026bb1e899ca3926984.zip |
Merge remote-tracking branch 'upstream/master'
Conflicts:
mod/help.php
Diffstat (limited to 'include')
-rw-r--r-- | include/comanche.php | 7 | ||||
-rw-r--r-- | include/message.php | 2 | ||||
-rw-r--r-- | include/widgets.php | 34 |
3 files changed, 42 insertions, 1 deletions
diff --git a/include/comanche.php b/include/comanche.php index f02190ee5..0c81b0ed3 100644 --- a/include/comanche.php +++ b/include/comanche.php @@ -57,6 +57,13 @@ function comanche_parser(&$a,$s) { if($cnt) $a->page['template'] = trim($matches[1]); + + $cnt = preg_match("/\[theme=(.*?)\](.*?)\[\/theme\]/ism", $s, $matches); + if($cnt) { + $a->layout['schema'] = trim($matches[1]); + $a->layout['theme'] = trim($matches[2]); + } + $cnt = preg_match("/\[theme\](.*?)\[\/theme\]/ism", $s, $matches); if($cnt) $a->layout['theme'] = trim($matches[1]); diff --git a/include/message.php b/include/message.php index a95021583..607166ec9 100644 --- a/include/message.php +++ b/include/message.php @@ -76,7 +76,7 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto=' $match = null; $images = null; - if(preg_match_all("/\[img\](.*?)\[\/img\]/",((strpos($body,'[/crypt]')) ? $_POST['media_str'] : $body),$match)) + if(preg_match_all("/\[zmg\](.*?)\[\/zmg\]/",((strpos($body,'[/crypt]')) ? $_POST['media_str'] : $body),$match)) $images = $match[1]; $match = false; diff --git a/include/widgets.php b/include/widgets.php index 4a5ae9de7..8d5ab77e3 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -589,3 +589,37 @@ function widget_chatroom_list($arr) { )); } +function widget_bookmarkedchats($arr) { + $h = get_observer_hash(); + if(! $h) + return; + $r = q("select * from xchat where xchat_xchan = '%s' group by xchat_url order by xchat_desc", + dbesc($h) + ); + + for($x = 0; $x < count($r); $x ++) + $r[$x]['xchat_url'] = zid($r[$x]['xchat_url']); + return replace_macros(get_markup_template('bookmarkedchats.tpl'),array( + '$header' => t('Bookmarked Chatrooms'), + '$rooms' => $r + )); +} + +function widget_suggestedchats($arr) { + + // probably should restrict this to your friends, but then the widget will only work + // if you are logged in locally. + + $h = get_observer_hash(); + if(! $h) + return; + $r = q("select *, count(xchat_url) as total from xchat group by xchat_url order by total desc, xchat_desc limit 24"); + + for($x = 0; $x < count($r); $x ++) + $r[$x]['xchat_url'] = zid($r[$x]['xchat_url']); + return replace_macros(get_markup_template('bookmarkedchats.tpl'),array( + '$header' => t('Suggested Chatrooms'), + '$rooms' => $r + )); +} + |