From b52651c5582d1445248983ee57bf0908ebddaf4f Mon Sep 17 00:00:00 2001 From: NaGeL Date: Tue, 17 Jan 2012 22:45:24 +0100 Subject: [PATCH 1/2] added [align=(left|center|right)] BBcode which aligns text naturally. --- ext/bbcode/main.php | 1 + 1 file changed, 1 insertion(+) diff --git a/ext/bbcode/main.php b/ext/bbcode/main.php index bddda8c5..328d9dba 100644 --- a/ext/bbcode/main.php +++ b/ext/bbcode/main.php @@ -63,6 +63,7 @@ class BBCode extends FormatterExtension { $text = preg_replace("/\[li\](.*?)\[\/li\]/s", "
  • \\1
  • ", $text); $text = preg_replace("#\[\*\]#s", "
  • ", $text); $text = preg_replace("#
    <(li|ul|ol|/ul|/ol)>#s", "<\\1>", $text); + $text = preg_replace("#\[align=(left|center|right)\](.*?)\[\/align\]#s", "
    \\2
    ", $text); $text = $this->filter_spoiler($text); $text = $this->insert_code($text); return $text; From b1d1d71093066a7b55eea622fc96328d36b1a88c Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 18 Jan 2012 17:53:52 +0000 Subject: [PATCH 2/2] author search from nagel --- contrib/artists/main.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contrib/artists/main.php b/contrib/artists/main.php index e4a5a803..c86a8e10 100644 --- a/contrib/artists/main.php +++ b/contrib/artists/main.php @@ -43,6 +43,14 @@ class Artists implements Extension { if ($event instanceof PageRequestEvent) $this->handle_commands($event); + + if ($event instanceof SearchTermParseEvent) { + $matches = array(); + if(preg_match("/^author=(.*)$/", $event->term, $matches)) { + $char = $matches[1]; + $event->add_querylet(new Querylet("Author = :author_char", array("author_char"=>$char))); + } + } } public function try_install() {