Skip to content

Commit f523e84

Browse files
committed
Upload
1 parent 7dc6b08 commit f523e84

13 files changed

+615
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
# EU Cookies
2-
EU Cookies informs users that your site uses cookies, plugin created with the help a script Divas Cookies.
1+
# EU Cookie
2+
EU Cookie informs users that your site uses cookies, plugin created with the help a script Divas Cookies.

admin_config.php

Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
<?php
2+
3+
/**
4+
* EU cookies plugin for CMS e107 v2
5+
*
6+
* @author OxigenO2 (oxigen.rg@gmail.com)
7+
* @copyright Copyright (C) 2015 OxigenO2
8+
* @license GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
9+
* @link http://oxigen.mablog.eu/
10+
*/
11+
12+
require_once('../../class2.php');
13+
if (!getperms('P'))
14+
{
15+
header('location:'.e_BASE.'index.php');
16+
exit;
17+
}
18+
19+
20+
21+
class eu_cookies_adminArea extends e_admin_dispatcher
22+
{
23+
24+
protected $modes = array(
25+
26+
'main' => array(
27+
'controller' => 'eu_cookies_ui',
28+
'path' => null,
29+
'ui' => 'eu_cookies_form_ui',
30+
'uipath' => null
31+
),
32+
33+
34+
);
35+
36+
37+
protected $adminMenu = array(
38+
39+
'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => 'P'),
40+
41+
// 'main/custom' => array('caption'=> 'Custom Page', 'perm' => 'P')
42+
);
43+
44+
protected $adminMenuAliases = array(
45+
'main/edit' => 'main/list'
46+
);
47+
48+
protected $menuTitle = 'EU cookies';
49+
}
50+
51+
52+
53+
54+
55+
class eu_cookies_ui extends e_admin_ui
56+
{
57+
58+
protected $pluginTitle = 'EU cookies';
59+
protected $pluginName = 'eu_cookies';
60+
// protected $eventName = 'eu_cookies-'; // remove comment to enable event triggers in admin.
61+
protected $table = '';
62+
protected $pid = '';
63+
protected $perPage = 10;
64+
protected $batchDelete = true;
65+
// protected $batchCopy = true;
66+
// protected $sortField = 'somefield_order';
67+
// protected $orderStep = 10;
68+
protected $preftabs = array(LAN_SETTINGS,LAN_PLUGIN_EUC_STYLE); // Use 'tab'=>0 OR 'tab'=>1 in the $fields below to enable.
69+
70+
// protected $listQry = "SELECT * FROM `#tableName` WHERE field != '' "; // Example Custom Query. LEFT JOINS allowed. Should be without any Order or Limit.
71+
72+
protected $listOrder = ' DESC';
73+
74+
protected $fields = NULL;
75+
76+
protected $fieldpref = array();
77+
78+
79+
// protected $preftabs = array('General', 'Other' );
80+
protected $prefs = array(
81+
'eu_cookie_text' => array('title'=> LAN_PLUGIN_EUC_TEXT, 'tab'=>0, 'type'=>'textarea', 'data' => 'str', 'help'=>'Help Text goes here'),
82+
'eu_cookie_policylink' => array('title'=> LAN_PLUGIN_EUC_POLICYLINK, 'tab'=>0, 'type'=>'text', 'data' => 'str', 'help'=>'Help Text goes here'),
83+
'eu_cookie_btn' => array('title'=> LAN_PLUGIN_EUC_BTN, 'tab'=>0, 'type'=>'text', 'data' => 'str', 'help'=>'Help Text goes here'),
84+
'eu_cookie_position' => array('title'=> LAN_PLUGIN_EUC_POSITION, 'tab'=>0, 'type'=>'dropdown', 'data' => 'str', 'help'=>'Help Text goes here'),
85+
'eu_cookie_theme' => array('title'=> LAN_PLUGIN_EUC_THEME, 'tab'=>1, 'type'=>'dropdown', 'data' => 'str', 'help'=>'Help Text goes here'),
86+
'eu_cookie_openeffect' => array('title'=> LAN_PLUGIN_EUC_OPENEFFECT, 'tab'=>1, 'type'=>'dropdown', 'data' => 'str', 'help'=>'Help Text goes here'),
87+
'eu_cookie_openeffectduration' => array('title'=> LAN_PLUGIN_EUC_OPENEFFECTDURATION, 'tab'=>1, 'type'=>'number', 'data' => 'str', 'help'=>'Help Text goes here'),
88+
'eu_cookie_openeffecteasing' => array('title'=> LAN_PLUGIN_EUC_OPENEFFECTEASING, 'tab'=>1, 'type'=>'dropdown', 'data' => 'str', 'help'=>'Help Text goes here'),
89+
'eu_cookie_closeeffect' => array('title'=> LAN_PLUGIN_EUC_CLOSEEFFECT, 'tab'=>1, 'type'=>'dropdown', 'data' => 'str', 'help'=>'Help Text goes here'),
90+
'eu_cookie_closeeffectduration' => array('title'=> LAN_PLUGIN_EUC_CLOSEEFFECTDURATION, 'tab'=>1, 'type'=>'number', 'data' => 'str', 'help'=>'Help Text goes here'),
91+
'eu_cookie_closeeffecteasing' => array('title'=> LAN_PLUGIN_EUC_CLOSEEFFECTEASING, 'tab'=>1, 'type'=>'dropdown', 'data' => 'str', 'help'=>'Help Text goes here'),
92+
93+
);
94+
95+
96+
public function init()
97+
{
98+
// Set drop-down values (if any).
99+
100+
$position = array(
101+
'top' => 'Top',
102+
'bottom' => 'Bottom'
103+
);
104+
105+
106+
$this->prefs['eu_cookie_position']['writeParms'] = $position;
107+
$this->prefs['eu_cookie_position']['readParms'] = $position;
108+
109+
$theme = array(
110+
'dark' => 'Dark',
111+
'light' => 'Light'
112+
);
113+
114+
115+
$this->prefs['eu_cookie_theme']['writeParms'] = $theme;
116+
$this->prefs['eu_cookie_theme']['readParms'] = $theme;
117+
118+
$openeffect = array(
119+
'fade' => 'Fade',
120+
'slideUp' => 'Slide Down',
121+
'slideDown' => 'Slide Up',
122+
'slideLeft' => 'Slide Left',
123+
'slideRight' => 'Slide Right'
124+
);
125+
126+
127+
$this->prefs['eu_cookie_openeffect']['writeParms'] = $openeffect;
128+
$this->prefs['eu_cookie_openeffect']['readParms'] = $openeffect;
129+
130+
$openeffecteasing = array(
131+
'swing' => 'Swing',
132+
'linear' => 'Linear'
133+
);
134+
135+
136+
$this->prefs['eu_cookie_openeffecteasing']['writeParms'] = $openeffecteasing;
137+
$this->prefs['eu_cookie_openeffecteasing']['readParms'] = $openeffecteasing;
138+
139+
$closeeffect = array(
140+
'fade' => 'Fade',
141+
'slideUp' => 'Slide Down',
142+
'slideDown' => 'Slide Up',
143+
'slideLeft' => 'Slide Left',
144+
'slideRight' => 'Slide Right'
145+
);
146+
147+
148+
$this->prefs['eu_cookie_closeeffect']['writeParms'] = $closeeffect;
149+
$this->prefs['eu_cookie_closeeffect']['readParms'] = $closeeffect;
150+
151+
$closeeffecteasing = array(
152+
'swing' => 'Swing',
153+
'linear' => 'Linear'
154+
);
155+
156+
157+
$this->prefs['eu_cookie_closeeffecteasing']['writeParms'] = $closeeffecteasing;
158+
$this->prefs['eu_cookie_closeeffecteasing']['readParms'] = $closeeffecteasing;
159+
160+
161+
162+
163+
}
164+
165+
166+
// ------- Customize Create --------
167+
168+
public function beforeCreate($new_data)
169+
{
170+
return $new_data;
171+
}
172+
173+
public function afterCreate($new_data, $old_data, $id)
174+
{
175+
// do something
176+
}
177+
178+
public function onCreateError($new_data, $old_data)
179+
{
180+
// do something
181+
}
182+
183+
184+
// ------- Customize Update --------
185+
186+
public function beforeUpdate($new_data, $old_data, $id)
187+
{
188+
return $new_data;
189+
}
190+
191+
public function afterUpdate($new_data, $old_data, $id)
192+
{
193+
// do something
194+
}
195+
196+
public function onUpdateError($new_data, $old_data, $id)
197+
{
198+
// do something
199+
}
200+
201+
202+
/*
203+
// optional - a custom page.
204+
public function customPage()
205+
{
206+
$text = 'Hello World!';
207+
return $text;
208+
209+
}
210+
*/
211+
212+
}
213+
214+
215+
216+
class eu_cookies_form_ui extends e_admin_form_ui
217+
{
218+
219+
}
220+
221+
222+
new eu_cookies_adminArea();
223+
224+
require_once(e_ADMIN."auth.php");
225+
e107::getAdminUI()->runPage();
226+
227+
require_once(e_ADMIN."footer.php");
228+
exit;
229+
230+
?>
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/**
2+
* Divas Cookies jquery plugin for Cookie Policy banner stylesheet
3+
* @author: CodingDivas
4+
* @date: 2014/10/27
5+
* @version: 0.2 production
6+
*/
7+
8+
.divascookies {
9+
position: fixed;
10+
bottom: 0;
11+
width: 100%;
12+
background: #313131;
13+
color: #f9fafc;
14+
display: none;
15+
z-index: 999999;
16+
}
17+
18+
.divascookies > .divascookies-banner-container {
19+
position: relative;
20+
padding: 15px 20px;
21+
overflow: hidden;
22+
text-align: center;
23+
}
24+
25+
.divascookies p.divascookies-banner-text {
26+
position: relative;
27+
line-height: 1.3em;
28+
font-size: 1.4em;
29+
display: inline-block;
30+
padding: 0 10px 0 0;
31+
}
32+
33+
span.divascookies-policy-link {
34+
}
35+
36+
span.divascookies-policy-link a {
37+
white-space: nowrap;
38+
}
39+
40+
span.divascookies-policy-link a:hover {
41+
text-decoration: underline;
42+
transition: color 0.3s ease 0s;
43+
}
44+
45+
.divascookies-banner-container > .divascookies-accept-button-container {
46+
display: inline-block;
47+
margin-top: 5px;
48+
}
49+
50+
.divascookies-accept-button-container > .divascookies-accept-button-img {
51+
52+
}
53+
54+
.divascookies-accept-button-container > .divascookies-accept-button-text {
55+
font-size: 1.3em;
56+
cursor: pointer;
57+
background: #f9fafc;
58+
color: #313131;
59+
padding: 7px 10px;
60+
-moz-border-radius: 4px;
61+
-webkit-border-radius: 4px;
62+
border-radius: 4px;
63+
transition: background-color 0.3s ease 0s;
64+
}
65+
66+
.divascookies-accept-button-container > .divascookies-accept-button-text:hover {
67+
background: #e3e4e6;
68+
}

