-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathe_help.php
110 lines (87 loc) · 2.84 KB
/
e_help.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?php
/**
* @file
* Addon file to display help block on Admin UI.
*/
if(!defined('e107_INIT'))
{
exit;
}
// [PLUGINS]/metatag/languages/[LANGUAGE]/[LANGUAGE]_admin.php
e107::lan('metatag', true, true);
/**
* Class metatag_help.
*/
class metatag_help
{
private $action;
public function __construct()
{
$this->action = varset($_GET['action'], '');
$this->renderHelpBlock();
}
public function renderHelpBlock()
{
switch($this->action)
{
default:
$block = $this->getHelpBlockListPage();
break;
}
if(!empty($block))
{
e107::getRender()->tablerender($block['title'], $block['body']);
}
}
public function getHelpBlockListPage()
{
e107::js('footer', 'https://buttons.github.io/buttons.js');
$content = '';
$issue = array(
'href="https://github.com/lonalore/metatag/issues"',
'class="github-button"',
'data-icon="octicon-issue-opened"',
'data-style="mega"',
'data-count-api="/repos/lonalore/metatag#open_issues_count"',
'data-count-aria-label="# issues on GitHub"',
'aria-label="Issue lonalore/metatag on GitHub"',
);
$star = array(
'href="https://github.com/lonalore/metatag"',
'class="github-button"',
'data-icon="octicon-star"',
'data-style="mega"',
'data-count-href="/lonalore/metatag/stargazers"',
'data-count-api="/repos/lonalore/metatag#stargazers_count"',
'data-count-aria-label="# stargazers on GitHub"',
'aria-label="Star lonalore/metatag on GitHub"',
);
$content .= '<p class="text-center">' . LAN_METATAG_ADMIN_HELP_03 . '</p>';
$content .= '<p class="text-center">';
$content .= '<a ' . implode(" ", $issue) . '>' . LAN_METATAG_ADMIN_HELP_04 . '</a>';
$content .= '</p>';
// $content .= '<p class="text-center">' . LAN_METATAG_ADMIN_HELP_02 . '</p>';
// $content .= '<p class="text-center">';
// $content .= '<a ' . implode(" ", $star) . '>' . LAN_METATAG_ADMIN_HELP_05 . '</a>';
// $content .= '</p>';
// $beerImage = '<img src="https://beerpay.io/lonalore/metatag/badge.svg" />';
// $beerWishImage = '<img src="https://beerpay.io/lonalore/metatag/make-wish.svg" />';
// $content .= '<p class="text-center">' . LAN_METATAG_ADMIN_HELP_06 . '</p>';
// $content .= '<p class="text-center">';
// $content .= '<a href="https://beerpay.io/lonalore/metatag">' . $beerImage . '</a>';
// $content .= '</p>';
// $content .= '<p class="text-center">';
// $content .= '<a href="https://beerpay.io/lonalore/metatag">' . $beerWishImage . '</a>';
// $content .= '</p>';
$content .= '<br/>';
$content .= '<p class="text-center">';
$content .= '<a href="https://www.buymeacoffee.com/lonalore" target="_blank"><img src="' . e_PLUGIN . 'metatag/images/bmc-button.svg" width="140" height="45" alt="Buy Me a Coffee"></a>';
$content .= '</p>';
$block = array(
'title' => LAN_METATAG_ADMIN_HELP_01,
'body' => $content,
);
return $block;
}
}
new metatag_help();