From df3660fbcf7115dc45be63543376144ba7ec8ee9 Mon Sep 17 00:00:00 2001 From: Shish Date: Wed, 18 Mar 2020 17:29:08 +0000 Subject: [PATCH] bbcode signup message --- ext/user/theme.php | 2 +- themes/rule34v2/user.theme.php | 72 +++++++++++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 2 deletions(-) diff --git a/ext/user/theme.php b/ext/user/theme.php index 7d55bd28..2fa232bd 100644 --- a/ext/user/theme.php +++ b/ext/user/theme.php @@ -95,7 +95,7 @@ class UserPageTheme extends Themelet ); $html = emptyHTML( - $tac ? P($tac) : null, + $tac ? P(rawHTML($tac)) : null, $form ); diff --git a/themes/rule34v2/user.theme.php b/themes/rule34v2/user.theme.php index 80856cdb..14b2e9b9 100644 --- a/themes/rule34v2/user.theme.php +++ b/themes/rule34v2/user.theme.php @@ -1,4 +1,21 @@ -add_block(new Block("Login", $html, "head", 90)); $page->add_block(new Block("Login", $html, "left", 15)); } + + public function display_signup_page(Page $page) + { + global $config; + $tac = $config->get_string("login_tac", ""); + + if ($config->get_bool("login_tac_bbcode")) { + $tfe = new TextFormattingEvent($tac); + send_event($tfe); + $tac = $tfe->formatted; + } + + $form = SHM_SIMPLE_FORM( + "user_admin/create", + TABLE( + ["class"=>"form"], + TBODY( + TR( + TH("Name"), + TD(INPUT(["type"=>'text', "name"=>'name', "required"=>true])) + ), + TR( + TH("Password"), + TD(INPUT(["type"=>'password', "name"=>'pass1', "required"=>true])) + ), + TR( + TH(rawHTML("Repeat Password")), + TD(INPUT(["type"=>'password', "name"=>'pass2', "required"=>true])) + ), + TR( + TH(rawHTML("Email")), + TD(INPUT(["type"=>'email', "name"=>'email', "required"=>true])) + ), + TR( + TD(["colspan"=>"2"], rawHTML(captcha_get_html())) + ), + ), + TFOOT( + TR(TD(["colspan"=>"2"], INPUT(["type"=>"submit", "value"=>"Create Account"]))) + ) + ) + ); + + $html = emptyHTML( + $tac ? P(rawHTML($tac)) : null, + $form + ); + + $page->set_title("Create Account"); + $page->set_heading("Create Account"); + $page->add_block(new NavBlock()); + $page->add_block(new Block("Signup", (string)$html)); + } }