-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathqa-custom-user-list-layer.php
63 lines (53 loc) · 2.04 KB
/
qa-custom-user-list-layer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
require_once CUL_DIR.'/cul-theme-main.php';
class qa_html_theme_layer extends qa_html_theme_base
{
function __construct($template, $content, $rooturl, $request)
{
qa_html_theme_base::qa_html_theme_base($template, $content, $rooturl, $request);
}
function body_footer()
{
qa_html_theme_base::body_footer();
if (qa_opt('site_theme') === CUL_TARGET_THEME_NAME && $this->template === 'users') {
$cul_lang_json = json_encode (array(
'read_next' => qa_lang_html('cul_lang/read_next'),
'read_previous' => qa_lang_html('cul_lang/read_previous'),
));
$this->output(
'<SCRIPT TYPE="text/javascript">',
'var action = "'.$action.'";',
"var cul_lang = '".$cul_lang_json."';",
'</SCRIPT>'
);
$cond_location = qa_get('location');
$this->output('<SCRIPT>',' var cond_location = "'.$cond_location.'";','</SCRIPT>');
$this->output('<SCRIPT TYPE="text/javascript" SRC="'. QA_HTML_THEME_LAYER_URLTOROOT.'js/custom-user-list.js"></SCRIPT>');
}
}
public function page_title_error() {
if (qa_opt('site_theme') === CUL_TARGET_THEME_NAME
&& $this->template === 'users') {
cul_theme_main::control_items($this);
} else {
qa_html_theme_base::page_title_error();
}
}
public function main_parts($content)
{
if (qa_opt('site_theme') === CUL_TARGET_THEME_NAME
&& $this->template === 'users') {
cul_theme_main::user_list($this);
} else {
qa_html_theme_base::main_parts($content);
}
}
public function head_css()
{
qa_html_theme_base::head_css();
if (qa_opt('site_theme') === CUL_TARGET_THEME_NAME
&& $this->template === 'users') {
$this->output('<link rel="stylesheet" type="text/css" href="'. QA_HTML_THEME_LAYER_URLTOROOT.'css/custom-user-list.css">');
}
}
}