From 102521844b3d6f31d0d801b0d0c89241c2c621af Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 27 Feb 2014 20:48:10 -0800 Subject: put schemas in Comanche (this requires theme support (!)) --- include/comanche.php | 7 +++++++ include/widgets.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'include') 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/widgets.php b/include/widgets.php index aaf5a72a0..8d5ab77e3 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -613,7 +613,7 @@ function widget_suggestedchats($arr) { $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"); + $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']); -- cgit v1.2.3