css/divascookies_style_dark_top.css

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/**
2+
* Divas Cookies jquery plugin for Cookie Policy banner stylesheet
3+
* @author: CodingDivas
4+
* @date: 2014/10/27
5+
* @version: 0.2 production
6+
*/
7+
8+
.divascookies {
9+
position: fixed;
10+
top: 0;
11+
width: 100%;
12+
background: #313131;
13+
color: #f9fafc;
14+
display: none;
15+
z-index: 999999;
16+
}
17+
18+
.divascookies > .divascookies-banner-container {
19+
position: relative;
20+
padding: 15px 20px;
21+
overflow: hidden;
22+
text-align: center;
23+
}
24+
25+
.divascookies p.divascookies-banner-text {
26+
position: relative;
27+
line-height: 1.3em;
28+
font-size: 1.4em;
29+
display: inline-block;
30+
padding: 0 10px 0 0;
31+
}
32+
33+
span.divascookies-policy-link {
34+
}
35+
36+
span.divascookies-policy-link a {
37+
white-space: nowrap;
38+
}
39+
40+
span.divascookies-policy-link a:hover {
41+
text-decoration: underline;
42+
transition: color 0.3s ease 0s;
43+
}
44+
45+
.divascookies-banner-container > .divascookies-accept-button-container {
46+
display: inline-block;
47+
margin-top: 5px;
48+
}
49+
50+
.divascookies-accept-button-container > .divascookies-accept-button-img {
51+
52+
}
53+
54+
.divascookies-accept-button-container > .divascookies-accept-button-text {
55+
font-size: 1.3em;
56+
cursor: pointer;
57+
background: #f9fafc;
58+
color: #313131;
59+
padding: 7px 10px;
60+
-moz-border-radius: 4px;
61+
-webkit-border-radius: 4px;
62+
border-radius: 4px;
63+
transition: background-color 0.3s ease 0s;
64+
}
65+
66+
.divascookies-accept-button-container > .divascookies-accept-button-text:hover {
67+
background: #e3e4e6;
68+
}

0 commit comments

Comments
 (0)