more danbooru updates
This commit is contained in:
parent
d7ae768168
commit
612332a1a7
@ -44,7 +44,7 @@ Tips
|
|||||||
|
|
||||||
class Layout {
|
class Layout {
|
||||||
public function display_page($page) {
|
public function display_page($page) {
|
||||||
global $config;
|
global $config, $user;
|
||||||
|
|
||||||
$theme_name = $config->get_string('theme');
|
$theme_name = $config->get_string('theme');
|
||||||
$base_href = $config->get_string('base_href');
|
$base_href = $config->get_string('base_href');
|
||||||
@ -98,7 +98,12 @@ class Layout {
|
|||||||
|
|
||||||
// bzchan: CUSTOM LINKS are prepared here, change these to whatever you like
|
// bzchan: CUSTOM LINKS are prepared here, change these to whatever you like
|
||||||
$custom_links = "";
|
$custom_links = "";
|
||||||
|
if($user->is_anonymous()) {
|
||||||
|
$custom_links .= "<li><a href='".make_link('user_admin/login')."'>My Account</a></li>";
|
||||||
|
}
|
||||||
|
else {
|
||||||
$custom_links .= "<li><a href='".make_link('user')."'>My Account</a></li>";
|
$custom_links .= "<li><a href='".make_link('user')."'>My Account</a></li>";
|
||||||
|
}
|
||||||
$custom_links .= "<li><a href='".make_link('post/list')."'>Posts</a></li>";
|
$custom_links .= "<li><a href='".make_link('post/list')."'>Posts</a></li>";
|
||||||
$custom_links .= "<li><a href='".make_link('comment/list')."'>Comments</a></li>";
|
$custom_links .= "<li><a href='".make_link('comment/list')."'>Comments</a></li>";
|
||||||
$custom_links .= "<li><a href='".make_link('tags')."'>Tags</a></li>";
|
$custom_links .= "<li><a href='".make_link('tags')."'>Tags</a></li>";
|
||||||
|
@ -66,15 +66,18 @@ font-size:1.4em;
|
|||||||
h5 {
|
h5 {
|
||||||
font-size:1.2em;
|
font-size:1.2em;
|
||||||
}
|
}
|
||||||
|
table.zebra {border-collapse: collapse;border-spacing: 0;}
|
||||||
|
table.zebra > tbody > tr:hover {background: #FFD;}
|
||||||
|
table.zebra th {color: #171BB3; padding-right: 8px;}
|
||||||
|
table.zebra td {border: 1px dotted #EEE;margin: 0;padding-right: 8px;}
|
||||||
|
table.zebra th {margin: 0;text-align: left;}
|
||||||
thead {
|
thead {
|
||||||
-moz-background-clip:border;
|
-moz-background-clip:border;
|
||||||
-moz-background-inline-policy:continuous;
|
-moz-background-inline-policy:continuous;
|
||||||
-moz-background-origin:padding;
|
-moz-background-origin:padding;
|
||||||
background:#DEDEDE none repeat scroll 0 0;
|
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
}
|
}
|
||||||
td {
|
td {
|
||||||
text-align:center;
|
|
||||||
vertical-align:top;
|
vertical-align:top;
|
||||||
}
|
}
|
||||||
#subtitle {
|
#subtitle {
|
||||||
|
@ -2,15 +2,36 @@
|
|||||||
|
|
||||||
class CustomUserPageTheme extends UserPageTheme {
|
class CustomUserPageTheme extends UserPageTheme {
|
||||||
public function display_login_page($page) {
|
public function display_login_page($page) {
|
||||||
|
global $config;
|
||||||
$page->set_title("Login");
|
$page->set_title("Login");
|
||||||
$page->set_heading("Login");
|
$page->set_heading("Login");
|
||||||
$page->add_block(new NavBlock());
|
$page->disable_left();
|
||||||
$page->add_block(new Block("Login There",
|
$html = "
|
||||||
"There should be a login box to the left"));
|
<form action='".make_link("user_admin/login")."' method='POST'>
|
||||||
|
<table summary='Login Form'>
|
||||||
|
<tr>
|
||||||
|
<td width='70'><label for='user'>Name</label></td>
|
||||||
|
<td width='70'><input id='user' type='text' name='user'></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td><label for='pass'>Password</label></td>
|
||||||
|
<td><input id='pass' type='password' name='pass'></td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan='2'><input type='submit' value='Log In'></td></tr>
|
||||||
|
</table>
|
||||||
|
</form>
|
||||||
|
";
|
||||||
|
if($config->get_bool("login_signup_enabled")) {
|
||||||
|
$html .= "<small><a href='".make_link("user_admin/create")."'>Create Account</a></small>";
|
||||||
|
}
|
||||||
|
$page->add_block(new Block("Login", $html, "main", 90));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_links($page, $user, $parts) {
|
public function display_user_links($page, $user, $parts) {
|
||||||
// $page->add_block(new Block("User Links", join("<br>", $parts), "left", 10));
|
// no block in this theme
|
||||||
|
}
|
||||||
|
public function display_login_block(Page $page) {
|
||||||
|
// no block in this theme
|
||||||
}
|
}
|
||||||
|
|
||||||
public function display_user_block($page, $user, $parts) {
|
public function display_user_block($page, $user, $parts) {
|
||||||
@ -49,7 +70,7 @@ class CustomUserPageTheme extends UserPageTheme {
|
|||||||
|
|
||||||
$page->set_title("Create Account");
|
$page->set_title("Create Account");
|
||||||
$page->set_heading("Create Account");
|
$page->set_heading("Create Account");
|
||||||
$page->add_block(new NavBlock());
|
$page->disable_left();
|
||||||
$page->add_block(new Block("Signup", $html));
|
$page->add_block(new Block("Signup", $html));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user