Version Description
Heavy bugs fixed. With WP_DEBUG true plugin generated a lot of errors.
Download this release
Release Info
Developer | ITRO |
Plugin | ITRO Popup Plugin |
Version | 4.3 |
Comparing to | |
See all releases |
Version 4.3
- admin/popup-admin.php +472 -0
- css/itro-style.php +179 -0
- functions/core-function.php +172 -0
- functions/database-function.php +80 -0
- functions/js-function.php +426 -0
- gpl-3.0.txt +674 -0
- images/close-icon.png +0 -0
- images/coffee.png +0 -0
- images/question_mark.png +0 -0
- languages/itro-plugin-en_GB.mo +0 -0
- languages/itro-plugin-en_GB.po +336 -0
- languages/itro-plugin-it_IT.mo +0 -0
- languages/itro-plugin-it_IT.po +495 -0
- mc-main.php +57 -0
- readme.txt +223 -0
- scripts/jscolor/arrow.gif +0 -0
- scripts/jscolor/cross.gif +0 -0
- scripts/jscolor/demo.html +12 -0
- scripts/jscolor/hs.png +0 -0
- scripts/jscolor/hv.png +0 -0
- scripts/jscolor/jscolor.js +953 -0
- templates/index.php +3 -0
- templates/itro-popup-template.php +27 -0
- uninstall.php +24 -0
admin/popup-admin.php
ADDED
@@ -0,0 +1,472 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Copyright 2013 I.T.RO.® (email : support.itro@live.com)
|
4 |
+
This file is part of ITRO Popup Plugin.
|
5 |
+
*/
|
6 |
+
|
7 |
+
if ( !current_user_can( 'manage_options' ) ) {
|
8 |
+
wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
|
9 |
+
}
|
10 |
+
// variables for the field and option names
|
11 |
+
if( !isset($submitted_form ))
|
12 |
+
{
|
13 |
+
$opt_name=array(
|
14 |
+
/*opt 0*/'popup_time',
|
15 |
+
/*opt 1*/'popup_top_margin',
|
16 |
+
/*opt 2*/'cookie_time_exp',
|
17 |
+
/*opt 3*/'popup_width',
|
18 |
+
/*opt 4*/'popup_background',
|
19 |
+
/*opt 5*/'popup_border_color',
|
20 |
+
/*opt 6*/'age_restriction',
|
21 |
+
/*opt 7*/'enter_button_text',
|
22 |
+
/*opt 8*/'leave_button_text',
|
23 |
+
/*opt 9*/'leave_button_url',
|
24 |
+
/*opt 10*/'enter_button_bg_color',
|
25 |
+
/*opt 11*/'enter_button_border_color',
|
26 |
+
/*opt 12*/'leave_button_bg_color',
|
27 |
+
/*opt 13*/'leave_button_border_color',
|
28 |
+
/*opt 14*/'enter_button_font_color',
|
29 |
+
/*opt 15*/'leave_button_font_color',
|
30 |
+
/*opt 16*/'popup_position',
|
31 |
+
/*opt 17*/'popup_height',
|
32 |
+
/*opt 18*/'page_selection',
|
33 |
+
/*opt 19*/'blog_home',
|
34 |
+
/*opt 20*/'popup_border_radius',
|
35 |
+
/*opt 21*/'count_font_color',
|
36 |
+
/*opt 22*/'background_select',
|
37 |
+
/*opt 23*/'popup_delay',
|
38 |
+
/*opt 24*/'popup_unlockable',
|
39 |
+
/*opt 25*/'popup_bg_opacity',
|
40 |
+
/*opt 26*/'opaco_bg_color',
|
41 |
+
/*opt 27*/'popup_border_width',
|
42 |
+
/*opt 28*/'advanced_settings',
|
43 |
+
/*opt 29*/'show_countdown',
|
44 |
+
/*opt 30*/'auto_margin_check',
|
45 |
+
/*opt 31*/'popup_padding',
|
46 |
+
);
|
47 |
+
$field_name=array(
|
48 |
+
/*fld 0*/'custom_html',
|
49 |
+
);
|
50 |
+
$submitted_form = 'mt_submit_hidden';
|
51 |
+
}
|
52 |
+
|
53 |
+
|
54 |
+
|
55 |
+
//ordered options
|
56 |
+
for($i=0;$i<count($opt_name); $i++)
|
57 |
+
{
|
58 |
+
// Read in existing option value from database
|
59 |
+
$opt_val[$i] = itro_get_option( $opt_name[$i] );
|
60 |
+
$px_opt_val[$i] = itro_get_option( 'px_' . $opt_name[$i] );
|
61 |
+
$perc_opt_val[$i] = itro_get_option( 'perc_' . $opt_name[$i] );
|
62 |
+
// See if the user has posted us some information
|
63 |
+
// If they did, this hidden field will be set to 'Y'
|
64 |
+
if( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y' )
|
65 |
+
{
|
66 |
+
// Read their posted value
|
67 |
+
if(isset($_POST[$opt_name[$i]])){$opt_val[$i] = $_POST[ $opt_name[$i] ];}
|
68 |
+
else{$opt_val[$i] = NULL;}
|
69 |
+
|
70 |
+
// Save the posted value in the database
|
71 |
+
echo itro_update_option( $opt_name[$i], $opt_val[$i] );
|
72 |
+
|
73 |
+
if( isset($_POST['select_' . $opt_name[$i]]) )
|
74 |
+
{
|
75 |
+
itro_update_option( 'select_' . $opt_name[$i], $_POST['select_' . $opt_name[$i]] );
|
76 |
+
|
77 |
+
$px_opt_val[$i] = $_POST['px_' . $opt_name[$i]];
|
78 |
+
itro_update_option( 'px_' . $opt_name[$i], $_POST['px_' . $opt_name[$i]] );
|
79 |
+
$perc_opt_val[$i] = $_POST['perc_' . $opt_name[$i]];
|
80 |
+
itro_update_option( 'perc_' . $opt_name[$i], $_POST['perc_' . $opt_name[$i]] );
|
81 |
+
}
|
82 |
+
else{ itro_update_option( 'select_' . $opt_name[$i], NULL ); }
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
//ordered field
|
87 |
+
for($i=0;$i<count($field_name); $i++)
|
88 |
+
{
|
89 |
+
// Read in existing option value from database
|
90 |
+
|
91 |
+
$field_value[$i] = itro_get_field( $field_name[$i] );
|
92 |
+
|
93 |
+
// See if the user has posted us some information
|
94 |
+
// If they did, this hidden field will be set to 'Y'
|
95 |
+
if( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y' )
|
96 |
+
{
|
97 |
+
// Read their posted value
|
98 |
+
if(isset($_POST[$field_name[$i]])) {$field_value[$i] = $_POST[ $field_name[$i] ]; }
|
99 |
+
else{$field_value[$i] = NULL;}
|
100 |
+
|
101 |
+
// Save the posted value in the database
|
102 |
+
itro_update_field( $field_name[$i], $field_value[$i] );
|
103 |
+
}
|
104 |
+
}
|
105 |
+
|
106 |
+
//unsorted option and field
|
107 |
+
if( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y')
|
108 |
+
{
|
109 |
+
if( isset($_POST['selected_page_id']) )
|
110 |
+
{
|
111 |
+
$selected_page_id=json_encode($_POST['selected_page_id']);
|
112 |
+
itro_update_option('selected_page_id',$selected_page_id);
|
113 |
+
}
|
114 |
+
else
|
115 |
+
{
|
116 |
+
itro_update_option('selected_page_id',NULL);
|
117 |
+
}
|
118 |
+
|
119 |
+
if( empty($_POST['background_source']) ) { $opt_val[22] = NULL; itro_update_option('background_source',NULL); }
|
120 |
+
else { itro_update_option('background_source',$_POST['background_source']); }
|
121 |
+
}
|
122 |
+
itro_admin_style();
|
123 |
+
// Put an settings updated message on the screen
|
124 |
+
if( isset($_POST[ $submitted_form ]) && $_POST[ $submitted_form ] == 'Y' || isset($_POST['delete_data_hidden']) && $_POST['delete_data_hidden'] == 'Y' ) {
|
125 |
+
?>
|
126 |
+
<div class="updated"><p><strong><?php _e('settings saved.', 'itro-plugin' ); ?></strong></p></div>
|
127 |
+
<?php
|
128 |
+
}
|
129 |
+
?>
|
130 |
+
<script type="text/javascript" src="<?php echo itroPath . 'scripts/'; ?>jscolor/jscolor.js"></script>
|
131 |
+
|
132 |
+
<div style="display:table; width:100%;">
|
133 |
+
<h1 style="float:left;"><?php _e( 'I.T.RO. Popup Plugin - Settings', 'itro-plugin');?></h1>
|
134 |
+
<h4 style="float:right; margin-right:30px;">VER <?php echo get_option('itro_curr_ver'); ?></h4>
|
135 |
+
</div>
|
136 |
+
|
137 |
+
<form id="optionForm" method="post">
|
138 |
+
|
139 |
+
<div id="leftColumn">
|
140 |
+
<!-- Settings form !-->
|
141 |
+
<div id="formContainer">
|
142 |
+
|
143 |
+
<!--------- General options --------->
|
144 |
+
<?php echo itro_onOff('genOption','hidden');?>
|
145 |
+
<p class="wpstyle" onClick="onOff_genOption();"><?php _e("General Popup Option:", 'itro-plugin' ); ?> </p>
|
146 |
+
<div id="genOption">
|
147 |
+
<input type="hidden" name="<?php echo $submitted_form; ?>" value="Y">
|
148 |
+
|
149 |
+
<!-- advanced settings checkbox !-->
|
150 |
+
<p>
|
151 |
+
<input type="checkbox" id="<?php echo $opt_name[28]; ?>" name="<?php echo $opt_name[28]; ?>" value="yes" <?php if($opt_val[28]=='yes' ){echo 'checked="checked"';} ?>>
|
152 |
+
<span id="span_<?php echo $opt_name[28]; ?>" onclick="itro_mutual_check('<?php echo $opt_name[28]; ?>','','');"><?php _e("SHOW ADVANCED SETTINGS","itro-plugin")?></span>
|
153 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e('Display many other options','itro-plugin');?>" />
|
154 |
+
</p>
|
155 |
+
|
156 |
+
<!-- popup display location!-->
|
157 |
+
<p>
|
158 |
+
<h3><?php _e("DECIDE WHERE POPUP WILL BE DISPLAYED","itro-plugin")?></h3>
|
159 |
+
<fieldset>
|
160 |
+
<input type="radio" id="only_selected" name="<?php echo $opt_name[18];?>" value="some"<?php if($opt_val[18]=='some'){echo 'checked="checked"';} ?>/><?php _e("Only selected pages", 'itro-plugin' ); ?><img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Multiple choise with CTRL+Click or SHIFT+Arrow up or down",'itro-plugin');?>">
|
161 |
+
<input type="radio" name="<?php echo $opt_name[18];?>" value="all" <?php if($opt_val[18]=='all' ){echo 'checked="checked"';} ?>/><?php _e("All pages", 'itro-plugin' ); ?>
|
162 |
+
<input type="radio" name="<?php echo $opt_name[18];?>" value="any" <?php if($opt_val[18]=='any' || $opt_val[18]== NULL){echo 'checked="checked"';} ?>/><?php _e("No page", 'itro-plugin' ); ?>
|
163 |
+
</fieldset>
|
164 |
+
<div onClick="document.getElementById('only_selected').checked = true;">
|
165 |
+
<select name="<?php echo $opt_name[19]; ?>" multiple size="1">
|
166 |
+
<option onmouseover="itro_check_state(this)" onmouseup="itro_select(this);" value="yes" <?php if($opt_val[19]=='yes' ){echo 'selected="select"';} ?> ><?php _e("Blog homepage","itro-plugin")?></option>
|
167 |
+
</select>
|
168 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e('If in your Settings->Reading you have set \'Front page displays: Your latest posts\' and want to display the popup in the home, check this box.','itro-plugin');?>" />
|
169 |
+
<br>
|
170 |
+
<?php // list of published pages
|
171 |
+
itro_list_pages();
|
172 |
+
?>
|
173 |
+
</div>
|
174 |
+
</p>
|
175 |
+
|
176 |
+
<!-- disable esc key !-->
|
177 |
+
<h3><?php _e("GENERAL SETTINGS","itro-plugin")?></h3>
|
178 |
+
<p id="<?php echo $opt_name[24]; ?>_div">
|
179 |
+
<input type="checkbox" id="<?php echo $opt_name[24]; ?>" name="<?php echo $opt_name[24]; ?>" value="yes" <?php if($opt_val[24] == 'yes' ){echo 'checked="checked"';} ?> />
|
180 |
+
<span onclick="itro_mutual_check('<?php echo $opt_name[24]; ?>','','')"><?php _e("Disable ESC key", 'itro-plugin' ); ?></span>
|
181 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>"title="<?php _e('If you set this option popup can not be closed with ESC button of keyboard.','itro-plugin');?>" >
|
182 |
+
</p>
|
183 |
+
|
184 |
+
<!-- popup seconds!-->
|
185 |
+
<div style="display:table; height:10px; padding-bottom:5px;">
|
186 |
+
<span style="float:left;" ><?php _e("Popup seconds:", 'itro-plugin' ); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Set seconds until the popup automatically close. Set it to zero to disable countdown.",'itro-plugin');?>" ></span>
|
187 |
+
|
188 |
+
<?php itro_slidebar( $opt_name[0] , $opt_val[0] , 0 , 120 , 1, 0, '') ?>
|
189 |
+
<input type="text" style="color: #f6931f; font-weight: bold; position:relative; left:10px;" id="<?php echo $opt_name[0]; ?>" name="<?php echo $opt_name[0]; ?>" value="<?php echo $opt_val[0]; ?>" size="1">
|
190 |
+
</div>
|
191 |
+
|
192 |
+
<!-- popup delay!-->
|
193 |
+
<div id="<?php echo $opt_name[23]; ?>_div" style="display:table; height:10px; padding-bottom:5px;">
|
194 |
+
<span style="float:left;" ><?php _e("Popup delay:", 'itro-plugin' ); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Set seconds before the popup will be displayed",'itro-plugin');?>" ></span>
|
195 |
+
|
196 |
+
<?php itro_slidebar( $opt_name[23] , $opt_val[23] , 0 , 120 , 1, 0, '') ?>
|
197 |
+
<input type="text" style="color: #f6931f; font-weight: bold; position:relative; left:10px;" id="<?php echo $opt_name[23]; ?>" name="<?php echo $opt_name[23]; ?>" value="<?php echo $opt_val[23]; ?>" size="1">
|
198 |
+
</div>
|
199 |
+
|
200 |
+
<!-- next time visualization !-->
|
201 |
+
<div style="display:table; height:10px; padding-bottom:5px;">
|
202 |
+
<span style="float:left;" ><?php _e("Next visualization (hours):", 'itro-plugin' ); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Set time for the next visualization of popup, to prevent annoying repeated visualizations, when someone visit pages",'itro-plugin');?>" ></span>
|
203 |
+
|
204 |
+
<?php itro_slidebar( $opt_name[2] , $opt_val[2] , 0 , 720 , 6, 0, '') ?>
|
205 |
+
<input type="text" style="color: #f6931f; font-weight: bold; position:relative; left:10px;" id="<?php echo $opt_name[2]; ?>" name="<?php echo $opt_name[2]; ?>" value="<?php echo $opt_val[2]; ?>" size="1">
|
206 |
+
</div>
|
207 |
+
|
208 |
+
<input value="<?php _e("Delete cookie", 'itro-plugin' ); ?>" type="button" class="button" onclick="itro_set_cookie('popup_cookie','one_time_popup',-100); jQuery('#cookie_msg').stop(true, true); jQuery('#cookie_msg').fadeIn(function() {jQuery('#cookie_msg').fadeOut(6000);});">
|
209 |
+
<span id="cookie_msg" style="display:none;background-color:green;"><?php _e("Cookie deleted!", 'itro-plugin' ); ?></span>
|
210 |
+
|
211 |
+
<!-- countdown settings !-->
|
212 |
+
<p id="<?php echo $opt_name[29]; ?>_div">
|
213 |
+
<input type="checkbox" name="<?php echo $opt_name[29]; ?>" id="<?php echo $opt_name[29]; ?>" value="yes" <?php if(itro_get_option($opt_name[29])=='yes' ){echo 'checked="checked"';} ?> />
|
214 |
+
<span onclick="itro_mutual_check('<?php echo $opt_name[29]; ?>','','')"><?php _e("Show countdown", 'itro-plugin' ); ?></span>
|
215 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e('Show the countdown at the bottom of the popup which dispay the time before popup will close. If is hidden, it run anyway.','itro-plugin');?>" >
|
216 |
+
|
217 |
+
<?php _e("Countdown font color:", 'itro-plugin' ); ?>
|
218 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e('Select the countdown font color.','itro-plugin');?>" >
|
219 |
+
<input type="text" class="color" name="<?php echo $opt_name[21]; ?>" value="<?php echo $opt_val[21]; ?>" size="10">
|
220 |
+
</p>
|
221 |
+
|
222 |
+
<h3><?php _e("POPUP ASPECT","itro-plugin")?></h3>
|
223 |
+
|
224 |
+
<!-- popup width !-->
|
225 |
+
<div style="display:table; height:10px; padding-bottom:5px;">
|
226 |
+
<span style="float:left;" ><?php _e("Popup width:", 'itro-plugin' ); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Use the % to change width dinamically with the browser window , or px for fixed dimension i.e: 30% or 200px",'itro-plugin');?>" ></span>
|
227 |
+
|
228 |
+
<?php itro_slidebar( $opt_name[3] , $opt_val[3] , 0 , 1500 , 10, 0, 'px') ?>
|
229 |
+
<?php itro_slidebar( $opt_name[3] , $opt_val[3] , 0 , 100 , 1, 0, 'perc') ?>
|
230 |
+
<input type="text" style="color: #f6931f; font-weight: bold; position:relative; left:7px;<?php if( itro_get_option('select_' . $opt_name[3]) != 'px' ) { echo 'display:none;'; } ?>" id="<?php echo 'px_' . $opt_name[3]; ?>" name="<?php echo 'px_' . $opt_name[3]; ?>" value="<?php echo $px_opt_val[3]; ?>" size="1">
|
231 |
+
<input type="text" style="color: #f6931f; font-weight: bold; position:relative; left:7px;<?php if( itro_get_option('select_' . $opt_name[3]) != 'perc' ) { echo 'display:none;'; } ?>" id="<?php echo 'perc_' . $opt_name[3]; ?>" name="<?php echo 'perc_' . $opt_name[3]; ?>" value="<?php echo $perc_opt_val[3]; ?>" size="1">
|
232 |
+
<select id="select_<?php echo $opt_name[3]; ?>" name="select_<?php echo $opt_name[3]; ?>" style="position:relative; left:7px;">
|
233 |
+
<option value="px" onClick="itro_enable_<?php echo $opt_name[3]; ?>('px')" <?php if(itro_get_option('select_' . $opt_name[3])=='px') {echo 'selected="select"';} ?>>px</option>
|
234 |
+
<option value="perc" onClick="itro_enable_<?php echo $opt_name[3]; ?>('perc')" <?php if(itro_get_option('select_' . $opt_name[3])=='perc') {echo 'selected="select"';} ?>>%</option>
|
235 |
+
</select>
|
236 |
+
</div>
|
237 |
+
|
238 |
+
<!-- popup height !-->
|
239 |
+
<div id="<?php echo $opt_name[17]; ?>_div" style="display:table; height:10px; padding-bottom:5px;">
|
240 |
+
<span style="float:left;" ><?php _e("Popup height:", 'itro-plugin' ); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Select auto to adapt popup height to the content",'itro-plugin');?>" ></span>
|
241 |
+
|
242 |
+
<?php itro_slidebar( $opt_name[17] , $opt_val[17] , 0 , 750 , 5, 0, 'px') ?>
|
243 |
+
<?php itro_slidebar( $opt_name[17] , $opt_val[17] , 0 , 100 , 1, 0, 'perc') ?>
|
244 |
+
<input type="text" style="color: #f6931f; font-weight: bold; position:relative; left:7px;<?php if( itro_get_option('select_' . $opt_name[17]) != 'px' ) { echo 'display:none;'; } ?>" id="<?php echo 'px_' . $opt_name[17]; ?>" name="<?php echo 'px_' . $opt_name[17]; ?>" value="<?php echo $px_opt_val[17]; ?>" size="1">
|
245 |
+
<input type="text" style="color: #f6931f; font-weight: bold; position:relative; left:7px;<?php if( itro_get_option('select_' . $opt_name[17]) != 'perc' ) { echo 'display:none;'; } ?>" id="<?php echo 'perc_' . $opt_name[17]; ?>" name="<?php echo 'perc_' . $opt_name[17]; ?>" value="<?php echo $perc_opt_val[17]; ?>" size="1">
|
246 |
+
<select id="select_<?php echo $opt_name[17]; ?>" name="select_<?php echo $opt_name[17]; ?>" style="position:relative; left:7px;">
|
247 |
+
<option value="px" onClick="itro_enable_<?php echo $opt_name[17]; ?>('px')" <?php if(itro_get_option('select_' . $opt_name[17])=='px') {echo 'selected="select"';} ?>>px</option>
|
248 |
+
<option value="perc" onClick="itro_enable_<?php echo $opt_name[17]; ?>('perc')" <?php if(itro_get_option('select_' . $opt_name[17])=='perc') {echo 'selected="select"';} ?>>%</option>
|
249 |
+
<option value="auto" onClick="itro_disable_<?php echo $opt_name[17]; ?>();" <?php if(itro_get_option('select_' . $opt_name[17])=='auto') {echo 'selected="select"';} ?>>auto</option>
|
250 |
+
</select>
|
251 |
+
</div>
|
252 |
+
|
253 |
+
<!-- background and border color !-->
|
254 |
+
<p><?php _e("Popup background color", 'itro-plugin' ); ?>
|
255 |
+
<input type="text" class="color" name="<?php echo $opt_name[4]; ?>" value="<?php echo $opt_val[4]; ?>" size="10">
|
256 |
+
<?php _e("Popup border color:", 'itro-plugin' ); ?>
|
257 |
+
<input type="text" class="color" name="<?php echo $opt_name[5]; ?>" value="<?php echo $opt_val[5]; ?>" size="10">
|
258 |
+
</p>
|
259 |
+
|
260 |
+
<!-- border radius !-->
|
261 |
+
<div id="<?php echo $opt_name[20]; ?>_div" style="display:table; height:10px; padding-bottom:5px;" >
|
262 |
+
<span style="float:left;" ><?php _e("Popup border radius(px):", 'itro-plugin' ); ?></span>
|
263 |
+
|
264 |
+
<?php itro_slidebar( $opt_name[20] , $opt_val[20] , 0 , 200 , 1, 0, '') ?>
|
265 |
+
<input type="text" style="color: #f6931f; font-weight: bold; position:relative; left:10px;" id="<?php echo $opt_name[20]; ?>" name="<?php echo $opt_name[20]; ?>" value="<?php echo $opt_val[20]; ?>" size="1">
|
266 |
+
</div>
|
267 |
+
|
268 |
+
<!-- border width !-->
|
269 |
+
<div id="<?php echo $opt_name[27]; ?>_div" style="display:table; height:10px; padding-bottom:5px;" >
|
270 |
+
<span style="float:left;" ><?php _e("Popup border width(px):", 'itro-plugin' ); ?></span>
|
271 |
+
|
272 |
+
<?php itro_slidebar( $opt_name[27] , $opt_val[27] , 0 , 50 , 1, 0, '') ?>
|
273 |
+
<input type="text" style="color: #f6931f; font-weight: bold; position:relative; left:10px;" id="<?php echo $opt_name[27]; ?>" name="<?php echo $opt_name[27]; ?>" value="<?php echo $opt_val[27]; ?>" size="1">
|
274 |
+
</div>
|
275 |
+
|
276 |
+
<!-- popup padding !-->
|
277 |
+
<div id="<?php echo $opt_name[31]; ?>_div" style="display:table; height:10px; padding-bottom:5px;" >
|
278 |
+
<span style="float:left;" ><?php _e("Popup padding(px):", 'itro-plugin' ); ?></span>
|
279 |
+
|
280 |
+
<?php itro_slidebar( $opt_name[31] , $opt_val[31] , 0 , 100 , 1, 0, '') ?>
|
281 |
+
<input type="text" style="color: #f6931f; font-weight: bold; position:relative; left:10px;" id="<?php echo $opt_name[31]; ?>" name="<?php echo $opt_name[31]; ?>" value="<?php echo $opt_val[31]; ?>" size="1">
|
282 |
+
</div>
|
283 |
+
|
284 |
+
<!-- background image !-->
|
285 |
+
<p><?php _e("BACKGROUND IMAGE",'itro-plugin');?></p>
|
286 |
+
<a href="<?php if ( itro_get_option('background_source') == NULL ) {echo '#' . $opt_name[22];} else { echo itro_get_option('background_source'); }?>"><?php _e('Show image','itro-plugin')?></a>
|
287 |
+
|
288 |
+
<input type="radio" name="<?php echo $opt_name[22];?>" value="" <?php if($opt_val[22]== 'no' || $opt_val[22]== NULL ){echo 'checked="checked"';} ?>/>
|
289 |
+
<?php _e("No background",'itro-plugin');?><br>
|
290 |
+
<input type="radio" id="yes_bg" name="<?php echo $opt_name[22];?>" value="yes" <?php if( $opt_val[22]== 'yes' ){echo 'checked="checked"';} ?>/>
|
291 |
+
<input class="upload" onClick="select(); document.getElementById('yes_bg').checked=true" type="text" name="background_source" size="50" value="<?php echo itro_get_option('background_source'); ?>" />
|
292 |
+
<input class="button" id="upload_button" type="button" name="bg_upload_button" value="<?php _e('Upload Image','itro-plugin') ?>" />
|
293 |
+
|
294 |
+
<!-- popup position !-->
|
295 |
+
<p><?php _e("Popup position:", 'itro-plugin' ); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Setting ABSOLUTE the popup will be static on the page. Setting FIXED it will scroll with the page.",'itro-plugin');?>" >
|
296 |
+
<select name="<?php echo $opt_name[16]; ?>" style="min-width:100px;">
|
297 |
+
<option value="absolute" <?php if(itro_get_option($opt_name[16])=='absolute') {echo 'selected="select"';} ?> >Absolute</option>
|
298 |
+
<option value="fixed" <?php if(itro_get_option($opt_name[16])=='fixed') {echo 'selected="select"';} ?> >Fixed</option>
|
299 |
+
</select>
|
300 |
+
</p>
|
301 |
+
|
302 |
+
<!-- automatic margin !-->
|
303 |
+
<div id="<?php echo $opt_name[30]; ?>_div">
|
304 |
+
<p>
|
305 |
+
<input id="<?php echo $opt_name[30]; ?>" type="checkbox" name="<?php echo $opt_name[30]; ?>" value="yes" <?php if(itro_get_option($opt_name[30])=='yes' ){echo 'checked="checked"';} ?> />
|
306 |
+
<span id="span_<?php echo $opt_name[30]; ?>" onclick="itro_mutual_check('<?php echo $opt_name[30]; ?>','','');"><?php _e("Automatic top margin:", 'itro-plugin' ); ?></span>
|
307 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("The system will try to auto center the popup, in case of problem deselect this option",'itro-plugin');?>" >
|
308 |
+
</p>
|
309 |
+
|
310 |
+
<!-- popup top margin !-->
|
311 |
+
<div id="top_margin_slider" style=" <?php if(itro_get_option($opt_name[30])=='yes' ){echo 'display:none';} else {echo 'display:table';} ?>; height:10px; padding-bottom:5px;" >
|
312 |
+
<span style="float:left;" ><?php _e("Popup top margin(px):", 'itro-plugin' ); ?></span>
|
313 |
+
|
314 |
+
<?php itro_slidebar( $opt_name[1] , $opt_val[1] , 0 , 750 , 5, 0, '') ?>
|
315 |
+
<input type="text" style="color: #f6931f; font-weight: bold; position:relative; left:10px;" id="<?php echo $opt_name[1]; ?>" name="<?php echo $opt_name[1]; ?>" value="<?php echo $opt_val[1]; ?>" size="1">
|
316 |
+
</div>
|
317 |
+
<?php echo itro_show_hide(array('top_margin_slider'), $opt_name[30], 'table',false, array('yellow',300)); ?>
|
318 |
+
|
319 |
+
|
320 |
+
<!-- background opacity !-->
|
321 |
+
<div style="display:table; height:10px; padding-bottom:5px;">
|
322 |
+
<span style="float:left;" ><?php _e("Background opacity", 'itro-plugin' ); ?> <img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>" title="<?php _e("Set the opacity of opaque background under the popup.",'itro-plugin');?>" ></span>
|
323 |
+
|
324 |
+
<?php itro_slidebar( $opt_name[25] , $opt_val[25] , 0 , 1 , 0.05 , 2 , '' ) ?>
|
325 |
+
<input type="text" style="color: #f6931f; font-weight: bold; position:relative; left:10px;" id="<?php echo $opt_name[25]; ?>" name="<?php echo $opt_name[25]; ?>" value="<?php echo $opt_val[25];?>" size="1">
|
326 |
+
</div>
|
327 |
+
<script type="text/javascript">
|
328 |
+
document.getElementById("<?php echo $opt_name[25]; ?>_slider_container").addEventListener("mousedown", update, false);
|
329 |
+
document.getElementById("<?php echo $opt_name[25]; ?>_slider_container").addEventListener("mouseup", update, false);
|
330 |
+
document.getElementById("<?php echo $opt_name[25]; ?>_slider_container").addEventListener("keydown", update, false);
|
331 |
+
function update()
|
332 |
+
{
|
333 |
+
document.getElementById("<?php echo $opt_name[26]; ?>").style.opacity = document.getElementById("<?php echo $opt_name[25]; ?>").value
|
334 |
+
document.addEventListener("mousemove", update, false);
|
335 |
+
}
|
336 |
+
function stop()
|
337 |
+
{
|
338 |
+
document.removeEventListener("mousemove", update, false);
|
339 |
+
}
|
340 |
+
</script
|
341 |
+
|
342 |
+
<!-- opaco color !-->
|
343 |
+
<p><?php _e("Opaque background color", 'itro-plugin' ); ?>
|
344 |
+
<input type="text" class="color" id="<?php echo $opt_name[26]; ?>" name="<?php echo $opt_name[26]; ?>" style="opacity:<?php echo $opt_val[25];?> ;" value="<?php echo $opt_val[26]; ?>" size="10">
|
345 |
+
</p>
|
346 |
+
</div>
|
347 |
+
|
348 |
+
</div>
|
349 |
+
|
350 |
+
<!------------ Age restriction option ---------->
|
351 |
+
<?php echo itro_onOff('ageRestSettings','hidden');?>
|
352 |
+
<p class="wpstyle" onClick="onOff_ageRestSettings();"><?php _e("Age restriction settings:", 'itro-plugin' ); ?> </p>
|
353 |
+
<div id="ageRestSettings">
|
354 |
+
<p>
|
355 |
+
<input id="<?php echo $opt_name[6]; ?>" type="checkbox" name="<?php echo $opt_name[6]; ?>" value="yes" <?php if($opt_val[6]=='yes' ){echo 'checked="checked"';} ?> />
|
356 |
+
<span id="span_<?php echo $opt_name[6]; ?>" onclick="itro_mutual_check('<?php echo $opt_name[6]; ?>','','');"><?php _e("Enable age validation", 'itro-plugin' ); ?></span>
|
357 |
+
</p>
|
358 |
+
<div id="<?php echo $opt_name[6]; ?>_div">
|
359 |
+
<p><?php _e("Enter button text:", 'itro-plugin' ); ?>
|
360 |
+
<input type="text" name="<?php echo $opt_name[7]; ?>" value="<?php echo $opt_val[7]; ?>" placeholder="<?php _e("i.e.: I AM OVER 18 - ENTER", 'itro-plugin' ); ?>" size="40">
|
361 |
+
</p>
|
362 |
+
|
363 |
+
<div id="<?php echo $opt_name[6] . '_advanced_1'; ?>">
|
364 |
+
<p><?php _e("Enter button background color:", 'itro-plugin' ); ?>
|
365 |
+
<input type="text" class="color" name="<?php echo $opt_name[10]; ?>" value="<?php echo $opt_val[10]; ?>" size="10">
|
366 |
+
</p>
|
367 |
+
<p><?php _e("Enter button border color:", 'itro-plugin' ); ?>
|
368 |
+
<input type="text" class="color" name="<?php echo $opt_name[11]; ?>" value="<?php echo $opt_val[11]; ?>" size="10">
|
369 |
+
</p>
|
370 |
+
<p><?php _e("Enter button font color:", 'itro-plugin' ); ?>
|
371 |
+
<input type="text" class="color" name="<?php echo $opt_name[14]; ?>" value="<?php echo $opt_val[14]; ?>" size="10">
|
372 |
+
</p>
|
373 |
+
</div>
|
374 |
+
|
375 |
+
<p><?php _e("Leave button text:", 'itro-plugin' ); ?>
|
376 |
+
<input type="text" name="<?php echo $opt_name[8]; ?>" value="<?php echo $opt_val[8] ?>" placeholder="<?php _e("i.e.: I AM UNDER 18 - LEAVE", 'itro-plugin' ); ?>" size="40">
|
377 |
+
</p>
|
378 |
+
<p><?php _e("Leave button url:", 'itro-plugin' ); ?>
|
379 |
+
<input type="text" name="<?php echo $opt_name[9]; ?>" value="<?php echo $opt_val[9]; ?>" placeholder="<?php _e("i.e.: http://www.mysite.com/leave.html", 'itro-plugin' ); ?>" size="40">
|
380 |
+
</p>
|
381 |
+
|
382 |
+
<div id="<?php echo $opt_name[6] . '_advanced_2'; ?>">
|
383 |
+
<p><?php _e("Leave button background color:", 'itro-plugin' ); ?>
|
384 |
+
<input type="text" name="<?php echo $opt_name[12]; ?>" value="<?php echo $opt_val[12]; ?>" size="10">
|
385 |
+
</p>
|
386 |
+
<p><?php _e("Leave button border color:", 'itro-plugin' ); ?>
|
387 |
+
<input type="text" class="color" name="<?php echo $opt_name[13]; ?>" value="<?php echo $opt_val[13]; ?>" size="10">
|
388 |
+
</p>
|
389 |
+
<p><?php _e("Leave button font color:", 'itro-plugin' ); ?>
|
390 |
+
<input type="text" class="color" name="<?php echo $opt_name[15]; ?>" value="<?php echo $opt_val[15]; ?>" size="10">
|
391 |
+
</p>
|
392 |
+
</div>
|
393 |
+
|
394 |
+
</div>
|
395 |
+
</div>
|
396 |
+
<?php echo itro_show_hide(array($opt_name[6] . '_div'), $opt_name[6], 'table', true, array('yellow',300)); ?>
|
397 |
+
</div>
|
398 |
+
<hr>
|
399 |
+
<p class="submit">
|
400 |
+
<input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
|
401 |
+
<input type="button" target="_blank" class="button" onClick="window.open('/?page_id=<?php echo itro_get_option('preview_id') ?>')" value="<?php echo _e('Preview page','itro-plugin' )?>">
|
402 |
+
</p>
|
403 |
+
</div>
|
404 |
+
|
405 |
+
<div id="rightColumn">
|
406 |
+
<input type="hidden" name="<?php echo $submitted_form; ?>" value="Y">
|
407 |
+
<!------- Custom html field -------->
|
408 |
+
<?php echo itro_onOff('customHtmlForm','hidden');?>
|
409 |
+
<p class="wpstyle" onClick="onOff_customHtmlForm();"><?php _e("Your text (or HTML code:)", 'itro-plugin' ); ?> </p>
|
410 |
+
<div id="customHtmlForm">
|
411 |
+
<?php
|
412 |
+
$content = stripslashes($field_value[0]);
|
413 |
+
wp_editor( $content, 'custom_html', array('textarea_name'=> 'custom_html','teeny'=>false, 'media_buttons'=>true, 'wpautop'=>false ) ); ?>
|
414 |
+
<br><br>
|
415 |
+
<hr>
|
416 |
+
<p class="submit">
|
417 |
+
<input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
|
418 |
+
<input type="button" target="_blank" class="button" onClick="window.open('/?page_id=<?php echo itro_get_option('preview_id') ?>')" value="<?php echo _e('Preview page','itro-plugin' )?>">
|
419 |
+
</p>
|
420 |
+
</div>
|
421 |
+
</div>
|
422 |
+
</form>
|
423 |
+
<div id="rightColumn2">
|
424 |
+
<!-- Donation form - please don't change or remove!!! thanks !-->
|
425 |
+
<div id="donateForm">
|
426 |
+
<h3><?php _e("Like it? Offer us a coffee! ;-)","itro-plugin")?> <img width="35px" src="<?php echo itroImages . 'coffee.png';?>"></h3>
|
427 |
+
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
428 |
+
<input type="hidden" name="cmd" value="_s-xclick">
|
429 |
+
<input type="hidden" name="hosted_button_id" value="L2QKQKSPMY3RU">
|
430 |
+
<table style="float:right;">
|
431 |
+
<tr><td><input type="hidden" name="on0" value="Make your donation"><?php _e('Make your donation','itro-plugin') ?></td></tr><tr><td><select name="os0">
|
432 |
+
<option value="little donation"><?php _e('little donation','itro-plugin') ?> €2,00 EUR</option>
|
433 |
+
<option value="right donation"><?php _e('right donation','itro-plugin') ?> €5,00 EUR</option>
|
434 |
+
<option value="normal donation"><?php _e('normal donation','itro-plugin') ?> €10,00 EUR</option>
|
435 |
+
<option value="good donation"><?php _e('good donation','itro-plugin') ?> €20,00 EUR</option>
|
436 |
+
<option value="great donation"><?php _e('great donation','itro-plugin') ?> €50,00 EUR</option>
|
437 |
+
</select> </td></tr>
|
438 |
+
</table>
|
439 |
+
<input type="hidden" name="currency_code" value="EUR">
|
440 |
+
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
441 |
+
<img alt="" border="0" src="https://www.paypalobjects.com/it_IT/i/scr/pixel.gif" width="1" height="1">
|
442 |
+
</form>
|
443 |
+
</div>
|
444 |
+
</div>
|
445 |
+
|
446 |
+
<?php if( isset($_POST['delete_data_hidden']) && $_POST['delete_data_hidden'] == 'Y' ) { itro_update_option('delete_data',$_POST['delete_data']); } ?>
|
447 |
+
<form id="delete_data" method="post" style="clear:both;">
|
448 |
+
<br>
|
449 |
+
<hr>
|
450 |
+
<input type="hidden" name="delete_data_hidden" value="Y">
|
451 |
+
<input type="checkbox" id="delete_data" name="delete_data" value="yes" <?php if(itro_get_option('delete_data')=='yes' ){echo 'checked="checked"';} ?> />
|
452 |
+
<span><?php _e("DELETE ALL DATA ON PLUGIN UNISTALL", 'itro-plugin' ); ?></span>
|
453 |
+
<img style="vertical-align:super; cursor:help" src="<?php echo itroImages . 'question_mark.png' ; ?>"title="<?php _e('Check this box if you want to delete or maintain database tables. It is usefull if you have to try to install again the plugin, without lost your settings.','itro-plugin');?>" >
|
454 |
+
|
455 |
+
<input type="submit" name="Submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
|
456 |
+
</form>
|
457 |
+
|
458 |
+
<?php
|
459 |
+
$itro_hide_args = array(
|
460 |
+
$opt_name[24] . '_div',
|
461 |
+
$opt_name[29] . '_div',
|
462 |
+
$opt_name[17] . '_div',
|
463 |
+
$opt_name[20] . '_div',
|
464 |
+
$opt_name[27] . '_div',
|
465 |
+
$opt_name[30] . '_div',
|
466 |
+
$opt_name[31] . '_div',
|
467 |
+
$opt_name[23] . '_div',
|
468 |
+
$opt_name[6] . '_advanced_1',
|
469 |
+
$opt_name[6] . '_advanced_2',
|
470 |
+
);
|
471 |
+
echo itro_show_hide( $itro_hide_args, $opt_name[28], 'table', true, array('yellow',10000));
|
472 |
+
?>
|
css/itro-style.php
ADDED
@@ -0,0 +1,179 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Copyright 2013 I.T.RO.® (email : support.itro@live.com)
|
4 |
+
This file is part of ITRO Popup Plugin.
|
5 |
+
*/
|
6 |
+
function itro_style() { ?>
|
7 |
+
<style>
|
8 |
+
#age_button_area
|
9 |
+
{
|
10 |
+
padding-top:10px;
|
11 |
+
position: relative;
|
12 |
+
width: 100%;
|
13 |
+
bottom: 5px;
|
14 |
+
padding-top:5px;
|
15 |
+
}
|
16 |
+
|
17 |
+
#ageEnterButton
|
18 |
+
{
|
19 |
+
border-color:<?php echo itro_get_option('enter_button_border_color')?>;
|
20 |
+
background:<?php echo itro_get_option('enter_button_bg_color')?>;
|
21 |
+
color: <?php echo itro_get_option('enter_button_font_color');?>;
|
22 |
+
}
|
23 |
+
|
24 |
+
#ageLeaveButton
|
25 |
+
{
|
26 |
+
border-color:<?php echo itro_get_option('leave_button_border_color')?>;
|
27 |
+
background:<?php echo itro_get_option('leave_button_bg_color')?>;
|
28 |
+
color: <?php echo itro_get_option('leave_button_font_color');?>;
|
29 |
+
}
|
30 |
+
|
31 |
+
#popup_content
|
32 |
+
{
|
33 |
+
<?php
|
34 |
+
if( itro_get_option('select_popup_height') == 'px' || itro_get_option('select_popup_height') == '%' )
|
35 |
+
{echo 'overflow-y:auto;' ;}
|
36 |
+
else { echo 'overflow-y:hidden;' ;}
|
37 |
+
?>
|
38 |
+
overflow-x: auto;
|
39 |
+
height: 100%;
|
40 |
+
width:100%;
|
41 |
+
}
|
42 |
+
|
43 |
+
#itro_popup
|
44 |
+
{
|
45 |
+
position: <?php echo itro_get_option('popup_position');?>;
|
46 |
+
background-image: <?php if (itro_get_option('background_select') != NULL ) { echo 'url("' . itro_get_option('background_source') . '");'; } ?>
|
47 |
+
background-repeat: no-repeat;
|
48 |
+
background-position: center center;
|
49 |
+
margin: 0 auto;
|
50 |
+
left:30px;
|
51 |
+
right:30px;
|
52 |
+
z-index: 9999999;
|
53 |
+
<?php if( itro_get_option('popup_padding') != NULL ) { echo 'padding:' . itro_get_option('popup_padding') . 'px !important;'; }?>
|
54 |
+
<?php
|
55 |
+
if( itro_get_option('auto_margin_check') == NULL )
|
56 |
+
{
|
57 |
+
if (itro_get_option('popup_top_margin') != NULL )
|
58 |
+
{ echo 'top:' . itro_get_option('popup_top_margin') . 'px;' ; }
|
59 |
+
else
|
60 |
+
{echo 'top: 0px;' ;}
|
61 |
+
}
|
62 |
+
if (itro_get_option('popup_border_color') != NULL ) {echo 'border: 4px solid' . itro_get_option('popup_border_color') . ';';}?>
|
63 |
+
border-radius: <?php echo itro_get_option('popup_border_radius'); ?>px;
|
64 |
+
border-width: <?php echo itro_get_option('popup_border_width'); ?>px;
|
65 |
+
width: <?php
|
66 |
+
if( itro_get_option('select_popup_width') == 'px') { echo itro_get_option('px_popup_width') . 'px'; }
|
67 |
+
if( itro_get_option('select_popup_width') == 'perc') { echo itro_get_option('perc_popup_width') . '%'; }
|
68 |
+
?>;
|
69 |
+
height: <?php
|
70 |
+
if( itro_get_option('select_popup_height') == 'px') { echo itro_get_option('px_popup_height') . 'px'; }
|
71 |
+
if( itro_get_option('select_popup_height') == 'perc') { echo itro_get_option('perc_popup_height') . '%'; }
|
72 |
+
?>;
|
73 |
+
background-color: <?php echo itro_get_option('popup_background'); ?>;
|
74 |
+
<?php if( itro_get_option('show_countdown') != NULL ) { echo 'padding-bottom: 15px;'; } ?>
|
75 |
+
}
|
76 |
+
|
77 |
+
#close_cross
|
78 |
+
{
|
79 |
+
cursor:pointer;
|
80 |
+
width:20px;
|
81 |
+
position:absolute;
|
82 |
+
top:-22px;
|
83 |
+
right:-22px;
|
84 |
+
}
|
85 |
+
|
86 |
+
#popup_countdown
|
87 |
+
{
|
88 |
+
color: <?php echo itro_get_option('count_font_color') ?>;
|
89 |
+
width: 100%;
|
90 |
+
padding-top: <?php if( itro_get_option('show_countdown') != 'yes' ) { echo '0px'; } else {echo '1px';}?> ;
|
91 |
+
padding-bottom:<?php if( itro_get_option('show_countdown') != 'yes' ) { echo '0px'; } else {echo '1px';}?> ;
|
92 |
+
background-color: <?php echo itro_get_option('popup_border_color');?>;
|
93 |
+
height: <?php if( itro_get_option('show_countdown') != 'yes' ) { echo '0px'; }?> ;
|
94 |
+
overflow: hidden;
|
95 |
+
position:absolute;
|
96 |
+
bottom:0px;
|
97 |
+
left:0px;
|
98 |
+
border-bottom-left:<?php echo itro_get_option('popup_border_radius'); ?>px;
|
99 |
+
border-bottom-right:<?php echo itro_get_option('popup_border_radius'); ?>px;
|
100 |
+
}
|
101 |
+
|
102 |
+
#itro_opaco{
|
103 |
+
opacity:0.6;
|
104 |
+
position:fixed;
|
105 |
+
background-color: <?php echo itro_get_option('opaco_bg_color'); ?>;
|
106 |
+
font-size: 10px;
|
107 |
+
font-family: Verdana;
|
108 |
+
top: 100px;
|
109 |
+
width: 100%;
|
110 |
+
height: 100%;
|
111 |
+
z-index: 999999;
|
112 |
+
left: 0px ;
|
113 |
+
right: 0px;
|
114 |
+
top: 0px;
|
115 |
+
bottom: 0px;
|
116 |
+
<?php if( itro_get_option('popup_delay') != 0 ) { echo 'visibility:hidden;'; } ?>
|
117 |
+
opacity: <?php echo itro_get_option('popup_bg_opacity'); ?> ;
|
118 |
+
filter:alpha(opacity = <?php echo ( itro_get_option('popup_bg_opacity') * 100); ?>); /* For IE8 and earlier */
|
119 |
+
}
|
120 |
+
</style>
|
121 |
+
<?php
|
122 |
+
}
|
123 |
+
|
124 |
+
function itro_admin_style ()
|
125 |
+
{ ?>
|
126 |
+
<style>
|
127 |
+
.wpstyle
|
128 |
+
{
|
129 |
+
background: linear-gradient(to top, rgb(236, 236, 236), rgb(249, 249, 249)) repeat scroll 0% 0% rgb(241, 241, 241);
|
130 |
+
padding: 7px 10px;
|
131 |
+
font-family: Georgia,"Times New Roman","Bitstream Charter",Times,serif;
|
132 |
+
border-radius: 3px 3px 3px 3px;
|
133 |
+
color: rgb(70, 70, 70);
|
134 |
+
border-bottom-color: rgb(223, 223, 223);
|
135 |
+
text-shadow: 0px 1px 0px rgb(255, 255, 255);
|
136 |
+
box-shadow: 0px 1px 0px rgb(255, 255, 255);
|
137 |
+
border-bottom-width: 1px;
|
138 |
+
border-bottom-style: solid;
|
139 |
+
-moz-user-select: none;
|
140 |
+
cursor: pointer;
|
141 |
+
}
|
142 |
+
|
143 |
+
#wp-custom_html-editor-container #custom_html_ifr
|
144 |
+
{
|
145 |
+
width: 450px !important;
|
146 |
+
}
|
147 |
+
|
148 |
+
#leftColumn
|
149 |
+
{
|
150 |
+
float:left;
|
151 |
+
width:450px;
|
152 |
+
}
|
153 |
+
|
154 |
+
#rightColumn
|
155 |
+
{
|
156 |
+
float:right;
|
157 |
+
margin-right:10%;
|
158 |
+
width:450px;
|
159 |
+
}
|
160 |
+
|
161 |
+
#rightColumn2
|
162 |
+
{
|
163 |
+
clear:right;
|
164 |
+
float:right;
|
165 |
+
margin-right:10%;
|
166 |
+
width:450px;
|
167 |
+
}
|
168 |
+
|
169 |
+
#customHtmlForm
|
170 |
+
{
|
171 |
+
overflow: show;
|
172 |
+
}
|
173 |
+
|
174 |
+
#donateForm
|
175 |
+
{
|
176 |
+
}
|
177 |
+
</style>
|
178 |
+
<?php
|
179 |
+
} ?>
|
functions/core-function.php
ADDED
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Copyright 2013 I.T.RO.® (email : support.itro@live.com)
|
4 |
+
This file is part of ITRO Popup Plugin.
|
5 |
+
*/
|
6 |
+
|
7 |
+
|
8 |
+
//------------------ADD MENU PAGE
|
9 |
+
function itro_plugin_menu() {
|
10 |
+
add_options_page( 'Popup Plugin Options', 'ITRO Popup', 'manage_options', 'itro-popup/admin/popup-admin.php', '' );
|
11 |
+
}
|
12 |
+
|
13 |
+
//-------------- INITIALIZATION
|
14 |
+
|
15 |
+
function itro_init()
|
16 |
+
{
|
17 |
+
//--------- initialize database
|
18 |
+
itro_db_init();
|
19 |
+
|
20 |
+
//-----load sample popup settings
|
21 |
+
if( get_option("itro_curr_ver") == NULL )
|
22 |
+
{
|
23 |
+
itro_update_option('popup_time',20);
|
24 |
+
itro_update_option('cookie_time_exp',0);
|
25 |
+
itro_update_option('popup_background','#FFFFFF');
|
26 |
+
itro_update_option('popup_border_color','#F7FF00');
|
27 |
+
itro_update_option('px_popup_width',300);
|
28 |
+
itro_update_option('px_popup_height',0);
|
29 |
+
itro_update_option('show_countdown','yes');
|
30 |
+
itro_update_option('auto_margin_check','yes');
|
31 |
+
itro_update_option('select_popup_width','px');
|
32 |
+
itro_update_option('select_popup_height','auto');
|
33 |
+
itro_update_option('popup_bg_opacity',0.4);
|
34 |
+
itro_update_option('opaco_bg_color','#8A8A8A');
|
35 |
+
itro_update_option('popup_position','fixed');
|
36 |
+
itro_update_option('popup_border_width',3);
|
37 |
+
itro_update_option('popup_border_radius',8);
|
38 |
+
itro_update_option('popup_padding',2);
|
39 |
+
|
40 |
+
switch(WPLANG)
|
41 |
+
{
|
42 |
+
case 'en_US':
|
43 |
+
$welcome_text = '<h1 style="text-align: center;"><span style="color: #000000; font-size: 200%;">Hello, this is a pop-up sample.</span></h1><h1 style="text-align: center;"><span style="color: #000000; font-size: 20;">By default you see only the basic settings.</span></h1><h1 style="text-align: center;"><span style="color: #000000; font-size: 20;">Write watever you want in the Custom text editor and enjoy our plugin!</span></h1><p> </p>';
|
44 |
+
break;
|
45 |
+
case 'it_IT':
|
46 |
+
$welcome_text = '<p style="text-align: center;"><span style="color: #000000; font-size: 200%;">Salve, questo è un esempio di popup.</span></p><p style="text-align: center;"> </p><p style="text-align: center;"><span style="color: #000000; font-size: 20;">Come impostazione predefinita sono visibili solo le opzioni base.</span></p><p style="text-align: center;"> </p><p style="text-align: center;"><span style="color: #000000; font-size: 20;">Scrivi qualunque cosa vuoi nell'editor di testo di wordpress e buon lavoro!</span></p><p style="text-align: center;"> </p>';
|
47 |
+
break;
|
48 |
+
default:
|
49 |
+
$welcome_text = '<h1 style="text-align: center;"><span style="color: #000000; font-size: 200%;">Hello, this is a pop-up sample.</span></h1><h1 style="text-align: center;"><span style="color: #000000; font-size: 20;">By default you see only the basic settings.</span></h1><h1 style="text-align: center;"><span style="color: #000000; font-size: 20;">Write watever you want in the Custom text editor and enjoy our plugin!</span></h1><p> </p>';
|
50 |
+
}
|
51 |
+
itro_update_field('custom_html',$welcome_text);
|
52 |
+
|
53 |
+
itro_update_option('sample_popup','done');
|
54 |
+
}
|
55 |
+
|
56 |
+
//-------- check version
|
57 |
+
if( $GLOBALS['ITRO_VER'] != get_option('itro_curr_ver') )
|
58 |
+
{
|
59 |
+
$ver = get_option('itro_curr_ver');
|
60 |
+
update_option('itro_prev_ver',$ver);
|
61 |
+
update_option('itro_curr_ver', $GLOBALS['ITRO_VER']);
|
62 |
+
}
|
63 |
+
|
64 |
+
|
65 |
+
if ( get_option('itro_prev_ver') <= 3.68 && itro_get_option('version_flag') == false )
|
66 |
+
{
|
67 |
+
itro_update_option('popup_border_width',3);
|
68 |
+
itro_update_option('popup_border_radius',8);
|
69 |
+
itro_update_option('version_flag', 'true');
|
70 |
+
}
|
71 |
+
|
72 |
+
//---------------create preview page
|
73 |
+
switch(WPLANG)
|
74 |
+
{
|
75 |
+
case 'en_US':
|
76 |
+
$preview_text = 'ITRO - Preview page. This page is used to rightly display preview of your popup with site theme.';
|
77 |
+
break;
|
78 |
+
case 'it_IT':
|
79 |
+
$preview_text = 'ITRO - Pagina di anteprima. Questa pagina è utilizzata per visualizzare correttamente il popup, integrato con lo stile del tema.';
|
80 |
+
break;
|
81 |
+
default:
|
82 |
+
$preview_text = 'ITRO - Preview page. This page is used to rightly display preview of your popup with site theme.';
|
83 |
+
}
|
84 |
+
if ( itro_get_option('preview_id') == NULL )
|
85 |
+
{
|
86 |
+
// Create post object
|
87 |
+
$preview_post = array(
|
88 |
+
'post_title' => 'ITRO - Preview',
|
89 |
+
'post_name' => 'itro-preview',
|
90 |
+
'post_content' => $preview_text,
|
91 |
+
'post_status' => 'private',
|
92 |
+
'post_author' => 1,
|
93 |
+
'post_type' => 'page',
|
94 |
+
);
|
95 |
+
// Insert the post into the database
|
96 |
+
$preview_id = wp_insert_post( $preview_post );
|
97 |
+
itro_update_option('preview_id',$preview_id);
|
98 |
+
}
|
99 |
+
}
|
100 |
+
|
101 |
+
//--------------------------DISPLAY THE POPUP
|
102 |
+
function itro_display_popup()
|
103 |
+
{
|
104 |
+
//this condition, control if the popup must or not by displayed in a specified page
|
105 |
+
$selected_page_id = json_decode(itro_get_option('selected_page_id'));
|
106 |
+
$id_match = NULL;
|
107 |
+
if( isset($selected_page_id) )
|
108 |
+
{
|
109 |
+
foreach ($selected_page_id as $single_id)
|
110 |
+
{if ($single_id==get_the_id()) $id_match++; }
|
111 |
+
}
|
112 |
+
if ( (is_front_page() && itro_get_option('blog_home') == 'yes') || (is_home() && itro_get_option('blog_home') == 'yes') || itro_get_option('preview_id') == get_the_id() ) { $id_match++; }
|
113 |
+
if( ( itro_get_option('page_selection')!='any' && !isset($_COOKIE['popup_cookie']) ) || itro_get_option('preview_id') == get_the_id())
|
114 |
+
if( ($id_match != NULL) || (itro_get_option('page_selection')=='all') )
|
115 |
+
{
|
116 |
+
itro_style();
|
117 |
+
itro_popup_template();
|
118 |
+
itro_popup_js();
|
119 |
+
}
|
120 |
+
}
|
121 |
+
|
122 |
+
//------------------------- SELECT PAGES FUNCTIONS
|
123 |
+
function itro_check_selected_id($id_to_check)
|
124 |
+
{
|
125 |
+
if(itro_get_option('selected_page_id') != NULL)
|
126 |
+
{
|
127 |
+
$selected_page_id = json_decode(itro_get_option('selected_page_id'));
|
128 |
+
$id_match = NULL;
|
129 |
+
if( isset($selected_page_id) )
|
130 |
+
{
|
131 |
+
foreach ($selected_page_id as $single_id)
|
132 |
+
{if ($single_id == $id_to_check) return (true); }
|
133 |
+
}
|
134 |
+
}
|
135 |
+
}
|
136 |
+
|
137 |
+
function itro_list_pages()
|
138 |
+
{?>
|
139 |
+
<select name="selected_page_id[]" multiple>
|
140 |
+
<?php
|
141 |
+
$pages = get_pages();
|
142 |
+
foreach ( $pages as $page )
|
143 |
+
{
|
144 |
+
$option = '<option value="'. $page->ID .'"';
|
145 |
+
if(itro_check_selected_id($page->ID)){$option .='selected="select"';}
|
146 |
+
$option .= 'onmouseover="itro_check_state(this)" onmouseup="itro_select(this);">';
|
147 |
+
$option .= $page->post_title;
|
148 |
+
$option .= '</option>';
|
149 |
+
echo $option;
|
150 |
+
}
|
151 |
+
?>
|
152 |
+
</select>
|
153 |
+
<?php
|
154 |
+
}
|
155 |
+
|
156 |
+
//---------------REVERSE WPAUTOP
|
157 |
+
function reverse_wpautop($s)
|
158 |
+
{
|
159 |
+
//remove any new lines already in there
|
160 |
+
$s = str_replace("\n", "", $s);
|
161 |
+
|
162 |
+
//remove all <p>
|
163 |
+
$s = str_replace("<p>", "", $s);
|
164 |
+
|
165 |
+
//replace <br /> with \n
|
166 |
+
$s = str_replace(array("<br />", "<br>", "<br/>"), "\n", $s);
|
167 |
+
|
168 |
+
//replace </p> with \n\n
|
169 |
+
$s = str_replace("</p>", "\n\n", $s);
|
170 |
+
|
171 |
+
return $s;
|
172 |
+
}?>
|
functions/database-function.php
ADDED
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Copyright 2013 I.T.RO.® (email : support.itro@live.com)
|
4 |
+
This file is part of ITRO Popup Plugin.
|
5 |
+
*/
|
6 |
+
|
7 |
+
//-------Create plugin tables
|
8 |
+
function itro_db_init()
|
9 |
+
{
|
10 |
+
$con = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);
|
11 |
+
|
12 |
+
//------------------Option table
|
13 |
+
//$option_table_name = $wpdb->prefix . "itro_plugin_option";
|
14 |
+
$sql = "CREATE TABLE IF NOT EXISTS wp_itro_plugin_option
|
15 |
+
(
|
16 |
+
option_name varchar(255),
|
17 |
+
PRIMARY KEY(option_name),
|
18 |
+
option_val varchar(255)
|
19 |
+
)";
|
20 |
+
mysqli_query($con, $sql);
|
21 |
+
|
22 |
+
//--------------Custom field table
|
23 |
+
//$field_table_name = $wpdb->prefix . "itro_plugin_field";
|
24 |
+
$sql = "CREATE TABLE IF NOT EXISTS wp_itro_plugin_field
|
25 |
+
(
|
26 |
+
field_name varchar(50),
|
27 |
+
PRIMARY KEY(field_name),
|
28 |
+
field_value TEXT
|
29 |
+
)";
|
30 |
+
mysqli_query($con, $sql);
|
31 |
+
|
32 |
+
update_option('itro_db_init','true');
|
33 |
+
}
|
34 |
+
|
35 |
+
//------------------ PLUGIN OPTION DB MANAGEMENT --------------
|
36 |
+
function itro_update_option($opt_name,$opt_value)
|
37 |
+
{
|
38 |
+
$con = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);
|
39 |
+
$sql = "DELETE FROM wp_itro_plugin_option WHERE option_name='$opt_name'";
|
40 |
+
mysqli_query($con, $sql);
|
41 |
+
$sql = "INSERT INTO wp_itro_plugin_option (option_name, option_val) VALUES ('$opt_name', '$opt_value')";
|
42 |
+
mysqli_query($con, $sql);
|
43 |
+
}
|
44 |
+
|
45 |
+
function itro_get_option($opt_name)
|
46 |
+
{
|
47 |
+
$con = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);
|
48 |
+
$sql = "SELECT * FROM wp_itro_plugin_option WHERE option_name='$opt_name'";
|
49 |
+
$result = mysqli_query($con, $sql);
|
50 |
+
if($result)
|
51 |
+
{
|
52 |
+
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
|
53 |
+
return ($row['option_val']);
|
54 |
+
}
|
55 |
+
else return(NULL);
|
56 |
+
}
|
57 |
+
|
58 |
+
//------------------ CUSTOM FIELD CONTENT DB MANAGEMENT --------------
|
59 |
+
function itro_update_field($field_name,$field_value)
|
60 |
+
{
|
61 |
+
$con = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);
|
62 |
+
$sql = "DELETE FROM wp_itro_plugin_field WHERE field_name='$field_name'";
|
63 |
+
mysqli_query($con, $sql);
|
64 |
+
$sql = "INSERT INTO wp_itro_plugin_field (field_name, field_value) VALUES ('$field_name', '$field_value')";
|
65 |
+
mysqli_query($con, $sql);
|
66 |
+
}
|
67 |
+
|
68 |
+
function itro_get_field($field_name)
|
69 |
+
{
|
70 |
+
$con = mysqli_connect(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);
|
71 |
+
$sql = "SELECT * FROM wp_itro_plugin_field WHERE field_name='$field_name'";
|
72 |
+
$result = mysqli_query($con, $sql);
|
73 |
+
if($result)
|
74 |
+
{
|
75 |
+
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
|
76 |
+
return ($row['field_value']);
|
77 |
+
}
|
78 |
+
else return(NULL);
|
79 |
+
}
|
80 |
+
?>
|
functions/js-function.php
ADDED
@@ -0,0 +1,426 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Copyright 2013 I.T.RO.® (email : support.itro@live.com)
|
4 |
+
This file is part of ITRO Popup Plugin.
|
5 |
+
*/
|
6 |
+
|
7 |
+
//------------ LOAD SCRIPTS FOR POPUP VISUALIZATION
|
8 |
+
function itro_popup_js()
|
9 |
+
{ ?>
|
10 |
+
<script type="text/javascript"> <?php
|
11 |
+
if (itro_get_option('age_restriction') == NULL) //OFF age validation
|
12 |
+
{
|
13 |
+
if ( itro_get_option('preview_id') != get_the_id() )
|
14 |
+
{ ?>
|
15 |
+
itro_set_cookie("popup_cookie","one_time_popup",<?php echo itro_get_option('cookie_time_exp'); ?>); <?php
|
16 |
+
}
|
17 |
+
|
18 |
+
if( itro_get_option('popup_unlockable') != 'yes' )
|
19 |
+
{ ?>
|
20 |
+
document.onkeydown = function(event)
|
21 |
+
{
|
22 |
+
event = event || window.event;
|
23 |
+
var key = event.keyCode;
|
24 |
+
if(key==27)
|
25 |
+
{
|
26 |
+
jQuery("#itro_popup").fadeOut(function() {itro_opaco.style.visibility='Hidden';});
|
27 |
+
}
|
28 |
+
}; <?php
|
29 |
+
}
|
30 |
+
|
31 |
+
if( itro_get_option('popup_delay') != 0 ) //if is set the delay
|
32 |
+
{ ?>
|
33 |
+
var delay = <?php echo itro_get_option('popup_delay') . '+' . '1'; ?> ;
|
34 |
+
interval_id = setInterval(function(){popup_delay();},1000);
|
35 |
+
function popup_delay()
|
36 |
+
{
|
37 |
+
delay--;
|
38 |
+
if(delay <= 0)
|
39 |
+
{
|
40 |
+
clearInterval(interval_id);
|
41 |
+
jQuery("#itro_popup").fadeOut(1);
|
42 |
+
jQuery("#itro_opaco").fadeOut(1);
|
43 |
+
itro_popup.style.visibility = 'visible';
|
44 |
+
itro_opaco.style.visibility = 'visible';
|
45 |
+
jQuery("#itro_opaco").fadeIn(function() {jQuery("#itro_popup").fadeIn();});
|
46 |
+
}
|
47 |
+
}
|
48 |
+
<?php
|
49 |
+
}
|
50 |
+
else //if popup delay is not setted
|
51 |
+
{?>
|
52 |
+
jQuery("#itro_popup").fadeOut(1);
|
53 |
+
jQuery("#itro_opaco").fadeOut(1);
|
54 |
+
itro_popup.style.visibility = 'visible';
|
55 |
+
itro_opaco.style.visibility = 'visible';
|
56 |
+
jQuery("#itro_opaco").fadeIn(function() {jQuery("#itro_popup").fadeIn();});
|
57 |
+
<?php
|
58 |
+
}
|
59 |
+
|
60 |
+
//start the timer only if popup seconds are != 0 to avoid js errors
|
61 |
+
if ( itro_get_option('popup_time') != 0 )
|
62 |
+
{ ?>
|
63 |
+
var popTime=<?php
|
64 |
+
if( itro_get_option('popup_delay') != 0 ) { echo itro_get_option('popup_time') . '+' . itro_get_option('popup_delay'); }
|
65 |
+
else { echo itro_get_option('popup_time'); }
|
66 |
+
?>;
|
67 |
+
setInterval(function(){popTimer()},1000); //the countdown
|
68 |
+
function popTimer()
|
69 |
+
{
|
70 |
+
if (popTime>0){
|
71 |
+
document.getElementById("timer").innerHTML=popTime;
|
72 |
+
popTime--;
|
73 |
+
}
|
74 |
+
else {itro_popup.style.visibility='Hidden'; itro_opaco.style.visibility='Hidden';
|
75 |
+
}
|
76 |
+
} <?php
|
77 |
+
}
|
78 |
+
}
|
79 |
+
//if age restriction is enabled
|
80 |
+
else
|
81 |
+
{
|
82 |
+
if( itro_get_option('popup_delay') != 0 )
|
83 |
+
{ ?>
|
84 |
+
var delay = <?php echo itro_get_option('popup_delay') . '+' . '1'; ?> ;
|
85 |
+
interval_id = setInterval(function(){popup_delay();},1000);
|
86 |
+
function popup_delay()
|
87 |
+
{
|
88 |
+
delay--;
|
89 |
+
if(delay <= 0)
|
90 |
+
{
|
91 |
+
clearInterval(interval_id);
|
92 |
+
jQuery("#itro_popup").fadeOut(1);
|
93 |
+
jQuery("#itro_opaco").fadeOut(1);
|
94 |
+
itro_popup.style.visibility = 'visible';
|
95 |
+
itro_opaco.style.visibility = 'visible';
|
96 |
+
jQuery("#itro_opaco").fadeIn(function() {jQuery("#itro_popup").fadeIn();});
|
97 |
+
}
|
98 |
+
}
|
99 |
+
<?php
|
100 |
+
}
|
101 |
+
else
|
102 |
+
{?>
|
103 |
+
jQuery("#itro_popup").fadeOut(1);
|
104 |
+
jQuery("#itro_opaco").fadeOut(1);
|
105 |
+
itro_popup.style.visibility = 'visible';
|
106 |
+
itro_opaco.style.visibility = 'visible';
|
107 |
+
jQuery("#itro_opaco").fadeIn(function() {jQuery("#itro_popup").fadeIn();});
|
108 |
+
<?php
|
109 |
+
}
|
110 |
+
}?>
|
111 |
+
|
112 |
+
function itro_set_cookie(c_name,value,exhours)
|
113 |
+
{
|
114 |
+
var exdate=new Date();
|
115 |
+
exdate.setTime(exdate.getTime() + (exhours * 3600 * 1000));
|
116 |
+
var c_value=escape(value) + ((exhours==null) ? "" : "; expires="+exdate.toUTCString());
|
117 |
+
document.cookie=c_name + "=" + c_value + "; path=/";
|
118 |
+
}
|
119 |
+
<?php
|
120 |
+
//------- AUTOMATIC TOP MARGIN
|
121 |
+
if( itro_get_option('auto_margin_check') != NULL )
|
122 |
+
{?>
|
123 |
+
var browserWidth = 0, browserHeight = 0;
|
124 |
+
|
125 |
+
setInterval(function(){marginRefresh()},100); //refresh every 0.1 second the popup top margin (needed for browser window resizeing)
|
126 |
+
function marginRefresh()
|
127 |
+
{
|
128 |
+
if( typeof( window.innerWidth ) == 'number' )
|
129 |
+
{
|
130 |
+
//Non-IE
|
131 |
+
browserWidth = window.innerWidth;
|
132 |
+
browserHeight = window.innerHeight;
|
133 |
+
} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
|
134 |
+
{
|
135 |
+
//IE 6+ in 'standards compliant mode'
|
136 |
+
browserWidth = document.documentElement.clientWidth;
|
137 |
+
browserHeight = document.documentElement.clientHeight;
|
138 |
+
} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
|
139 |
+
{
|
140 |
+
//IE 4 compatible
|
141 |
+
browserWidth = document.body.clientWidth;
|
142 |
+
browserHeight = document.body.clientHeight;
|
143 |
+
}
|
144 |
+
popupHeight = document.getElementById('itro_popup').offsetHeight ; //get the actual px size of popup div
|
145 |
+
document.getElementById('itro_popup').style.top = (browserHeight - popupHeight)/2 + "px"; //update the top margin of popup
|
146 |
+
}<?php
|
147 |
+
}?>
|
148 |
+
</script>
|
149 |
+
<?php
|
150 |
+
}
|
151 |
+
|
152 |
+
//------------- LOAD SCRIPT TO SHOW SLIDEBAR
|
153 |
+
function itro_slidebar($slider_target_id,$slider_value,$slider_min,$slider_max,$slider_step,$slider_tofixed,$multi_slider)
|
154 |
+
{
|
155 |
+
if($multi_slider != NULL)
|
156 |
+
{
|
157 |
+
if( itro_get_option('select_' . $slider_target_id) != $multi_slider ) //esempio select_popup_width = 'px' o 'perc'
|
158 |
+
{
|
159 |
+
$slider_display = 'display:none;';
|
160 |
+
//$js_input_display = 'document.getElementById("'. $slider_target_id .'").style.display = "none";' ;
|
161 |
+
}
|
162 |
+
else
|
163 |
+
{
|
164 |
+
$slider_display = '';
|
165 |
+
}
|
166 |
+
$target_opt_name = $slider_target_id;
|
167 |
+
$slider_container_id = $slider_target_id . '_slider_container';
|
168 |
+
|
169 |
+
$js_slider_container_id = $multi_slider . '_' . $slider_target_id . '_slider_container';
|
170 |
+
$js_slider_id = $multi_slider . '_' . $slider_target_id . '_slider';
|
171 |
+
$slider_target_id = $multi_slider . '_' . $slider_target_id;
|
172 |
+
}
|
173 |
+
else
|
174 |
+
{
|
175 |
+
$js_slider_container_id = $slider_target_id . '_slider_container';
|
176 |
+
$js_slider_id = $slider_target_id . '_slider';
|
177 |
+
$slider_display = '';
|
178 |
+
}
|
179 |
+
?>
|
180 |
+
|
181 |
+
<div id="<?php echo $js_slider_container_id; ?>" style="<?php echo $slider_display; ?>position: relative; float:right; top:12px; left:25px; width:150px; height:2px; background-color:black; border-radius:15px;">
|
182 |
+
<div id="<?php echo $js_slider_id; ?>" style="left:<?php echo ( (itro_get_option($slider_target_id)/$slider_max)*150 ); ?>px; border-radius:15px; position: relative; top:-5px; cursor:pointer; width:15px; height:12px; background-color:gray;"></div>
|
183 |
+
</div>
|
184 |
+
<script type="text/javascript">
|
185 |
+
document.getElementById("<?php echo $js_slider_container_id; ?>").addEventListener("mousedown", <?php echo $slider_target_id; ?>_start_slider,false);
|
186 |
+
document.addEventListener("mousemove", itro_pos,false);
|
187 |
+
|
188 |
+
function <?php echo $slider_target_id ?>_start_slider()
|
189 |
+
{
|
190 |
+
document.addEventListener("mousemove",<?php echo $slider_target_id ?>_move_slider);
|
191 |
+
document.addEventListener("mouseup",<?php echo $slider_target_id ?>_stop_slider)
|
192 |
+
if( (x_pos - document.getElementById("<?php echo $js_slider_container_id; ?>").getBoundingClientRect().left) >= 0 && (x_pos - document.getElementById("<?php echo $js_slider_container_id; ?>").getBoundingClientRect().left) <= parseInt(document.getElementById("<?php echo $js_slider_container_id; ?>").style.width))
|
193 |
+
{
|
194 |
+
document.getElementById("<?php echo $js_slider_id;?>").style.left = x_pos - document.getElementById("<?php echo $js_slider_container_id; ?>").getBoundingClientRect().left - 7 + "px";
|
195 |
+
document.getElementById("<?php echo $slider_target_id; ?>").value = (Math.round( ( (x_pos - document.getElementById("<?php echo $js_slider_container_id; ?>").getBoundingClientRect().left)/150*<?php echo $slider_max; ?> )/<?php echo $slider_step; ?> )*<?php echo $slider_step; ?>).toFixed(<?php echo $slider_tofixed; ?>);
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
function <?php echo $slider_target_id ?>_move_slider()
|
200 |
+
{
|
201 |
+
if( (x_pos - document.getElementById("<?php echo $js_slider_container_id; ?>").getBoundingClientRect().left) >= 0 && (x_pos - document.getElementById("<?php echo $js_slider_container_id; ?>").getBoundingClientRect().left) <= parseInt(document.getElementById("<?php echo $js_slider_container_id; ?>").style.width) )
|
202 |
+
{
|
203 |
+
document.getElementById("<?php echo $js_slider_id;?>").style.left = x_pos - document.getElementById("<?php echo $js_slider_container_id; ?>").getBoundingClientRect().left - 7 + "px";
|
204 |
+
document.getElementById("<?php echo $slider_target_id; ?>").value = (Math.round( ( (x_pos - document.getElementById("<?php echo $js_slider_container_id; ?>").getBoundingClientRect().left)/150*<?php echo $slider_max; ?> )/<?php echo $slider_step; ?> )*<?php echo $slider_step; ?>).toFixed(<?php echo $slider_tofixed; ?>);
|
205 |
+
}
|
206 |
+
if(x_pos - document.getElementById("<?php echo $js_slider_container_id; ?>").getBoundingClientRect().left < 0)
|
207 |
+
{
|
208 |
+
document.getElementById("<?php echo $js_slider_id;?>").style.left = -7 + "px";
|
209 |
+
<?php echo $slider_target_id; ?>_temp1 = 0;
|
210 |
+
document.getElementById("<?php echo $slider_target_id; ?>").value = <?php echo $slider_target_id; ?>_temp1.toFixed(<?php echo $slider_tofixed; ?>);
|
211 |
+
}
|
212 |
+
if(x_pos - document.getElementById("<?php echo $js_slider_container_id; ?>").getBoundingClientRect().left > parseInt(document.getElementById("<?php echo $js_slider_container_id; ?>").style.width))
|
213 |
+
{
|
214 |
+
document.getElementById("<?php echo $js_slider_id;?>").style.left = parseInt(document.getElementById("<?php echo $js_slider_container_id; ?>").style.width) - 7 + "px";
|
215 |
+
<?php echo $slider_target_id; ?>_temp2 = <?php echo $slider_max; ?>;
|
216 |
+
document.getElementById("<?php echo $slider_target_id; ?>").value = <?php echo $slider_target_id; ?>_temp2.toFixed(<?php echo $slider_tofixed; ?>);
|
217 |
+
}
|
218 |
+
}
|
219 |
+
|
220 |
+
function <?php echo $slider_target_id ?>_stop_slider()
|
221 |
+
{
|
222 |
+
document.removeEventListener("mousemove",<?php echo $slider_target_id ?>_move_slider)
|
223 |
+
|
224 |
+
}
|
225 |
+
|
226 |
+
<?php
|
227 |
+
if($multi_slider != NULL)
|
228 |
+
{
|
229 |
+
$slider_target_id = $target_opt_name; ?>
|
230 |
+
|
231 |
+
//---function disable
|
232 |
+
function itro_disable_<?php echo $slider_target_id; ?>()
|
233 |
+
{
|
234 |
+
document.getElementById("px_<?php echo $slider_target_id; ?>").style.display = "none";
|
235 |
+
document.getElementById("perc_<?php echo $slider_target_id; ?>").style.display = "none";
|
236 |
+
document.getElementById("px_<?php echo $slider_container_id; ?>").style.display = "none";
|
237 |
+
document.getElementById("perc_<?php echo $slider_container_id; ?>").style.display = "none";
|
238 |
+
}
|
239 |
+
|
240 |
+
//---function enable
|
241 |
+
function itro_enable_<?php echo $slider_target_id; ?>(dim_type)
|
242 |
+
{
|
243 |
+
if(dim_type == 'perc')
|
244 |
+
{
|
245 |
+
document.getElementById("perc_<?php echo $slider_container_id; ?>").style.display = "block";
|
246 |
+
document.getElementById("perc_<?php echo $slider_target_id; ?>").style.display = "inline";
|
247 |
+
document.getElementById("px_<?php echo $slider_target_id; ?>").style.display = "none";
|
248 |
+
document.getElementById("px_<?php echo $slider_container_id; ?>").style.display = "none";
|
249 |
+
}
|
250 |
+
if(dim_type == 'px')
|
251 |
+
{
|
252 |
+
document.getElementById("px_<?php echo $slider_container_id; ?>").style.display = "block";
|
253 |
+
document.getElementById("px_<?php echo $slider_target_id; ?>").style.display = "inline";
|
254 |
+
document.getElementById("perc_<?php echo $slider_target_id; ?>").style.display = "none";
|
255 |
+
document.getElementById("perc_<?php echo $slider_container_id; ?>").style.display = "none";
|
256 |
+
}
|
257 |
+
} <?php
|
258 |
+
} ?>
|
259 |
+
</script><?php
|
260 |
+
}
|
261 |
+
|
262 |
+
//-------------- LOAD SCRIPTS FOR ADMIN PANNEL
|
263 |
+
function itro_admin_js()
|
264 |
+
{ ?>
|
265 |
+
<script type="text/javascript">
|
266 |
+
function itro_pos(e)
|
267 |
+
{
|
268 |
+
e = e || window.event;
|
269 |
+
x_pos = e.clientX;
|
270 |
+
}
|
271 |
+
|
272 |
+
function itro_mutual_check(checkbox_id_1,checkbox_id_2,box)
|
273 |
+
{
|
274 |
+
if (!box)
|
275 |
+
{
|
276 |
+
if( checkbox_id_2 == '' ) {document.getElementById(checkbox_id_1).checked = !document.getElementById(checkbox_id_1).checked; return 1;}
|
277 |
+
if( checkbox_id_1 == '' ) {return 0;}
|
278 |
+
if(checkbox_id_1 == checkbox_id_2) { return 0; }
|
279 |
+
document.getElementById(checkbox_id_1).checked = !document.getElementById(checkbox_id_1).checked;
|
280 |
+
if( document.getElementById(checkbox_id_1).checked || document.getElementById(checkbox_id_2).checked )
|
281 |
+
{ document.getElementById(checkbox_id_2).checked = !document.getElementById(checkbox_id_1).checked; }
|
282 |
+
}
|
283 |
+
else
|
284 |
+
{
|
285 |
+
if( document.getElementById(checkbox_id_1).checked || document.getElementById(checkbox_id_2).checked )
|
286 |
+
{ document.getElementById(checkbox_id_2).checked = !document.getElementById(checkbox_id_1).checked; }
|
287 |
+
}
|
288 |
+
}
|
289 |
+
jQuery(document).ready(function() {
|
290 |
+
|
291 |
+
var orig_send_to_editor = window.send_to_editor;
|
292 |
+
var uploadID = ''; /*setup the var in a global scope*/
|
293 |
+
|
294 |
+
jQuery('#upload_button').click(function() {
|
295 |
+
uploadID = jQuery(this).prev('input'); /*set the uploadID variable to the value of the input before the upload button*/
|
296 |
+
formfield = jQuery('.upload').attr('name');
|
297 |
+
tb_show('', 'media-upload.php?type=image&amp;amp;TB_iframe=true');
|
298 |
+
|
299 |
+
//restore send_to_editor() when tb closed
|
300 |
+
jQuery("#TB_window").bind('tb_unload', function () {
|
301 |
+
window.send_to_editor = orig_send_to_editor;
|
302 |
+
});
|
303 |
+
|
304 |
+
//temporarily redefine send_to_editor()
|
305 |
+
window.send_to_editor = function(html) {
|
306 |
+
imgurl = jQuery('img',html).attr('src');
|
307 |
+
uploadID.val(imgurl); /*assign the value of the image src to the input*/
|
308 |
+
document.getElementById('yes_bg').checked=true
|
309 |
+
tb_remove();
|
310 |
+
};
|
311 |
+
return false;
|
312 |
+
});
|
313 |
+
});
|
314 |
+
|
315 |
+
var itro_option_state;
|
316 |
+
function itro_check_state(state_check_id)
|
317 |
+
{
|
318 |
+
itro_option_state = state_check_id.selected;
|
319 |
+
}
|
320 |
+
|
321 |
+
function itro_select(target_id)
|
322 |
+
{
|
323 |
+
target_id.selected = !itro_option_state;
|
324 |
+
itro_option_state = !itro_option_state;
|
325 |
+
}
|
326 |
+
|
327 |
+
function itro_set_cookie(c_name,value,exhours)
|
328 |
+
{
|
329 |
+
var exdate=new Date();
|
330 |
+
exdate.setTime(exdate.getTime() + (exhours * 3600 * 1000));
|
331 |
+
var c_value=escape(value) + ((exhours==null) ? "" : "; expires="+exdate.toUTCString());
|
332 |
+
document.cookie=c_name + "=" + c_value + "; path=/";
|
333 |
+
}
|
334 |
+
</script><?php
|
335 |
+
}
|
336 |
+
|
337 |
+
//show and hide parts of admin pannel such as top margin and basic settings
|
338 |
+
function itro_show_hide($hide_target_id, $hide_shooter_id, $display_val, $inverted, $highlight_opt)
|
339 |
+
{?>
|
340 |
+
<script type="text/javascript">
|
341 |
+
|
342 |
+
<?php
|
343 |
+
if ($inverted == 'false') //decide if elements start hidden or visible: if inverted==true -> if $hide_shooter_id is checked -> start visible else start hidden
|
344 |
+
{ $check_condition = 'yes'; }
|
345 |
+
else
|
346 |
+
{ $check_condition = NULL; }
|
347 |
+
|
348 |
+
if( itro_get_option($hide_shooter_id) == $check_condition)
|
349 |
+
{
|
350 |
+
foreach($hide_target_id as $single_targer_id)
|
351 |
+
{
|
352 |
+
echo 'document.getElementById("' . $single_targer_id . '").style.display = "table";';
|
353 |
+
}
|
354 |
+
unset($single_targer_id);
|
355 |
+
}
|
356 |
+
else
|
357 |
+
{
|
358 |
+
foreach($hide_target_id as $single_targer_id)
|
359 |
+
{
|
360 |
+
echo 'document.getElementById("' . $single_targer_id . '").style.display = "none";';
|
361 |
+
}
|
362 |
+
unset($single_targer_id);
|
363 |
+
}
|
364 |
+
?>
|
365 |
+
|
366 |
+
function <?php echo $hide_shooter_id; ?>_itro_show_hide()
|
367 |
+
{<?php
|
368 |
+
foreach($hide_target_id as $single_targer_id)
|
369 |
+
{?>
|
370 |
+
if( document.getElementById("<?php echo $single_targer_id; ?>").style.display != "none" )
|
371 |
+
{jQuery("#<?php echo $single_targer_id; ?>").fadeOut("fast");}
|
372 |
+
else
|
373 |
+
{
|
374 |
+
jQuery("#<?php echo $single_targer_id; ?>").fadeIn("fast" , function() {jQuery("#<?php echo $single_targer_id; ?>").effect( "highlight", {color:"<?php echo $highlight_opt[0];?>"}, <?php echo $highlight_opt[1];?> );});
|
375 |
+
document.getElementById("<?php echo $single_targer_id; ?>").style.display = "table";
|
376 |
+
}<?php
|
377 |
+
}
|
378 |
+
unset($single_targer_id);?>
|
379 |
+
}
|
380 |
+
|
381 |
+
function <?php echo $hide_shooter_id; ?>_stop_anim()
|
382 |
+
{ <?php
|
383 |
+
foreach($hide_target_id as $single_targer_id)
|
384 |
+
{ ?>
|
385 |
+
if ( document.getElementById("<?php echo $single_targer_id; ?>").style.display != "none" )
|
386 |
+
{ jQuery("#<?php echo $single_targer_id; ?>").stop(true, true); } <?php
|
387 |
+
} ?>
|
388 |
+
}
|
389 |
+
|
390 |
+
document.getElementById("<?php echo 'span_' . $hide_shooter_id; ?>").addEventListener("mousedown" , <?php echo $hide_shooter_id; ?>_stop_anim);
|
391 |
+
document.getElementById("<?php echo $hide_shooter_id; ?>").addEventListener("mousedown" , <?php echo $hide_shooter_id; ?>_stop_anim);
|
392 |
+
|
393 |
+
document.getElementById("<?php echo 'span_' . $hide_shooter_id; ?>").addEventListener("mousedown" , <?php echo $hide_shooter_id; ?>_itro_show_hide);
|
394 |
+
document.getElementById("<?php echo $hide_shooter_id; ?>").addEventListener("mousedown" , <?php echo $hide_shooter_id; ?>_itro_show_hide);
|
395 |
+
|
396 |
+
</script> <?php
|
397 |
+
}
|
398 |
+
|
399 |
+
function itro_onOff($tag_id,$overflow){
|
400 |
+
if( $overflow == 'hidden') {?>
|
401 |
+
<style>#<?php echo $tag_id;?>{overflow:hidden;}</style><?php
|
402 |
+
} ?>
|
403 |
+
<script type="text/javascript">
|
404 |
+
var <?php echo $tag_id;?>_flag=true;
|
405 |
+
function onOff_<?php echo $tag_id;?>() {
|
406 |
+
if (<?php echo $tag_id;?>_flag==true) { document.getElementById('<?php echo $tag_id;?>').style.height='0px'; }
|
407 |
+
else { document.getElementById('<?php echo $tag_id;?>').style.height='auto'; }
|
408 |
+
<?php echo $tag_id;?>_flag=!<?php echo $tag_id;?>_flag;
|
409 |
+
}
|
410 |
+
</script>
|
411 |
+
<?php
|
412 |
+
}
|
413 |
+
|
414 |
+
function itro_onOff_checkbox($box_id,$tag_id,$init_state){
|
415 |
+
?>
|
416 |
+
<style>#<?php echo $tag_id;?>{overflow:hidden;}</style>
|
417 |
+
<script type="text/javascript">
|
418 |
+
function <?php echo $box_id;?>_checkbox_<?php echo $tag_id;?>()
|
419 |
+
{
|
420 |
+
if (<?php echo $box_id;?>.checked==<?php echo $init_state ?>) {document.getElementById('<?php echo $tag_id;?>').style.height='0px';}
|
421 |
+
else {document.getElementById('<?php echo $tag_id;?>').style.height='auto';}
|
422 |
+
}
|
423 |
+
</script>
|
424 |
+
<?php
|
425 |
+
}
|
426 |
+
?>
|
gpl-3.0.txt
ADDED
@@ -0,0 +1,674 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
GNU GENERAL PUBLIC LICENSE
|
2 |
+
Version 3, 29 June 2007
|
3 |
+
|
4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
6 |
+
of this license document, but changing it is not allowed.
|
7 |
+
|
8 |
+
Preamble
|
9 |
+
|
10 |
+
The GNU General Public License is a free, copyleft license for
|
11 |
+
software and other kinds of works.
|
12 |
+
|
13 |
+
The licenses for most software and other practical works are designed
|
14 |
+
to take away your freedom to share and change the works. By contrast,
|
15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
16 |
+
share and change all versions of a program--to make sure it remains free
|
17 |
+
software for all its users. We, the Free Software Foundation, use the
|
18 |
+
GNU General Public License for most of our software; it applies also to
|
19 |
+
any other work released this way by its authors. You can apply it to
|
20 |
+
your programs, too.
|
21 |
+
|
22 |
+
When we speak of free software, we are referring to freedom, not
|
23 |
+
price. Our General Public Licenses are designed to make sure that you
|
24 |
+
have the freedom to distribute copies of free software (and charge for
|
25 |
+
them if you wish), that you receive source code or can get it if you
|
26 |
+
want it, that you can change the software or use pieces of it in new
|
27 |
+
free programs, and that you know you can do these things.
|
28 |
+
|
29 |
+
To protect your rights, we need to prevent others from denying you
|
30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
+
certain responsibilities if you distribute copies of the software, or if
|
32 |
+
you modify it: responsibilities to respect the freedom of others.
|
33 |
+
|
34 |
+
For example, if you distribute copies of such a program, whether
|
35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
36 |
+
freedoms that you received. You must make sure that they, too, receive
|
37 |
+
or can get the source code. And you must show them these terms so they
|
38 |
+
know their rights.
|
39 |
+
|
40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
43 |
+
|
44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
45 |
+
that there is no warranty for this free software. For both users' and
|
46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
47 |
+
changed, so that their problems will not be attributed erroneously to
|
48 |
+
authors of previous versions.
|
49 |
+
|
50 |
+
Some devices are designed to deny users access to install or run
|
51 |
+
modified versions of the software inside them, although the manufacturer
|
52 |
+
can do so. This is fundamentally incompatible with the aim of
|
53 |
+
protecting users' freedom to change the software. The systematic
|
54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
+
have designed this version of the GPL to prohibit the practice for those
|
57 |
+
products. If such problems arise substantially in other domains, we
|
58 |
+
stand ready to extend this provision to those domains in future versions
|
59 |
+
of the GPL, as needed to protect the freedom of users.
|
60 |
+
|
61 |
+
Finally, every program is threatened constantly by software patents.
|
62 |
+
States should not allow patents to restrict development and use of
|
63 |
+
software on general-purpose computers, but in those that do, we wish to
|
64 |
+
avoid the special danger that patents applied to a free program could
|
65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
+
patents cannot be used to render the program non-free.
|
67 |
+
|
68 |
+
The precise terms and conditions for copying, distribution and
|
69 |
+
modification follow.
|
70 |
+
|
71 |
+
TERMS AND CONDITIONS
|
72 |
+
|
73 |
+
0. Definitions.
|
74 |
+
|
75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
76 |
+
|
77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
+
works, such as semiconductor masks.
|
79 |
+
|
80 |
+
"The Program" refers to any copyrightable work licensed under this
|
81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
+
"recipients" may be individuals or organizations.
|
83 |
+
|
84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
+
in a fashion requiring copyright permission, other than the making of an
|
86 |
+
exact copy. The resulting work is called a "modified version" of the
|
87 |
+
earlier work or a work "based on" the earlier work.
|
88 |
+
|
89 |
+
A "covered work" means either the unmodified Program or a work based
|
90 |
+
on the Program.
|
91 |
+
|
92 |
+
To "propagate" a work means to do anything with it that, without
|
93 |
+
permission, would make you directly or secondarily liable for
|
94 |
+
infringement under applicable copyright law, except executing it on a
|
95 |
+
computer or modifying a private copy. Propagation includes copying,
|
96 |
+
distribution (with or without modification), making available to the
|
97 |
+
public, and in some countries other activities as well.
|
98 |
+
|
99 |
+
To "convey" a work means any kind of propagation that enables other
|
100 |
+
parties to make or receive copies. Mere interaction with a user through
|
101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
102 |
+
|
103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
+
to the extent that it includes a convenient and prominently visible
|
105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
+
tells the user that there is no warranty for the work (except to the
|
107 |
+
extent that warranties are provided), that licensees may convey the
|
108 |
+
work under this License, and how to view a copy of this License. If
|
109 |
+
the interface presents a list of user commands or options, such as a
|
110 |
+
menu, a prominent item in the list meets this criterion.
|
111 |
+
|
112 |
+
1. Source Code.
|
113 |
+
|
114 |
+
The "source code" for a work means the preferred form of the work
|
115 |
+
for making modifications to it. "Object code" means any non-source
|
116 |
+
form of a work.
|
117 |
+
|
118 |
+
A "Standard Interface" means an interface that either is an official
|
119 |
+
standard defined by a recognized standards body, or, in the case of
|
120 |
+
interfaces specified for a particular programming language, one that
|
121 |
+
is widely used among developers working in that language.
|
122 |
+
|
123 |
+
The "System Libraries" of an executable work include anything, other
|
124 |
+
than the work as a whole, that (a) is included in the normal form of
|
125 |
+
packaging a Major Component, but which is not part of that Major
|
126 |
+
Component, and (b) serves only to enable use of the work with that
|
127 |
+
Major Component, or to implement a Standard Interface for which an
|
128 |
+
implementation is available to the public in source code form. A
|
129 |
+
"Major Component", in this context, means a major essential component
|
130 |
+
(kernel, window system, and so on) of the specific operating system
|
131 |
+
(if any) on which the executable work runs, or a compiler used to
|
132 |
+
produce the work, or an object code interpreter used to run it.
|
133 |
+
|
134 |
+
The "Corresponding Source" for a work in object code form means all
|
135 |
+
the source code needed to generate, install, and (for an executable
|
136 |
+
work) run the object code and to modify the work, including scripts to
|
137 |
+
control those activities. However, it does not include the work's
|
138 |
+
System Libraries, or general-purpose tools or generally available free
|
139 |
+
programs which are used unmodified in performing those activities but
|
140 |
+
which are not part of the work. For example, Corresponding Source
|
141 |
+
includes interface definition files associated with source files for
|
142 |
+
the work, and the source code for shared libraries and dynamically
|
143 |
+
linked subprograms that the work is specifically designed to require,
|
144 |
+
such as by intimate data communication or control flow between those
|
145 |
+
subprograms and other parts of the work.
|
146 |
+
|
147 |
+
The Corresponding Source need not include anything that users
|
148 |
+
can regenerate automatically from other parts of the Corresponding
|
149 |
+
Source.
|
150 |
+
|
151 |
+
The Corresponding Source for a work in source code form is that
|
152 |
+
same work.
|
153 |
+
|
154 |
+
2. Basic Permissions.
|
155 |
+
|
156 |
+
All rights granted under this License are granted for the term of
|
157 |
+
copyright on the Program, and are irrevocable provided the stated
|
158 |
+
conditions are met. This License explicitly affirms your unlimited
|
159 |
+
permission to run the unmodified Program. The output from running a
|
160 |
+
covered work is covered by this License only if the output, given its
|
161 |
+
content, constitutes a covered work. This License acknowledges your
|
162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
+
|
164 |
+
You may make, run and propagate covered works that you do not
|
165 |
+
convey, without conditions so long as your license otherwise remains
|
166 |
+
in force. You may convey covered works to others for the sole purpose
|
167 |
+
of having them make modifications exclusively for you, or provide you
|
168 |
+
with facilities for running those works, provided that you comply with
|
169 |
+
the terms of this License in conveying all material for which you do
|
170 |
+
not control copyright. Those thus making or running the covered works
|
171 |
+
for you must do so exclusively on your behalf, under your direction
|
172 |
+
and control, on terms that prohibit them from making any copies of
|
173 |
+
your copyrighted material outside their relationship with you.
|
174 |
+
|
175 |
+
Conveying under any other circumstances is permitted solely under
|
176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
+
makes it unnecessary.
|
178 |
+
|
179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
+
|
181 |
+
No covered work shall be deemed part of an effective technological
|
182 |
+
measure under any applicable law fulfilling obligations under article
|
183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
+
similar laws prohibiting or restricting circumvention of such
|
185 |
+
measures.
|
186 |
+
|
187 |
+
When you convey a covered work, you waive any legal power to forbid
|
188 |
+
circumvention of technological measures to the extent such circumvention
|
189 |
+
is effected by exercising rights under this License with respect to
|
190 |
+
the covered work, and you disclaim any intention to limit operation or
|
191 |
+
modification of the work as a means of enforcing, against the work's
|
192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
193 |
+
technological measures.
|
194 |
+
|
195 |
+
4. Conveying Verbatim Copies.
|
196 |
+
|
197 |
+
You may convey verbatim copies of the Program's source code as you
|
198 |
+
receive it, in any medium, provided that you conspicuously and
|
199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
200 |
+
keep intact all notices stating that this License and any
|
201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
+
keep intact all notices of the absence of any warranty; and give all
|
203 |
+
recipients a copy of this License along with the Program.
|
204 |
+
|
205 |
+
You may charge any price or no price for each copy that you convey,
|
206 |
+
and you may offer support or warranty protection for a fee.
|
207 |
+
|
208 |
+
5. Conveying Modified Source Versions.
|
209 |
+
|
210 |
+
You may convey a work based on the Program, or the modifications to
|
211 |
+
produce it from the Program, in the form of source code under the
|
212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
213 |
+
|
214 |
+
a) The work must carry prominent notices stating that you modified
|
215 |
+
it, and giving a relevant date.
|
216 |
+
|
217 |
+
b) The work must carry prominent notices stating that it is
|
218 |
+
released under this License and any conditions added under section
|
219 |
+
7. This requirement modifies the requirement in section 4 to
|
220 |
+
"keep intact all notices".
|
221 |
+
|
222 |
+
c) You must license the entire work, as a whole, under this
|
223 |
+
License to anyone who comes into possession of a copy. This
|
224 |
+
License will therefore apply, along with any applicable section 7
|
225 |
+
additional terms, to the whole of the work, and all its parts,
|
226 |
+
regardless of how they are packaged. This License gives no
|
227 |
+
permission to license the work in any other way, but it does not
|
228 |
+
invalidate such permission if you have separately received it.
|
229 |
+
|
230 |
+
d) If the work has interactive user interfaces, each must display
|
231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
233 |
+
work need not make them do so.
|
234 |
+
|
235 |
+
A compilation of a covered work with other separate and independent
|
236 |
+
works, which are not by their nature extensions of the covered work,
|
237 |
+
and which are not combined with it such as to form a larger program,
|
238 |
+
in or on a volume of a storage or distribution medium, is called an
|
239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
240 |
+
used to limit the access or legal rights of the compilation's users
|
241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
242 |
+
in an aggregate does not cause this License to apply to the other
|
243 |
+
parts of the aggregate.
|
244 |
+
|
245 |
+
6. Conveying Non-Source Forms.
|
246 |
+
|
247 |
+
You may convey a covered work in object code form under the terms
|
248 |
+
of sections 4 and 5, provided that you also convey the
|
249 |
+
machine-readable Corresponding Source under the terms of this License,
|
250 |
+
in one of these ways:
|
251 |
+
|
252 |
+
a) Convey the object code in, or embodied in, a physical product
|
253 |
+
(including a physical distribution medium), accompanied by the
|
254 |
+
Corresponding Source fixed on a durable physical medium
|
255 |
+
customarily used for software interchange.
|
256 |
+
|
257 |
+
b) Convey the object code in, or embodied in, a physical product
|
258 |
+
(including a physical distribution medium), accompanied by a
|
259 |
+
written offer, valid for at least three years and valid for as
|
260 |
+
long as you offer spare parts or customer support for that product
|
261 |
+
model, to give anyone who possesses the object code either (1) a
|
262 |
+
copy of the Corresponding Source for all the software in the
|
263 |
+
product that is covered by this License, on a durable physical
|
264 |
+
medium customarily used for software interchange, for a price no
|
265 |
+
more than your reasonable cost of physically performing this
|
266 |
+
conveying of source, or (2) access to copy the
|
267 |
+
Corresponding Source from a network server at no charge.
|
268 |
+
|
269 |
+
c) Convey individual copies of the object code with a copy of the
|
270 |
+
written offer to provide the Corresponding Source. This
|
271 |
+
alternative is allowed only occasionally and noncommercially, and
|
272 |
+
only if you received the object code with such an offer, in accord
|
273 |
+
with subsection 6b.
|
274 |
+
|
275 |
+
d) Convey the object code by offering access from a designated
|
276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
277 |
+
Corresponding Source in the same way through the same place at no
|
278 |
+
further charge. You need not require recipients to copy the
|
279 |
+
Corresponding Source along with the object code. If the place to
|
280 |
+
copy the object code is a network server, the Corresponding Source
|
281 |
+
may be on a different server (operated by you or a third party)
|
282 |
+
that supports equivalent copying facilities, provided you maintain
|
283 |
+
clear directions next to the object code saying where to find the
|
284 |
+
Corresponding Source. Regardless of what server hosts the
|
285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
286 |
+
available for as long as needed to satisfy these requirements.
|
287 |
+
|
288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
+
you inform other peers where the object code and Corresponding
|
290 |
+
Source of the work are being offered to the general public at no
|
291 |
+
charge under subsection 6d.
|
292 |
+
|
293 |
+
A separable portion of the object code, whose source code is excluded
|
294 |
+
from the Corresponding Source as a System Library, need not be
|
295 |
+
included in conveying the object code work.
|
296 |
+
|
297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
298 |
+
tangible personal property which is normally used for personal, family,
|
299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
+
product received by a particular user, "normally used" refers to a
|
303 |
+
typical or common use of that class of product, regardless of the status
|
304 |
+
of the particular user or of the way in which the particular user
|
305 |
+
actually uses, or expects or is expected to use, the product. A product
|
306 |
+
is a consumer product regardless of whether the product has substantial
|
307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
+
the only significant mode of use of the product.
|
309 |
+
|
310 |
+
"Installation Information" for a User Product means any methods,
|
311 |
+
procedures, authorization keys, or other information required to install
|
312 |
+
and execute modified versions of a covered work in that User Product from
|
313 |
+
a modified version of its Corresponding Source. The information must
|
314 |
+
suffice to ensure that the continued functioning of the modified object
|
315 |
+
code is in no case prevented or interfered with solely because
|
316 |
+
modification has been made.
|
317 |
+
|
318 |
+
If you convey an object code work under this section in, or with, or
|
319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
320 |
+
part of a transaction in which the right of possession and use of the
|
321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
322 |
+
fixed term (regardless of how the transaction is characterized), the
|
323 |
+
Corresponding Source conveyed under this section must be accompanied
|
324 |
+
by the Installation Information. But this requirement does not apply
|
325 |
+
if neither you nor any third party retains the ability to install
|
326 |
+
modified object code on the User Product (for example, the work has
|
327 |
+
been installed in ROM).
|
328 |
+
|
329 |
+
The requirement to provide Installation Information does not include a
|
330 |
+
requirement to continue to provide support service, warranty, or updates
|
331 |
+
for a work that has been modified or installed by the recipient, or for
|
332 |
+
the User Product in which it has been modified or installed. Access to a
|
333 |
+
network may be denied when the modification itself materially and
|
334 |
+
adversely affects the operation of the network or violates the rules and
|
335 |
+
protocols for communication across the network.
|
336 |
+
|
337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
338 |
+
in accord with this section must be in a format that is publicly
|
339 |
+
documented (and with an implementation available to the public in
|
340 |
+
source code form), and must require no special password or key for
|
341 |
+
unpacking, reading or copying.
|
342 |
+
|
343 |
+
7. Additional Terms.
|
344 |
+
|
345 |
+
"Additional permissions" are terms that supplement the terms of this
|
346 |
+
License by making exceptions from one or more of its conditions.
|
347 |
+
Additional permissions that are applicable to the entire Program shall
|
348 |
+
be treated as though they were included in this License, to the extent
|
349 |
+
that they are valid under applicable law. If additional permissions
|
350 |
+
apply only to part of the Program, that part may be used separately
|
351 |
+
under those permissions, but the entire Program remains governed by
|
352 |
+
this License without regard to the additional permissions.
|
353 |
+
|
354 |
+
When you convey a copy of a covered work, you may at your option
|
355 |
+
remove any additional permissions from that copy, or from any part of
|
356 |
+
it. (Additional permissions may be written to require their own
|
357 |
+
removal in certain cases when you modify the work.) You may place
|
358 |
+
additional permissions on material, added by you to a covered work,
|
359 |
+
for which you have or can give appropriate copyright permission.
|
360 |
+
|
361 |
+
Notwithstanding any other provision of this License, for material you
|
362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
+
that material) supplement the terms of this License with terms:
|
364 |
+
|
365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
366 |
+
terms of sections 15 and 16 of this License; or
|
367 |
+
|
368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
369 |
+
author attributions in that material or in the Appropriate Legal
|
370 |
+
Notices displayed by works containing it; or
|
371 |
+
|
372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
+
requiring that modified versions of such material be marked in
|
374 |
+
reasonable ways as different from the original version; or
|
375 |
+
|
376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
+
authors of the material; or
|
378 |
+
|
379 |
+
e) Declining to grant rights under trademark law for use of some
|
380 |
+
trade names, trademarks, or service marks; or
|
381 |
+
|
382 |
+
f) Requiring indemnification of licensors and authors of that
|
383 |
+
material by anyone who conveys the material (or modified versions of
|
384 |
+
it) with contractual assumptions of liability to the recipient, for
|
385 |
+
any liability that these contractual assumptions directly impose on
|
386 |
+
those licensors and authors.
|
387 |
+
|
388 |
+
All other non-permissive additional terms are considered "further
|
389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
390 |
+
received it, or any part of it, contains a notice stating that it is
|
391 |
+
governed by this License along with a term that is a further
|
392 |
+
restriction, you may remove that term. If a license document contains
|
393 |
+
a further restriction but permits relicensing or conveying under this
|
394 |
+
License, you may add to a covered work material governed by the terms
|
395 |
+
of that license document, provided that the further restriction does
|
396 |
+
not survive such relicensing or conveying.
|
397 |
+
|
398 |
+
If you add terms to a covered work in accord with this section, you
|
399 |
+
must place, in the relevant source files, a statement of the
|
400 |
+
additional terms that apply to those files, or a notice indicating
|
401 |
+
where to find the applicable terms.
|
402 |
+
|
403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
+
form of a separately written license, or stated as exceptions;
|
405 |
+
the above requirements apply either way.
|
406 |
+
|
407 |
+
8. Termination.
|
408 |
+
|
409 |
+
You may not propagate or modify a covered work except as expressly
|
410 |
+
provided under this License. Any attempt otherwise to propagate or
|
411 |
+
modify it is void, and will automatically terminate your rights under
|
412 |
+
this License (including any patent licenses granted under the third
|
413 |
+
paragraph of section 11).
|
414 |
+
|
415 |
+
However, if you cease all violation of this License, then your
|
416 |
+
license from a particular copyright holder is reinstated (a)
|
417 |
+
provisionally, unless and until the copyright holder explicitly and
|
418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
419 |
+
holder fails to notify you of the violation by some reasonable means
|
420 |
+
prior to 60 days after the cessation.
|
421 |
+
|
422 |
+
Moreover, your license from a particular copyright holder is
|
423 |
+
reinstated permanently if the copyright holder notifies you of the
|
424 |
+
violation by some reasonable means, this is the first time you have
|
425 |
+
received notice of violation of this License (for any work) from that
|
426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
427 |
+
your receipt of the notice.
|
428 |
+
|
429 |
+
Termination of your rights under this section does not terminate the
|
430 |
+
licenses of parties who have received copies or rights from you under
|
431 |
+
this License. If your rights have been terminated and not permanently
|
432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
433 |
+
material under section 10.
|
434 |
+
|
435 |
+
9. Acceptance Not Required for Having Copies.
|
436 |
+
|
437 |
+
You are not required to accept this License in order to receive or
|
438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
+
to receive a copy likewise does not require acceptance. However,
|
441 |
+
nothing other than this License grants you permission to propagate or
|
442 |
+
modify any covered work. These actions infringe copyright if you do
|
443 |
+
not accept this License. Therefore, by modifying or propagating a
|
444 |
+
covered work, you indicate your acceptance of this License to do so.
|
445 |
+
|
446 |
+
10. Automatic Licensing of Downstream Recipients.
|
447 |
+
|
448 |
+
Each time you convey a covered work, the recipient automatically
|
449 |
+
receives a license from the original licensors, to run, modify and
|
450 |
+
propagate that work, subject to this License. You are not responsible
|
451 |
+
for enforcing compliance by third parties with this License.
|
452 |
+
|
453 |
+
An "entity transaction" is a transaction transferring control of an
|
454 |
+
organization, or substantially all assets of one, or subdividing an
|
455 |
+
organization, or merging organizations. If propagation of a covered
|
456 |
+
work results from an entity transaction, each party to that
|
457 |
+
transaction who receives a copy of the work also receives whatever
|
458 |
+
licenses to the work the party's predecessor in interest had or could
|
459 |
+
give under the previous paragraph, plus a right to possession of the
|
460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
461 |
+
the predecessor has it or can get it with reasonable efforts.
|
462 |
+
|
463 |
+
You may not impose any further restrictions on the exercise of the
|
464 |
+
rights granted or affirmed under this License. For example, you may
|
465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
466 |
+
rights granted under this License, and you may not initiate litigation
|
467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
+
any patent claim is infringed by making, using, selling, offering for
|
469 |
+
sale, or importing the Program or any portion of it.
|
470 |
+
|
471 |
+
11. Patents.
|
472 |
+
|
473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
474 |
+
License of the Program or a work on which the Program is based. The
|
475 |
+
work thus licensed is called the contributor's "contributor version".
|
476 |
+
|
477 |
+
A contributor's "essential patent claims" are all patent claims
|
478 |
+
owned or controlled by the contributor, whether already acquired or
|
479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
+
by this License, of making, using, or selling its contributor version,
|
481 |
+
but do not include claims that would be infringed only as a
|
482 |
+
consequence of further modification of the contributor version. For
|
483 |
+
purposes of this definition, "control" includes the right to grant
|
484 |
+
patent sublicenses in a manner consistent with the requirements of
|
485 |
+
this License.
|
486 |
+
|
487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
+
patent license under the contributor's essential patent claims, to
|
489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
+
propagate the contents of its contributor version.
|
491 |
+
|
492 |
+
In the following three paragraphs, a "patent license" is any express
|
493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
494 |
+
(such as an express permission to practice a patent or covenant not to
|
495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
496 |
+
party means to make such an agreement or commitment not to enforce a
|
497 |
+
patent against the party.
|
498 |
+
|
499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
500 |
+
and the Corresponding Source of the work is not available for anyone
|
501 |
+
to copy, free of charge and under the terms of this License, through a
|
502 |
+
publicly available network server or other readily accessible means,
|
503 |
+
then you must either (1) cause the Corresponding Source to be so
|
504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
506 |
+
consistent with the requirements of this License, to extend the patent
|
507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
508 |
+
actual knowledge that, but for the patent license, your conveying the
|
509 |
+
covered work in a country, or your recipient's use of the covered work
|
510 |
+
in a country, would infringe one or more identifiable patents in that
|
511 |
+
country that you have reason to believe are valid.
|
512 |
+
|
513 |
+
If, pursuant to or in connection with a single transaction or
|
514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
+
covered work, and grant a patent license to some of the parties
|
516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
517 |
+
or convey a specific copy of the covered work, then the patent license
|
518 |
+
you grant is automatically extended to all recipients of the covered
|
519 |
+
work and works based on it.
|
520 |
+
|
521 |
+
A patent license is "discriminatory" if it does not include within
|
522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
524 |
+
specifically granted under this License. You may not convey a covered
|
525 |
+
work if you are a party to an arrangement with a third party that is
|
526 |
+
in the business of distributing software, under which you make payment
|
527 |
+
to the third party based on the extent of your activity of conveying
|
528 |
+
the work, and under which the third party grants, to any of the
|
529 |
+
parties who would receive the covered work from you, a discriminatory
|
530 |
+
patent license (a) in connection with copies of the covered work
|
531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
+
for and in connection with specific products or compilations that
|
533 |
+
contain the covered work, unless you entered into that arrangement,
|
534 |
+
or that patent license was granted, prior to 28 March 2007.
|
535 |
+
|
536 |
+
Nothing in this License shall be construed as excluding or limiting
|
537 |
+
any implied license or other defenses to infringement that may
|
538 |
+
otherwise be available to you under applicable patent law.
|
539 |
+
|
540 |
+
12. No Surrender of Others' Freedom.
|
541 |
+
|
542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
543 |
+
otherwise) that contradict the conditions of this License, they do not
|
544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
546 |
+
License and any other pertinent obligations, then as a consequence you may
|
547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
+
to collect a royalty for further conveying from those to whom you convey
|
549 |
+
the Program, the only way you could satisfy both those terms and this
|
550 |
+
License would be to refrain entirely from conveying the Program.
|
551 |
+
|
552 |
+
13. Use with the GNU Affero General Public License.
|
553 |
+
|
554 |
+
Notwithstanding any other provision of this License, you have
|
555 |
+
permission to link or combine any covered work with a work licensed
|
556 |
+
under version 3 of the GNU Affero General Public License into a single
|
557 |
+
combined work, and to convey the resulting work. The terms of this
|
558 |
+
License will continue to apply to the part which is the covered work,
|
559 |
+
but the special requirements of the GNU Affero General Public License,
|
560 |
+
section 13, concerning interaction through a network will apply to the
|
561 |
+
combination as such.
|
562 |
+
|
563 |
+
14. Revised Versions of this License.
|
564 |
+
|
565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
566 |
+
the GNU General Public License from time to time. Such new versions will
|
567 |
+
be similar in spirit to the present version, but may differ in detail to
|
568 |
+
address new problems or concerns.
|
569 |
+
|
570 |
+
Each version is given a distinguishing version number. If the
|
571 |
+
Program specifies that a certain numbered version of the GNU General
|
572 |
+
Public License "or any later version" applies to it, you have the
|
573 |
+
option of following the terms and conditions either of that numbered
|
574 |
+
version or of any later version published by the Free Software
|
575 |
+
Foundation. If the Program does not specify a version number of the
|
576 |
+
GNU General Public License, you may choose any version ever published
|
577 |
+
by the Free Software Foundation.
|
578 |
+
|
579 |
+
If the Program specifies that a proxy can decide which future
|
580 |
+
versions of the GNU General Public License can be used, that proxy's
|
581 |
+
public statement of acceptance of a version permanently authorizes you
|
582 |
+
to choose that version for the Program.
|
583 |
+
|
584 |
+
Later license versions may give you additional or different
|
585 |
+
permissions. However, no additional obligations are imposed on any
|
586 |
+
author or copyright holder as a result of your choosing to follow a
|
587 |
+
later version.
|
588 |
+
|
589 |
+
15. Disclaimer of Warranty.
|
590 |
+
|
591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
+
|
600 |
+
16. Limitation of Liability.
|
601 |
+
|
602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
+
SUCH DAMAGES.
|
611 |
+
|
612 |
+
17. Interpretation of Sections 15 and 16.
|
613 |
+
|
614 |
+
If the disclaimer of warranty and limitation of liability provided
|
615 |
+
above cannot be given local legal effect according to their terms,
|
616 |
+
reviewing courts shall apply local law that most closely approximates
|
617 |
+
an absolute waiver of all civil liability in connection with the
|
618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
619 |
+
copy of the Program in return for a fee.
|
620 |
+
|
621 |
+
END OF TERMS AND CONDITIONS
|
622 |
+
|
623 |
+
How to Apply These Terms to Your New Programs
|
624 |
+
|
625 |
+
If you develop a new program, and you want it to be of the greatest
|
626 |
+
possible use to the public, the best way to achieve this is to make it
|
627 |
+
free software which everyone can redistribute and change under these terms.
|
628 |
+
|
629 |
+
To do so, attach the following notices to the program. It is safest
|
630 |
+
to attach them to the start of each source file to most effectively
|
631 |
+
state the exclusion of warranty; and each file should have at least
|
632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
633 |
+
|
634 |
+
<one line to give the program's name and a brief idea of what it does.>
|
635 |
+
Copyright (C) <year> <name of author>
|
636 |
+
|
637 |
+
This program is free software: you can redistribute it and/or modify
|
638 |
+
it under the terms of the GNU General Public License as published by
|
639 |
+
the Free Software Foundation, either version 3 of the License, or
|
640 |
+
(at your option) any later version.
|
641 |
+
|
642 |
+
This program is distributed in the hope that it will be useful,
|
643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
+
GNU General Public License for more details.
|
646 |
+
|
647 |
+
You should have received a copy of the GNU General Public License
|
648 |
+
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
+
|
650 |
+
Also add information on how to contact you by electronic and paper mail.
|
651 |
+
|
652 |
+
If the program does terminal interaction, make it output a short
|
653 |
+
notice like this when it starts in an interactive mode:
|
654 |
+
|
655 |
+
<program> Copyright (C) <year> <name of author>
|
656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
+
This is free software, and you are welcome to redistribute it
|
658 |
+
under certain conditions; type `show c' for details.
|
659 |
+
|
660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
+
parts of the General Public License. Of course, your program's commands
|
662 |
+
might be different; for a GUI interface, you would use an "about box".
|
663 |
+
|
664 |
+
You should also get your employer (if you work as a programmer) or school,
|
665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
+
<http://www.gnu.org/licenses/>.
|
668 |
+
|
669 |
+
The GNU General Public License does not permit incorporating your program
|
670 |
+
into proprietary programs. If your program is a subroutine library, you
|
671 |
+
may consider it more useful to permit linking proprietary applications with
|
672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
+
Public License instead of this License. But first, please read
|
674 |
+
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
images/close-icon.png
ADDED
Binary file
|
images/coffee.png
ADDED
Binary file
|
images/question_mark.png
ADDED
Binary file
|
languages/itro-plugin-en_GB.mo
ADDED
Binary file
|
languages/itro-plugin-en_GB.po
ADDED
@@ -0,0 +1,336 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: mc-plugin\n"
|
4 |
+
"POT-Creation-Date: 2013-05-07 17:10+0100\n"
|
5 |
+
"PO-Revision-Date: 2013-05-07 17:10+0100\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: ITRO Corp\n"
|
8 |
+
"MIME-Version: 1.0\n"
|
9 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
10 |
+
"Content-Transfer-Encoding: 8bit\n"
|
11 |
+
"X-Generator: Poedit 1.5.5\n"
|
12 |
+
"X-Poedit-KeywordsList: _;gettext;gettext_noop;_e\n"
|
13 |
+
"X-Poedit-Basepath: ../\n"
|
14 |
+
"X-Poedit-SearchPath-0: .\n"
|
15 |
+
|
16 |
+
#: admin/popup-admin.php:125
|
17 |
+
msgid "settings saved."
|
18 |
+
msgstr ""
|
19 |
+
|
20 |
+
#: admin/popup-admin.php:132
|
21 |
+
msgid "I.T.RO. Popup Plugin - Settings"
|
22 |
+
msgstr ""
|
23 |
+
|
24 |
+
#: admin/popup-admin.php:144
|
25 |
+
msgid "General Popup Option:"
|
26 |
+
msgstr ""
|
27 |
+
|
28 |
+
#: admin/popup-admin.php:151
|
29 |
+
msgid "SHOW ADVANCED SETTINGS"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: admin/popup-admin.php:152
|
33 |
+
msgid "Display many other options"
|
34 |
+
msgstr ""
|
35 |
+
|
36 |
+
#: admin/popup-admin.php:157
|
37 |
+
msgid "DECIDE WHERE POPUP WILL BE DISPLAYED"
|
38 |
+
msgstr ""
|
39 |
+
|
40 |
+
#: admin/popup-admin.php:159
|
41 |
+
msgid "Only selected pages"
|
42 |
+
msgstr ""
|
43 |
+
|
44 |
+
#: admin/popup-admin.php:159
|
45 |
+
msgid "Multiple choise with CTRL+Click or SHIFT+Arrow up or down"
|
46 |
+
msgstr ""
|
47 |
+
|
48 |
+
#: admin/popup-admin.php:160
|
49 |
+
msgid "All pages"
|
50 |
+
msgstr ""
|
51 |
+
|
52 |
+
#: admin/popup-admin.php:161
|
53 |
+
msgid "No page"
|
54 |
+
msgstr ""
|
55 |
+
|
56 |
+
#: admin/popup-admin.php:165
|
57 |
+
msgid "Blog homepage"
|
58 |
+
msgstr ""
|
59 |
+
|
60 |
+
#: admin/popup-admin.php:167
|
61 |
+
msgid ""
|
62 |
+
"If in your Settings->Reading you have set 'Front page displays: Your latest "
|
63 |
+
"posts' and want to display the popup in the home, check this box."
|
64 |
+
msgstr ""
|
65 |
+
|
66 |
+
#: admin/popup-admin.php:176
|
67 |
+
msgid "GENERAL SETTINGS"
|
68 |
+
msgstr ""
|
69 |
+
|
70 |
+
#: admin/popup-admin.php:179
|
71 |
+
msgid "Disable ESC key"
|
72 |
+
msgstr ""
|
73 |
+
|
74 |
+
#: admin/popup-admin.php:180
|
75 |
+
msgid ""
|
76 |
+
"If you set this option popup can not be closed with ESC button of keyboard."
|
77 |
+
msgstr ""
|
78 |
+
|
79 |
+
#: admin/popup-admin.php:185
|
80 |
+
msgid "Popup seconds:"
|
81 |
+
msgstr ""
|
82 |
+
|
83 |
+
#: admin/popup-admin.php:185
|
84 |
+
msgid ""
|
85 |
+
"Set seconds until the popup automatically close. Set it to zero to disable "
|
86 |
+
"countdown."
|
87 |
+
msgstr ""
|
88 |
+
|
89 |
+
#: admin/popup-admin.php:193
|
90 |
+
msgid "Popup delay:"
|
91 |
+
msgstr ""
|
92 |
+
|
93 |
+
#: admin/popup-admin.php:193
|
94 |
+
msgid "Set seconds before the popup will be displayed"
|
95 |
+
msgstr ""
|
96 |
+
|
97 |
+
#: admin/popup-admin.php:201
|
98 |
+
msgid "Next visualization (hours):"
|
99 |
+
msgstr ""
|
100 |
+
|
101 |
+
#: admin/popup-admin.php:201
|
102 |
+
msgid ""
|
103 |
+
"Set time for the next visualization of popup, to prevent annoying repeated "
|
104 |
+
"visualizations, when someone visit pages"
|
105 |
+
msgstr ""
|
106 |
+
|
107 |
+
#: admin/popup-admin.php:207
|
108 |
+
msgid "Delete cookie"
|
109 |
+
msgstr ""
|
110 |
+
|
111 |
+
#: admin/popup-admin.php:208
|
112 |
+
msgid "Cookie deleted!"
|
113 |
+
msgstr ""
|
114 |
+
|
115 |
+
#: admin/popup-admin.php:213
|
116 |
+
msgid "Show countdown"
|
117 |
+
msgstr ""
|
118 |
+
|
119 |
+
#: admin/popup-admin.php:214
|
120 |
+
msgid ""
|
121 |
+
"Show the countdown at the bottom of the popup which dispay the time before "
|
122 |
+
"popup will close. If is hidden, it run anyway."
|
123 |
+
msgstr ""
|
124 |
+
|
125 |
+
#: admin/popup-admin.php:216
|
126 |
+
msgid "Countdown font color:"
|
127 |
+
msgstr ""
|
128 |
+
|
129 |
+
#: admin/popup-admin.php:217
|
130 |
+
msgid "Select the countdown font color."
|
131 |
+
msgstr ""
|
132 |
+
|
133 |
+
#: admin/popup-admin.php:221
|
134 |
+
msgid "POPUP ASPECT"
|
135 |
+
msgstr ""
|
136 |
+
|
137 |
+
#: admin/popup-admin.php:225
|
138 |
+
msgid "Popup width:"
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: admin/popup-admin.php:225
|
142 |
+
msgid ""
|
143 |
+
"Use the % to change width dinamically with the browser window , or px for "
|
144 |
+
"fixed dimension i.e: 30% or 200px"
|
145 |
+
msgstr ""
|
146 |
+
|
147 |
+
#: admin/popup-admin.php:239
|
148 |
+
msgid "Popup height:"
|
149 |
+
msgstr ""
|
150 |
+
|
151 |
+
#: admin/popup-admin.php:239
|
152 |
+
msgid "Select auto to adapt popup height to the content"
|
153 |
+
msgstr ""
|
154 |
+
|
155 |
+
#: admin/popup-admin.php:253
|
156 |
+
msgid "Popup background color"
|
157 |
+
msgstr ""
|
158 |
+
|
159 |
+
#: admin/popup-admin.php:255
|
160 |
+
msgid "Popup border color:"
|
161 |
+
msgstr ""
|
162 |
+
|
163 |
+
#: admin/popup-admin.php:261
|
164 |
+
msgid "Popup border radius(px):"
|
165 |
+
msgstr ""
|
166 |
+
|
167 |
+
#: admin/popup-admin.php:269
|
168 |
+
msgid "Popup border width(px):"
|
169 |
+
msgstr ""
|
170 |
+
|
171 |
+
#: admin/popup-admin.php:277
|
172 |
+
msgid "Popup padding(px):"
|
173 |
+
msgstr ""
|
174 |
+
|
175 |
+
#: admin/popup-admin.php:284
|
176 |
+
msgid "BACKGROUND IMAGE"
|
177 |
+
msgstr ""
|
178 |
+
|
179 |
+
#: admin/popup-admin.php:285
|
180 |
+
msgid "Show image"
|
181 |
+
msgstr ""
|
182 |
+
|
183 |
+
#: admin/popup-admin.php:288
|
184 |
+
msgid "No background"
|
185 |
+
msgstr ""
|
186 |
+
|
187 |
+
#: admin/popup-admin.php:291
|
188 |
+
msgid "Upload Image"
|
189 |
+
msgstr ""
|
190 |
+
|
191 |
+
#: admin/popup-admin.php:294
|
192 |
+
msgid "Popup position:"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: admin/popup-admin.php:294
|
196 |
+
msgid ""
|
197 |
+
"Setting ABSOLUTE the popup will be static on the page. Setting FIXED it will "
|
198 |
+
"scroll with the page."
|
199 |
+
msgstr ""
|
200 |
+
|
201 |
+
#: admin/popup-admin.php:306
|
202 |
+
msgid "Automatic top margin:"
|
203 |
+
msgstr ""
|
204 |
+
|
205 |
+
#: admin/popup-admin.php:307
|
206 |
+
msgid ""
|
207 |
+
"The system will try to auto center the popup, in case of problem deselect "
|
208 |
+
"this option"
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
#: admin/popup-admin.php:312
|
212 |
+
msgid "Popup top margin(px):"
|
213 |
+
msgstr ""
|
214 |
+
|
215 |
+
#: admin/popup-admin.php:322
|
216 |
+
msgid "Background opacity"
|
217 |
+
msgstr ""
|
218 |
+
|
219 |
+
#: admin/popup-admin.php:322
|
220 |
+
msgid "Set the opacity of opaque background under the popup."
|
221 |
+
msgstr ""
|
222 |
+
|
223 |
+
#: admin/popup-admin.php:343
|
224 |
+
msgid "Opaque background color"
|
225 |
+
msgstr ""
|
226 |
+
|
227 |
+
#: admin/popup-admin.php:353
|
228 |
+
msgid "Age restriction settings:"
|
229 |
+
msgstr ""
|
230 |
+
|
231 |
+
#: admin/popup-admin.php:357
|
232 |
+
msgid "Enable age validation"
|
233 |
+
msgstr ""
|
234 |
+
|
235 |
+
#: admin/popup-admin.php:360
|
236 |
+
msgid "Enter button text:"
|
237 |
+
msgstr ""
|
238 |
+
|
239 |
+
#: admin/popup-admin.php:361
|
240 |
+
msgid "i.e.: I AM OVER 18 - ENTER"
|
241 |
+
msgstr ""
|
242 |
+
|
243 |
+
#: admin/popup-admin.php:365
|
244 |
+
msgid "Enter button background color:"
|
245 |
+
msgstr ""
|
246 |
+
|
247 |
+
#: admin/popup-admin.php:368
|
248 |
+
msgid "Enter button border color:"
|
249 |
+
msgstr ""
|
250 |
+
|
251 |
+
#: admin/popup-admin.php:371
|
252 |
+
msgid "Enter button font color:"
|
253 |
+
msgstr ""
|
254 |
+
|
255 |
+
#: admin/popup-admin.php:376
|
256 |
+
msgid "Leave button text:"
|
257 |
+
msgstr ""
|
258 |
+
|
259 |
+
#: admin/popup-admin.php:377
|
260 |
+
msgid "i.e.: I AM UNDER 18 - LEAVE"
|
261 |
+
msgstr ""
|
262 |
+
|
263 |
+
#: admin/popup-admin.php:379
|
264 |
+
msgid "Leave button url:"
|
265 |
+
msgstr ""
|
266 |
+
|
267 |
+
#: admin/popup-admin.php:380
|
268 |
+
msgid "i.e.: http://www.mysite.com/leave.html"
|
269 |
+
msgstr ""
|
270 |
+
|
271 |
+
#: admin/popup-admin.php:384
|
272 |
+
msgid "Leave button background color:"
|
273 |
+
msgstr ""
|
274 |
+
|
275 |
+
#: admin/popup-admin.php:387
|
276 |
+
msgid "Leave button border color:"
|
277 |
+
msgstr ""
|
278 |
+
|
279 |
+
#: admin/popup-admin.php:390
|
280 |
+
msgid "Leave button font color:"
|
281 |
+
msgstr ""
|
282 |
+
|
283 |
+
#: admin/popup-admin.php:402 admin/popup-admin.php:419
|
284 |
+
msgid "Preview page"
|
285 |
+
msgstr ""
|
286 |
+
|
287 |
+
#: admin/popup-admin.php:410
|
288 |
+
msgid "Your text (or HTML code:)"
|
289 |
+
msgstr ""
|
290 |
+
|
291 |
+
#: admin/popup-admin.php:427
|
292 |
+
msgid "Like it? Offer us a coffee! ;-)"
|
293 |
+
msgstr ""
|
294 |
+
|
295 |
+
#: admin/popup-admin.php:432
|
296 |
+
msgid "Make your donation"
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: admin/popup-admin.php:433
|
300 |
+
msgid "little donation"
|
301 |
+
msgstr ""
|
302 |
+
|
303 |
+
#: admin/popup-admin.php:434
|
304 |
+
msgid "right donation"
|
305 |
+
msgstr ""
|
306 |
+
|
307 |
+
#: admin/popup-admin.php:435
|
308 |
+
msgid "normal donation"
|
309 |
+
msgstr ""
|
310 |
+
|
311 |
+
#: admin/popup-admin.php:436
|
312 |
+
msgid "good donation"
|
313 |
+
msgstr ""
|
314 |
+
|
315 |
+
#: admin/popup-admin.php:437
|
316 |
+
msgid "great donation"
|
317 |
+
msgstr ""
|
318 |
+
|
319 |
+
#: admin/popup-admin.php:453
|
320 |
+
msgid "DELETE ALL DATA ON PLUGIN UNISTALL"
|
321 |
+
msgstr ""
|
322 |
+
|
323 |
+
#: admin/popup-admin.php:454
|
324 |
+
msgid ""
|
325 |
+
"Check this box if you want to delete or maintain database tables. It is "
|
326 |
+
"usefull if you have to try to install again the plugin, without lost your "
|
327 |
+
"settings."
|
328 |
+
msgstr ""
|
329 |
+
|
330 |
+
#: templates/itro-popup-template.php:19
|
331 |
+
msgid "CLOSE"
|
332 |
+
msgstr ""
|
333 |
+
|
334 |
+
#: templates/itro-popup-template.php:20
|
335 |
+
msgid "This popup will be closed in: "
|
336 |
+
msgstr ""
|
languages/itro-plugin-it_IT.mo
ADDED
Binary file
|
languages/itro-plugin-it_IT.po
ADDED
@@ -0,0 +1,495 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
msgid ""
|
2 |
+
msgstr ""
|
3 |
+
"Project-Id-Version: mc-plugin\n"
|
4 |
+
"POT-Creation-Date: 2013-05-07 17:10+0100\n"
|
5 |
+
"PO-Revision-Date: 2013-05-07 17:11+0100\n"
|
6 |
+
"Last-Translator: \n"
|
7 |
+
"Language-Team: ITRO Corp\n"
|
8 |
+
"Language: ITALIANO\n"
|
9 |
+
"MIME-Version: 1.0\n"
|
10 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
11 |
+
"Content-Transfer-Encoding: 8bit\n"
|
12 |
+
"X-Generator: Poedit 1.5.5\n"
|
13 |
+
"X-Poedit-KeywordsList: _;gettext;gettext_noop;_e\n"
|
14 |
+
"X-Poedit-Basepath: ../\n"
|
15 |
+
"X-Poedit-SearchPath-0: .\n"
|
16 |
+
|
17 |
+
#: admin/popup-admin.php:125
|
18 |
+
msgid "settings saved."
|
19 |
+
msgstr "Impostazioni salvate"
|
20 |
+
|
21 |
+
#: admin/popup-admin.php:132
|
22 |
+
msgid "I.T.RO. Popup Plugin - Settings"
|
23 |
+
msgstr "ITRO Popup Plugin - Impostazioni"
|
24 |
+
|
25 |
+
#: admin/popup-admin.php:144
|
26 |
+
msgid "General Popup Option:"
|
27 |
+
msgstr "Impostazioni Generali"
|
28 |
+
|
29 |
+
#: admin/popup-admin.php:151
|
30 |
+
msgid "SHOW ADVANCED SETTINGS"
|
31 |
+
msgstr "VISUALIZZA LE IMPOSTAZIONI AVANZATE"
|
32 |
+
|
33 |
+
#: admin/popup-admin.php:152
|
34 |
+
msgid "Display many other options"
|
35 |
+
msgstr "Visualizza moltre altre funzioni per utenti avanzati"
|
36 |
+
|
37 |
+
#: admin/popup-admin.php:157
|
38 |
+
msgid "DECIDE WHERE POPUP WILL BE DISPLAYED"
|
39 |
+
msgstr "DECIDERE DOVE VISUALIZZARE IL POPUP"
|
40 |
+
|
41 |
+
#: admin/popup-admin.php:159
|
42 |
+
msgid "Only selected pages"
|
43 |
+
msgstr "Solo pagine selezionate"
|
44 |
+
|
45 |
+
#: admin/popup-admin.php:159
|
46 |
+
msgid "Multiple choise with CTRL+Click or SHIFT+Arrow up or down"
|
47 |
+
msgstr "Scelta multipla con CTRL+Click o SHIFT+Freccia su o giu"
|
48 |
+
|
49 |
+
#: admin/popup-admin.php:160
|
50 |
+
msgid "All pages"
|
51 |
+
msgstr "Tutte le pagine"
|
52 |
+
|
53 |
+
#: admin/popup-admin.php:161
|
54 |
+
msgid "No page"
|
55 |
+
msgstr "Nessuna pagina"
|
56 |
+
|
57 |
+
#: admin/popup-admin.php:165
|
58 |
+
msgid "Blog homepage"
|
59 |
+
msgstr "Blog homepage"
|
60 |
+
|
61 |
+
#: admin/popup-admin.php:167
|
62 |
+
msgid ""
|
63 |
+
"If in your Settings->Reading you have set 'Front page displays: Your latest "
|
64 |
+
"posts' and want to display the popup in the home, check this box."
|
65 |
+
msgstr ""
|
66 |
+
"Se in Impostazioni->Lettura è stato selezionato 'La pagina iniziale mostra: "
|
67 |
+
"Gli ultimi articoli' e su vuole visualizzare il popup in home, sezionare la "
|
68 |
+
"casella."
|
69 |
+
|
70 |
+
#: admin/popup-admin.php:176
|
71 |
+
msgid "GENERAL SETTINGS"
|
72 |
+
msgstr "IMPOSTAZIONI GENERALI"
|
73 |
+
|
74 |
+
#: admin/popup-admin.php:179
|
75 |
+
msgid "Disable ESC key"
|
76 |
+
msgstr "Disabilitare tasto ESC"
|
77 |
+
|
78 |
+
#: admin/popup-admin.php:180
|
79 |
+
msgid ""
|
80 |
+
"If you set this option popup can not be closed with ESC button of keyboard."
|
81 |
+
msgstr ""
|
82 |
+
"Selezionando questa opzione il popup non può essere chiuso con il tasto ESC. "
|
83 |
+
"Si chiuderà automaticamente solo con il conto alla rovescia."
|
84 |
+
|
85 |
+
#: admin/popup-admin.php:185
|
86 |
+
msgid "Popup seconds:"
|
87 |
+
msgstr "Secondi popup:"
|
88 |
+
|
89 |
+
#: admin/popup-admin.php:185
|
90 |
+
msgid ""
|
91 |
+
"Set seconds until the popup automatically close. Set it to zero to disable "
|
92 |
+
"countdown."
|
93 |
+
msgstr ""
|
94 |
+
"Imposta i secondi prima che il popup si chiuda automaticamente. Lasciare a "
|
95 |
+
"zero per disabilitare il conto alla rovescia."
|
96 |
+
|
97 |
+
#: admin/popup-admin.php:193
|
98 |
+
msgid "Popup delay:"
|
99 |
+
msgstr "Ritardo popup:"
|
100 |
+
|
101 |
+
#: admin/popup-admin.php:193
|
102 |
+
msgid "Set seconds before the popup will be displayed"
|
103 |
+
msgstr "Imposta il tempo di ritardo prima che il popup venga visualizzato."
|
104 |
+
|
105 |
+
#: admin/popup-admin.php:201
|
106 |
+
msgid "Next visualization (hours):"
|
107 |
+
msgstr "Prossima visualizzazione (ore):"
|
108 |
+
|
109 |
+
#: admin/popup-admin.php:201
|
110 |
+
msgid ""
|
111 |
+
"Set time for the next visualization of popup, to prevent annoying repeated "
|
112 |
+
"visualizations, when someone visit pages"
|
113 |
+
msgstr ""
|
114 |
+
"Imposta il tempo prima che il popup appaia nuovamente, ad una nuova visita "
|
115 |
+
"della pagina. Serve ad evitare fastidiose ripetute visualizzazioni dello "
|
116 |
+
"stesso."
|
117 |
+
|
118 |
+
#: admin/popup-admin.php:207
|
119 |
+
msgid "Delete cookie"
|
120 |
+
msgstr "Elimina cookie"
|
121 |
+
|
122 |
+
#: admin/popup-admin.php:208
|
123 |
+
msgid "Cookie deleted!"
|
124 |
+
msgstr "Cookie eliminato!"
|
125 |
+
|
126 |
+
#: admin/popup-admin.php:213
|
127 |
+
msgid "Show countdown"
|
128 |
+
msgstr "Visualizza conto alla rovescia"
|
129 |
+
|
130 |
+
#: admin/popup-admin.php:214
|
131 |
+
msgid ""
|
132 |
+
"Show the countdown at the bottom of the popup which dispay the time before "
|
133 |
+
"popup will close. If is hidden, it run anyway."
|
134 |
+
msgstr ""
|
135 |
+
"Visualizza il conto alla rovescia prima che il popup si chiuda, in fondo "
|
136 |
+
"allo stesso. Anche se nascosto, funzionerà comunque."
|
137 |
+
|
138 |
+
#: admin/popup-admin.php:216
|
139 |
+
msgid "Countdown font color:"
|
140 |
+
msgstr "Colore font:"
|
141 |
+
|
142 |
+
#: admin/popup-admin.php:217
|
143 |
+
msgid "Select the countdown font color."
|
144 |
+
msgstr "Selezionare il colore del font del conto alla rovescia."
|
145 |
+
|
146 |
+
#: admin/popup-admin.php:221
|
147 |
+
msgid "POPUP ASPECT"
|
148 |
+
msgstr "ASPETTO POPUP"
|
149 |
+
|
150 |
+
#: admin/popup-admin.php:225
|
151 |
+
msgid "Popup width:"
|
152 |
+
msgstr "Larghezza Popup:"
|
153 |
+
|
154 |
+
#: admin/popup-admin.php:225
|
155 |
+
msgid ""
|
156 |
+
"Use the % to change width dinamically with the browser window , or px for "
|
157 |
+
"fixed dimension i.e: 30% or 200px"
|
158 |
+
msgstr ""
|
159 |
+
"Usare il % per far cambiare dinamicamente le dimensioni con il "
|
160 |
+
"ridimensionamento della finestra, o px per dimensioni fisse. es: 30% o 200px"
|
161 |
+
|
162 |
+
#: admin/popup-admin.php:239
|
163 |
+
msgid "Popup height:"
|
164 |
+
msgstr "Altezza Popup:"
|
165 |
+
|
166 |
+
#: admin/popup-admin.php:239
|
167 |
+
msgid "Select auto to adapt popup height to the content"
|
168 |
+
msgstr "Selezionare auto per far adattare l'altezza del popup al contenuto."
|
169 |
+
|
170 |
+
#: admin/popup-admin.php:253
|
171 |
+
msgid "Popup background color"
|
172 |
+
msgstr "Colore di sfondo:"
|
173 |
+
|
174 |
+
#: admin/popup-admin.php:255
|
175 |
+
msgid "Popup border color:"
|
176 |
+
msgstr "Colore bordo:"
|
177 |
+
|
178 |
+
#: admin/popup-admin.php:261
|
179 |
+
msgid "Popup border radius(px):"
|
180 |
+
msgstr "Rotondità bordo popup(px):"
|
181 |
+
|
182 |
+
#: admin/popup-admin.php:269
|
183 |
+
msgid "Popup border width(px):"
|
184 |
+
msgstr "Spessore bordo popup(px):"
|
185 |
+
|
186 |
+
#: admin/popup-admin.php:277
|
187 |
+
msgid "Popup padding(px):"
|
188 |
+
msgstr "Spaziatura interna (px):"
|
189 |
+
|
190 |
+
#: admin/popup-admin.php:284
|
191 |
+
msgid "BACKGROUND IMAGE"
|
192 |
+
msgstr "IMMAGINE DI SFONDO"
|
193 |
+
|
194 |
+
#: admin/popup-admin.php:285
|
195 |
+
msgid "Show image"
|
196 |
+
msgstr "Visualizza immagine"
|
197 |
+
|
198 |
+
#: admin/popup-admin.php:288
|
199 |
+
msgid "No background"
|
200 |
+
msgstr "Nessuno sfondo"
|
201 |
+
|
202 |
+
#: admin/popup-admin.php:291
|
203 |
+
msgid "Upload Image"
|
204 |
+
msgstr "Carica Immagine"
|
205 |
+
|
206 |
+
#: admin/popup-admin.php:294
|
207 |
+
msgid "Popup position:"
|
208 |
+
msgstr "Posizione del popup:"
|
209 |
+
|
210 |
+
#: admin/popup-admin.php:294
|
211 |
+
msgid ""
|
212 |
+
"Setting ABSOLUTE the popup will be static on the page. Setting FIXED it will "
|
213 |
+
"scroll with the page."
|
214 |
+
msgstr ""
|
215 |
+
"Impostare ABSOLUTE per avere il popup fisso sulla pagina, FIXED per farlo "
|
216 |
+
"scorrere con la pagina."
|
217 |
+
|
218 |
+
#: admin/popup-admin.php:306
|
219 |
+
msgid "Automatic top margin:"
|
220 |
+
msgstr "Margine superiore automatico"
|
221 |
+
|
222 |
+
#: admin/popup-admin.php:307
|
223 |
+
msgid ""
|
224 |
+
"The system will try to auto center the popup, in case of problem deselect "
|
225 |
+
"this option"
|
226 |
+
msgstr ""
|
227 |
+
"Il sistema proverà a centrare automaticamente il popup, in caso di problemi "
|
228 |
+
"deselezionare questa opzione."
|
229 |
+
|
230 |
+
#: admin/popup-admin.php:312
|
231 |
+
msgid "Popup top margin(px):"
|
232 |
+
msgstr "Margine superiore popup (px):"
|
233 |
+
|
234 |
+
#: admin/popup-admin.php:322
|
235 |
+
msgid "Background opacity"
|
236 |
+
msgstr "Opacità sfondo"
|
237 |
+
|
238 |
+
#: admin/popup-admin.php:322
|
239 |
+
msgid "Set the opacity of opaque background under the popup."
|
240 |
+
msgstr "Imposta l'opacità dello sfondo che compare dietro al popup."
|
241 |
+
|
242 |
+
#: admin/popup-admin.php:343
|
243 |
+
msgid "Opaque background color"
|
244 |
+
msgstr "Colore sfondo opaco:"
|
245 |
+
|
246 |
+
#: admin/popup-admin.php:353
|
247 |
+
msgid "Age restriction settings:"
|
248 |
+
msgstr "Sito con restrizioni di età:"
|
249 |
+
|
250 |
+
#: admin/popup-admin.php:357
|
251 |
+
msgid "Enable age validation"
|
252 |
+
msgstr "Abilita blocco età"
|
253 |
+
|
254 |
+
#: admin/popup-admin.php:360
|
255 |
+
msgid "Enter button text:"
|
256 |
+
msgstr "Testo bottone di ingresso:"
|
257 |
+
|
258 |
+
#: admin/popup-admin.php:361
|
259 |
+
msgid "i.e.: I AM OVER 18 - ENTER"
|
260 |
+
msgstr "es: HO PIÚ DI 18 ANNI - ENTRA"
|
261 |
+
|
262 |
+
#: admin/popup-admin.php:365
|
263 |
+
msgid "Enter button background color:"
|
264 |
+
msgstr "Colore di sfondo bottone di ingresso:"
|
265 |
+
|
266 |
+
#: admin/popup-admin.php:368
|
267 |
+
msgid "Enter button border color:"
|
268 |
+
msgstr "Colore bordo pulsante di ingresso:"
|
269 |
+
|
270 |
+
#: admin/popup-admin.php:371
|
271 |
+
msgid "Enter button font color:"
|
272 |
+
msgstr "Colore font pulsante di ingresso:"
|
273 |
+
|
274 |
+
#: admin/popup-admin.php:376
|
275 |
+
msgid "Leave button text:"
|
276 |
+
msgstr "Testo pulsante di allontanamento:"
|
277 |
+
|
278 |
+
#: admin/popup-admin.php:377
|
279 |
+
msgid "i.e.: I AM UNDER 18 - LEAVE"
|
280 |
+
msgstr "es: HO MENO DI 18 ANNI - ALLONTANAMI DAL SITO"
|
281 |
+
|
282 |
+
#: admin/popup-admin.php:379
|
283 |
+
msgid "Leave button url:"
|
284 |
+
msgstr "Url bottone di allontanamento:"
|
285 |
+
|
286 |
+
#: admin/popup-admin.php:380
|
287 |
+
msgid "i.e.: http://www.mysite.com/leave.html"
|
288 |
+
msgstr "es.: http://www.mysite.com/leave.html"
|
289 |
+
|
290 |
+
#: admin/popup-admin.php:384
|
291 |
+
msgid "Leave button background color:"
|
292 |
+
msgstr "Colore di sfondo pulsante di allontanamento:"
|
293 |
+
|
294 |
+
#: admin/popup-admin.php:387
|
295 |
+
msgid "Leave button border color:"
|
296 |
+
msgstr "Colore bordo pulsante allontanamento:"
|
297 |
+
|
298 |
+
#: admin/popup-admin.php:390
|
299 |
+
msgid "Leave button font color:"
|
300 |
+
msgstr "Colore font pulsante allontanamento:"
|
301 |
+
|
302 |
+
#: admin/popup-admin.php:402 admin/popup-admin.php:419
|
303 |
+
msgid "Preview page"
|
304 |
+
msgstr "Pagina di anteprima"
|
305 |
+
|
306 |
+
#: admin/popup-admin.php:410
|
307 |
+
msgid "Your text (or HTML code:)"
|
308 |
+
msgstr "Il tuo testo (o il codice HTML)"
|
309 |
+
|
310 |
+
#: admin/popup-admin.php:427
|
311 |
+
msgid "Like it? Offer us a coffee! ;-)"
|
312 |
+
msgstr "Il plugin ti piace? Offrici un caffè! ;-)"
|
313 |
+
|
314 |
+
#: admin/popup-admin.php:432
|
315 |
+
msgid "Make your donation"
|
316 |
+
msgstr "Fai la tua donazione"
|
317 |
+
|
318 |
+
#: admin/popup-admin.php:433
|
319 |
+
msgid "little donation"
|
320 |
+
msgstr "donazione piccola"
|
321 |
+
|
322 |
+
#: admin/popup-admin.php:434
|
323 |
+
msgid "right donation"
|
324 |
+
msgstr "donazione giusta"
|
325 |
+
|
326 |
+
#: admin/popup-admin.php:435
|
327 |
+
msgid "normal donation"
|
328 |
+
msgstr "donazione normale"
|
329 |
+
|
330 |
+
#: admin/popup-admin.php:436
|
331 |
+
msgid "good donation"
|
332 |
+
msgstr "donazione corposa"
|
333 |
+
|
334 |
+
#: admin/popup-admin.php:437
|
335 |
+
msgid "great donation"
|
336 |
+
msgstr "donazione grande"
|
337 |
+
|
338 |
+
#: admin/popup-admin.php:453
|
339 |
+
msgid "DELETE ALL DATA ON PLUGIN UNISTALL"
|
340 |
+
msgstr "ELIMINA TUTTI DATI ALLA DISINSTALLAZIONE DEL PLUGIN"
|
341 |
+
|
342 |
+
#: admin/popup-admin.php:454
|
343 |
+
msgid ""
|
344 |
+
"Check this box if you want to delete or maintain database tables. It is "
|
345 |
+
"usefull if you have to try to install again the plugin, without lost your "
|
346 |
+
"settings."
|
347 |
+
msgstr ""
|
348 |
+
"Selezionare questa casella se si desidera rimuovere tutte le tabelle dal "
|
349 |
+
"database."
|
350 |
+
|
351 |
+
#: templates/itro-popup-template.php:19
|
352 |
+
msgid "CLOSE"
|
353 |
+
msgstr "CHIUDI"
|
354 |
+
|
355 |
+
#: templates/itro-popup-template.php:20
|
356 |
+
msgid "This popup will be closed in: "
|
357 |
+
msgstr "Questo popup verrà chiuso tra:"
|
358 |
+
|
359 |
+
#~ msgid "thiny donation"
|
360 |
+
#~ msgstr "donazione minima"
|
361 |
+
|
362 |
+
#~ msgid "Any pages"
|
363 |
+
#~ msgstr "Nessuna pagina"
|
364 |
+
|
365 |
+
#~ msgid "Enable IE compatibility"
|
366 |
+
#~ msgstr "Usare la compatibilità per IE:"
|
367 |
+
|
368 |
+
#~ msgid ""
|
369 |
+
#~ "If your site is has visualization issues in Internet Explorer, check this "
|
370 |
+
#~ "box to solve the compatibility problem."
|
371 |
+
#~ msgstr ""
|
372 |
+
#~ "Se il tuo sito ha problemi di visualizzazione su Internet Explorer, "
|
373 |
+
#~ "spunta questa casella per risolvere il problema di compatibilità"
|
374 |
+
|
375 |
+
#~ msgid "Where are my old images?"
|
376 |
+
#~ msgstr "Dove sono le mie vecchie immagini?"
|
377 |
+
|
378 |
+
#~ msgid ""
|
379 |
+
#~ "If your plugin version is older than 3.4 here you can found your old "
|
380 |
+
#~ "uploaded images."
|
381 |
+
#~ msgstr ""
|
382 |
+
#~ "Se la versione installata del plugin è precedente alla 3.4 il link "
|
383 |
+
#~ "mostrerà le vecchie immagini caricate."
|
384 |
+
|
385 |
+
#~ msgid "Set hours until the popup will appear again"
|
386 |
+
#~ msgstr ""
|
387 |
+
#~ "Imposta quante ore passerano prima della prossima visualizzazione del "
|
388 |
+
#~ "popup."
|
389 |
+
|
390 |
+
#~ msgid ""
|
391 |
+
#~ "Select manually the top margin to vertical align the popup i.e.: 20px or "
|
392 |
+
#~ "10%"
|
393 |
+
#~ msgstr ""
|
394 |
+
#~ "Selezionare manualmente il margine superiore del popup per centrarlo es: "
|
395 |
+
#~ "10px o 20%"
|
396 |
+
|
397 |
+
#~ msgid "Unlockable popup"
|
398 |
+
#~ msgstr "Popup bloccato"
|
399 |
+
|
400 |
+
#~ msgid "Leave it blank to maintain the aspect ratio"
|
401 |
+
#~ msgstr "Lasciare bianco per mantenere le proporzioni dell'immagine."
|
402 |
+
|
403 |
+
#~ msgid "Age restricted page:"
|
404 |
+
#~ msgstr "Sito con restrizioni di età:"
|
405 |
+
|
406 |
+
#~ msgid "Select Image"
|
407 |
+
#~ msgstr "Carica Immagine"
|
408 |
+
|
409 |
+
#~ msgid "Text background color"
|
410 |
+
#~ msgstr "Colore di sfondo testo personalizzato:"
|
411 |
+
|
412 |
+
#~ msgid "Text border color:"
|
413 |
+
#~ msgstr "Colore bordo box del testo personalizzato:"
|
414 |
+
|
415 |
+
#~ msgid "Popup image settings:"
|
416 |
+
#~ msgstr "Impostazioni immagine popup:"
|
417 |
+
|
418 |
+
#~ msgid "Added image from direct url"
|
419 |
+
#~ msgstr "Aggiunta immagine dal link inserito."
|
420 |
+
|
421 |
+
#~ msgid "Added background from direct url"
|
422 |
+
#~ msgstr "Aggiunto sfondo dal link inserito."
|
423 |
+
|
424 |
+
#~ msgid "INSERTED IMAGE"
|
425 |
+
#~ msgstr "IMMAGINE DA INSERIRE"
|
426 |
+
|
427 |
+
#~ msgid "Image size (%):"
|
428 |
+
#~ msgstr "Grandezza immagine (%):"
|
429 |
+
|
430 |
+
#~ msgid "Insert pure number whithout %"
|
431 |
+
#~ msgstr "Inserire un numero puro senza il simbolo %"
|
432 |
+
|
433 |
+
#~ msgid "Use direck url:"
|
434 |
+
#~ msgstr "Inserisci url immagine:"
|
435 |
+
|
436 |
+
#~ msgid "Current image link:"
|
437 |
+
#~ msgstr "Link immagine attuale:"
|
438 |
+
|
439 |
+
#~ msgid "Upload and delete images"
|
440 |
+
#~ msgstr "Carica ed elimina le immagini"
|
441 |
+
|
442 |
+
#~ msgid "Overwrite"
|
443 |
+
#~ msgstr "Sovrascrivi"
|
444 |
+
|
445 |
+
#~ msgid "HELP US TO CONTINUE OUR DEVELOPING WORK. PLEASE DONATE!"
|
446 |
+
#~ msgstr "AIUTACI A CONTINUARE IL NOSTRO LAVORO. DONA ORA!"
|
447 |
+
|
448 |
+
#~ msgid "Warning file is too big, this may cause problems!"
|
449 |
+
#~ msgstr ""
|
450 |
+
#~ "Attenzione! Il file è troppo grande, questo può causare dei problemi."
|
451 |
+
|
452 |
+
#~ msgid "\" already exists. Please check the overwrite option"
|
453 |
+
#~ msgstr "\" esiste già. Perfavore selezione l'opzione sovrascrivi."
|
454 |
+
|
455 |
+
#~ msgid "\" successfully uploaded"
|
456 |
+
#~ msgstr "\" eliminato con successo."
|
457 |
+
|
458 |
+
#~ msgid "Any image selected"
|
459 |
+
#~ msgstr "Nessuna immagine selezionata."
|
460 |
+
|
461 |
+
#~ msgid " added in popup"
|
462 |
+
#~ msgstr "aggiunto al popup."
|
463 |
+
|
464 |
+
#~ msgid "Any background image used"
|
465 |
+
#~ msgstr "Nessuno sfondo selezionatao."
|
466 |
+
|
467 |
+
#~ msgid " selected as background"
|
468 |
+
#~ msgstr "selezionato come sfondo"
|
469 |
+
|
470 |
+
#~ msgid "Any image selected. Please select one."
|
471 |
+
#~ msgstr "Nessuna immagine selezionata. Selezionarne una."
|
472 |
+
|
473 |
+
#~ msgid "\" successfully deleted"
|
474 |
+
#~ msgstr "\" eliminato con successo."
|
475 |
+
|
476 |
+
#~ msgid "Error, can't delete image."
|
477 |
+
#~ msgstr "Errore, impossibile eleiminare l'immagine."
|
478 |
+
|
479 |
+
#~ msgid "UPLOAD AND DELETE IMAGES"
|
480 |
+
#~ msgstr "CARICA ED ELIMINA LE IMMAGINI"
|
481 |
+
|
482 |
+
#~ msgid "Save"
|
483 |
+
#~ msgstr "Salva"
|
484 |
+
|
485 |
+
#~ msgid "Select"
|
486 |
+
#~ msgstr "Seleziona"
|
487 |
+
|
488 |
+
#~ msgid "RGB code i.e.: rgb(255,0,0) HEX code i.e.: #FF0000"
|
489 |
+
#~ msgstr "codice RGB es: rgb(255,0,0) codice HEX es: #FF0000"
|
490 |
+
|
491 |
+
#~ msgid " selected"
|
492 |
+
#~ msgstr " selezionato."
|
493 |
+
|
494 |
+
#~ msgid "Settings"
|
495 |
+
#~ msgstr "Impostazioni"
|
mc-main.php
ADDED
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Copyright 2013 I.T.RO.® (email : support.itro@live.com)
|
4 |
+
This file is part of ITRO Popup Plugin.
|
5 |
+
|
6 |
+
Plugin Name: ITRO Popup Plugin
|
7 |
+
Plugin URI: http://www.itro.eu/
|
8 |
+
Description: EN - Show a perfecly centered customizable popup and a popup-system for age-restricted site and allow to insert own HTML code. IT - Visualizza un popup perfettamente centrato e personalizzabile con possibile blocco per i siti con restrizioni di eta' e permette di inserire il proprio codice HTML.
|
9 |
+
Author: I.T.RO.(c) Sez. Informatica
|
10 |
+
E-mail: support.itro@live.com
|
11 |
+
Version: 4.3
|
12 |
+
Author URI: http://www.itro.eu/
|
13 |
+
*/
|
14 |
+
|
15 |
+
global $ITRO_VER;
|
16 |
+
$ITRO_VER = 4.3;
|
17 |
+
define('itroLocalPath', __DIR__);
|
18 |
+
define('itroPath', plugins_url() . '/itro-popup/');
|
19 |
+
define('itroImages', plugins_url() . '/itro-popup/images/');
|
20 |
+
|
21 |
+
include_once ('functions/core-function.php');
|
22 |
+
include_once ('functions/database-function.php');
|
23 |
+
include_once ('functions/js-function.php');
|
24 |
+
include_once ('templates/itro-popup-template.php');
|
25 |
+
include_once ('css/itro-style.php');
|
26 |
+
load_plugin_textdomain('itro-plugin', false, basename( dirname( __FILE__ ) ) . '/languages' );
|
27 |
+
|
28 |
+
global $post;
|
29 |
+
|
30 |
+
register_activation_hook( __FILE__, 'itro_init' );
|
31 |
+
|
32 |
+
function itro_admin_scripts()
|
33 |
+
{
|
34 |
+
wp_enqueue_script('media-upload');
|
35 |
+
wp_enqueue_script('thickbox');
|
36 |
+
wp_enqueue_script('jquery-effects-highlight');
|
37 |
+
}
|
38 |
+
|
39 |
+
function itro_load_admin_styles()
|
40 |
+
{
|
41 |
+
wp_enqueue_style('thickbox');
|
42 |
+
}
|
43 |
+
|
44 |
+
function itro_load_script()
|
45 |
+
{
|
46 |
+
wp_enqueue_script('jquery');
|
47 |
+
}
|
48 |
+
|
49 |
+
add_action( 'wp_footer','itro_display_popup');
|
50 |
+
add_action( 'wp_enqueue_scripts' , 'itro_load_script' );
|
51 |
+
|
52 |
+
add_action('admin_head', 'itro_admin_js');
|
53 |
+
add_action('admin_print_scripts', 'itro_admin_scripts');
|
54 |
+
add_action('admin_print_styles', 'itro_load_admin_styles');
|
55 |
+
add_action('admin_menu', 'itro_plugin_menu');
|
56 |
+
|
57 |
+
?>
|
readme.txt
ADDED
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== ITRO Popup Plugin ===
|
2 |
+
Contributors: ITRO
|
3 |
+
Donate link: http://www.itro.eu/index.php/donate/
|
4 |
+
Tags: popup, age, restriction, block, violence, age validation, adult, adult content, content warning, wp editor, fancy box, fancy popup, custom popup, advertising popup, ads, ads popup, pop-up, lightbox, lightbox popup,
|
5 |
+
Requires at least: 3.0.1
|
6 |
+
Tested up to: 3.5.1
|
7 |
+
Stable tag: 4.3
|
8 |
+
License: GPLv3 or later
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
+
|
11 |
+
ITRO Popup display a popup to your WP site:
|
12 |
+
* Age validation for adult-content site
|
13 |
+
* Fully customizable with WP Post Editor
|
14 |
+
* Very easy to use
|
15 |
+
|
16 |
+
== Description ==
|
17 |
+
|
18 |
+
ITRO Popup is a very lightweight Plugin for Wordpress which allow users to add a fully-customizable and perfectly centered popup.
|
19 |
+
It has a very user-friendly interface, which allow Wordpress users to easily modify all settings needed for a popup, without coding.
|
20 |
+
With "Age restricted site" option, the popup block the navigation (for age validation) until the user declare that is above the local country legal age.
|
21 |
+
It is useful for adult content Wordpress site (tobacco & alcohol selling, violence, bad language, etc...). The leave and the enter button
|
22 |
+
are separately customizable. Is embedded the Wordpress editor to simplify input whatever you want in your popup.
|
23 |
+
Popup can be rendered unlockable with the option "Unlockable popup" so it will close only with countdown.
|
24 |
+
This plugin is basic-user oriented, no code knowledge is required.
|
25 |
+
Simply the best Wordpress popup plugin!
|
26 |
+
|
27 |
+
FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itro.eu/?page_id=390)
|
28 |
+
|
29 |
+
DONATE NOW! - HELP US TO DEVELOP FOR YOU! [DONATE NOW](http://www.itro.eu/?page_id=396)
|
30 |
+
|
31 |
+
FEATURES
|
32 |
+
|
33 |
+
* Pretty fade-in and fade-out animation.
|
34 |
+
* Need to remove plugin and save data? It is possible!
|
35 |
+
* Selcted pages where you want to display the popup, by a scrollable list. NO SHORTCODES NEEDED!
|
36 |
+
* Fully translated in Italian. Ready for multilingual translation.
|
37 |
+
* Close popup with ESC button (not with "age restricted option" checked).
|
38 |
+
* Automatic popup centering in browser page.
|
39 |
+
* Fully and easy customizable aspect (background, border, color, etc...).
|
40 |
+
* Settable countdown for automatic closing.
|
41 |
+
* Settable coockie expiration time for the next popup visualization.
|
42 |
+
* Age validation for adult-content site.
|
43 |
+
* Custom text to display whatever you want with WP editor.
|
44 |
+
* All great explaned by tips in admin pannel.
|
45 |
+
* Great and fast support for all your problem with our popup plugin.
|
46 |
+
* All in a very easy way to use!
|
47 |
+
|
48 |
+
Any suggestions for new features implementation which you need?
|
49 |
+
Need something for your interest or your business?
|
50 |
+
Email to support.itro@live.com
|
51 |
+
|
52 |
+
== Installation ==
|
53 |
+
|
54 |
+
FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itro.eu/?page_id=390)
|
55 |
+
|
56 |
+
DONATE NOW! - HELP US TO DEVELOP FOR YOU! [DONATE NOW](http://www.itro.eu/?page_id=396)
|
57 |
+
|
58 |
+
1. Unzip `itro-plugin.zip` to the `/wp-content/plugins/` directory or select it by "Add new" in the 'Plugins' menu in WordPress
|
59 |
+
2. Activate the plugin through the 'Plugins' menu in WordPress
|
60 |
+
3. Go to "Settings->ITRO Popup" in the admin menu
|
61 |
+
4. Enjoy
|
62 |
+
|
63 |
+
== Frequently Asked Questions ==
|
64 |
+
|
65 |
+
FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itro.eu/?page_id=390)
|
66 |
+
|
67 |
+
DONATE NOW! - HELP US TO DEVELOP FOR YOU! [DONATE NOW](http://www.itro.eu/?page_id=396)
|
68 |
+
|
69 |
+
== Screenshots ==
|
70 |
+
|
71 |
+
FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itro.eu/?page_id=390)
|
72 |
+
|
73 |
+
DONATE NOW! - HELP US TO DEVELOP FOR YOU! [DONATE NOW](http://www.itro.eu/?page_id=396)
|
74 |
+
|
75 |
+
no screenshot avaliable
|
76 |
+
|
77 |
+
== Changelog ==
|
78 |
+
= 4.3 =
|
79 |
+
Heavy bugs fixed. With WP_DEBUG true plugin generated a lot of errors.
|
80 |
+
|
81 |
+
= 4.2.2 =
|
82 |
+
Fixed bug on activation and deactivation: the popup content and setting now don't reset.
|
83 |
+
|
84 |
+
= 4.2.1 =
|
85 |
+
Border width bug fixed. Enter button bug fixed. Padding bug fixed. Database function changed for better compatibility
|
86 |
+
|
87 |
+
= 4.2 =
|
88 |
+
Age validation cookie bug on refresh page fixed. Added delete cookie button. Resolved OpenGraph metatag bug.
|
89 |
+
New hook for better compatibility. Cookie bug on preview page fixed. Added padding.
|
90 |
+
|
91 |
+
= 4.1 =
|
92 |
+
Heavy bug fixed. Header sent error fixed, blog homepage fixed. Improved user interface. Font style and size errors fixed.
|
93 |
+
|
94 |
+
= 4.0 =
|
95 |
+
User interface improved, now can be selected only basic settings. Age validation bug fixed, now works right.
|
96 |
+
Added border radius and width. Minor bugs fixed.
|
97 |
+
|
98 |
+
= 3.6.8 =
|
99 |
+
IE compatibility removed.
|
100 |
+
|
101 |
+
= 3.6.7 =
|
102 |
+
header bug fixed.
|
103 |
+
|
104 |
+
= 3.6.6 =
|
105 |
+
Improved themes compatibility. Minor bug fixed.
|
106 |
+
|
107 |
+
= 3.6.5 =
|
108 |
+
Added fade-in and fade out animation.
|
109 |
+
|
110 |
+
= 3.6.4 =
|
111 |
+
Big bug fixed: broken media blank page resolved!
|
112 |
+
|
113 |
+
= 3.6.3 =
|
114 |
+
Now user can unistall plugin whithout delete settings.
|
115 |
+
|
116 |
+
= 3.6.2 =
|
117 |
+
Include error fixed.
|
118 |
+
|
119 |
+
= 3.6.1 =
|
120 |
+
minor bugs fixed.
|
121 |
+
|
122 |
+
= 3.6 =
|
123 |
+
New user interface, with slide-bar control. Customizable opacity and color of opaque background behind
|
124 |
+
the pop-up.
|
125 |
+
|
126 |
+
= 3.5.1 =
|
127 |
+
Popup can be rendered unlockable. Added time delay before popup will be displayed. If countdown is hidden
|
128 |
+
it run anyway.
|
129 |
+
|
130 |
+
= 3.5 =
|
131 |
+
WP editor visualization bug fixed. Better visualization for countdown and close cross. UI more friendly.
|
132 |
+
|
133 |
+
= 3.4 =
|
134 |
+
Added media button in WP editor. Integrated WP media uploading for images. WP editor paragraph bug fixed.
|
135 |
+
Now popup can be displayed in blog homepage. Minor bug fixed. Now content can scroll vertically.
|
136 |
+
|
137 |
+
= 3.3 =
|
138 |
+
Added WP editor to custom text field. Restored preview button, now it open a new window whith popup integrated
|
139 |
+
in the theme. Uninstall bug solved, now clear all data and tables.
|
140 |
+
|
141 |
+
= 3.2 =
|
142 |
+
Big uploaded images truble solved! Now when you update the plugin your uploaded images remain in your site
|
143 |
+
(is not necessary to upload everything every time). Automatic centering now works perfectly. Custom text
|
144 |
+
border bug fixed.
|
145 |
+
|
146 |
+
= 3.1 =
|
147 |
+
Listing image bug fixed.
|
148 |
+
|
149 |
+
= 3.0 =
|
150 |
+
New user interface, minor bug fixed, new color picker (thanks to Jan Odvarko for jscolor), new features
|
151 |
+
and customizations (background image, bg text color, etc...)
|
152 |
+
|
153 |
+
= 2.2.1 =
|
154 |
+
Preview bug fixed. Now countdown works right.
|
155 |
+
|
156 |
+
= 2.2 =
|
157 |
+
Now automatic centering works great. Important custom HTML cod fixed.
|
158 |
+
|
159 |
+
= 2.1.6 =
|
160 |
+
Now automatic centering works great.
|
161 |
+
|
162 |
+
= 2.1.5 =
|
163 |
+
Important cookie bug fxed and some js bug fixed.
|
164 |
+
|
165 |
+
= 2.1.4 =
|
166 |
+
Cookie bug fixed.
|
167 |
+
|
168 |
+
= 2.1.3 =
|
169 |
+
Italian translation error fixed.
|
170 |
+
|
171 |
+
= 2.1.2 =
|
172 |
+
Preview refresh bug fixed. Added the possibility to select manually the top margin, in case of problem.
|
173 |
+
|
174 |
+
= 2.1.1 =
|
175 |
+
preview bug fixed.
|
176 |
+
|
177 |
+
= 2.1 =
|
178 |
+
Minor bug fixed. Internet Explorer compability fixed.
|
179 |
+
|
180 |
+
= 2.0 =
|
181 |
+
Important bug fixed. Very important function implemented. Now user can select the single page where
|
182 |
+
the popup will be displayed. Now position can be selected between "Absolute" and "Fixed".
|
183 |
+
|
184 |
+
= 1.0.3 =
|
185 |
+
important bug fixed: now custom HTML code works right.
|
186 |
+
|
187 |
+
= 1.0.2 =
|
188 |
+
bugs fixed;
|
189 |
+
now popup is better centered;
|
190 |
+
added the possibility to insert a direct url for the popup image.
|
191 |
+
|
192 |
+
= 1.0.1 =
|
193 |
+
bug fixed: color table now works in admin pannel.
|
194 |
+
|
195 |
+
= 1.0 =
|
196 |
+
First released version.
|
197 |
+
|
198 |
+
== Upgrade Notice ==
|
199 |
+
Heavy bugs fixed. With WP_DEBUG true plugin generated a lot of errors.
|
200 |
+
|
201 |
+
== Notes ==
|
202 |
+
FOR TUTORIAL AND FAQ VISIT THE OFFICIAL SITE [CLICK HERE!](http://www.itro.eu/?page_id=390)
|
203 |
+
|
204 |
+
DONATE NOW! - HELP US TO DEVELOP FOR YOU! [DONATE NOW](http://www.itro.eu/?page_id=396)
|
205 |
+
|
206 |
+
We accept all kind of suggestion.
|
207 |
+
Thanks to Jan Odvarko for jscolor: http://jscolor.com/
|
208 |
+
|
209 |
+
== Features ==
|
210 |
+
|
211 |
+
* Pretty fade-in and fade-out animation.
|
212 |
+
* Need to remove plugin and save data? It is possible!
|
213 |
+
* Can be multiple selcted pages where user want to display the popup. NO SHORTCODES NEEDED!
|
214 |
+
* Fully translated in Italian. Ready for multilingual translation.
|
215 |
+
* Close popup with ESC button (not when "age restricted option" is checked).
|
216 |
+
* Perfectly centered popup, also with resized windows.
|
217 |
+
* Fully and easy customizable aspect (background, border, color, etc...).
|
218 |
+
* Settable countdown for automatic closing.
|
219 |
+
* Settable coockie expiration time for the next popup visualization.
|
220 |
+
* Add age validation for adult-content site.
|
221 |
+
* Custom text to display whatever you want with WP editor.
|
222 |
+
* All great explaned by tips in admin pannel.
|
223 |
+
* All in a very easy way to use!
|
scripts/jscolor/arrow.gif
ADDED
Binary file
|
scripts/jscolor/cross.gif
ADDED
Binary file
|
scripts/jscolor/demo.html
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<html>
|
2 |
+
<head>
|
3 |
+
<title>jscolor demo</title>
|
4 |
+
</head>
|
5 |
+
<body>
|
6 |
+
|
7 |
+
<script type="text/javascript" src="jscolor.js"></script>
|
8 |
+
|
9 |
+
Click here: <input class="color" value="66ff00">
|
10 |
+
|
11 |
+
</body>
|
12 |
+
</html>
|
scripts/jscolor/hs.png
ADDED
Binary file
|
scripts/jscolor/hv.png
ADDED
Binary file
|
scripts/jscolor/jscolor.js
ADDED
@@ -0,0 +1,953 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/**
|
2 |
+
* jscolor, JavaScript Color Picker
|
3 |
+
*
|
4 |
+
* @version 1.4.0
|
5 |
+
* @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
|
6 |
+
* @author Jan Odvarko, http://odvarko.cz
|
7 |
+
* @created 2008-06-15
|
8 |
+
* @updated 2012-07-06
|
9 |
+
* @link http://jscolor.com
|
10 |
+
*/
|
11 |
+
|
12 |
+
|
13 |
+
var jscolor = {
|
14 |
+
|
15 |
+
|
16 |
+
dir : '', // location of jscolor directory (leave empty to autodetect)
|
17 |
+
bindClass : 'color', // class name
|
18 |
+
binding : true, // automatic binding via <input class="...">
|
19 |
+
preloading : true, // use image preloading?
|
20 |
+
|
21 |
+
|
22 |
+
install : function() {
|
23 |
+
jscolor.addEvent(window, 'load', jscolor.init);
|
24 |
+
},
|
25 |
+
|
26 |
+
|
27 |
+
init : function() {
|
28 |
+
if(jscolor.binding) {
|
29 |
+
jscolor.bind();
|
30 |
+
}
|
31 |
+
if(jscolor.preloading) {
|
32 |
+
jscolor.preload();
|
33 |
+
}
|
34 |
+
},
|
35 |
+
|
36 |
+
|
37 |
+
getDir : function() {
|
38 |
+
if(!jscolor.dir) {
|
39 |
+
var detected = jscolor.detectDir();
|
40 |
+
jscolor.dir = detected!==false ? detected : 'jscolor/';
|
41 |
+
}
|
42 |
+
return jscolor.dir;
|
43 |
+
},
|
44 |
+
|
45 |
+
|
46 |
+
detectDir : function() {
|
47 |
+
var base = location.href;
|
48 |
+
|
49 |
+
var e = document.getElementsByTagName('base');
|
50 |
+
for(var i=0; i<e.length; i+=1) {
|
51 |
+
if(e[i].href) { base = e[i].href; }
|
52 |
+
}
|
53 |
+
|
54 |
+
var e = document.getElementsByTagName('script');
|
55 |
+
for(var i=0; i<e.length; i+=1) {
|
56 |
+
if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
|
57 |
+
var src = new jscolor.URI(e[i].src);
|
58 |
+
var srcAbs = src.toAbsolute(base);
|
59 |
+
srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename
|
60 |
+
srcAbs.query = null;
|
61 |
+
srcAbs.fragment = null;
|
62 |
+
return srcAbs.toString();
|
63 |
+
}
|
64 |
+
}
|
65 |
+
return false;
|
66 |
+
},
|
67 |
+
|
68 |
+
|
69 |
+
bind : function() {
|
70 |
+
var matchClass = new RegExp('(^|\\s)('+jscolor.bindClass+')\\s*(\\{[^}]*\\})?', 'i');
|
71 |
+
var e = document.getElementsByTagName('input');
|
72 |
+
for(var i=0; i<e.length; i+=1) {
|
73 |
+
var m;
|
74 |
+
if(!e[i].color && e[i].className && (m = e[i].className.match(matchClass))) {
|
75 |
+
var prop = {};
|
76 |
+
if(m[3]) {
|
77 |
+
try {
|
78 |
+
prop = (new Function ('return (' + m[3] + ')'))();
|
79 |
+
} catch(eInvalidProp) {}
|
80 |
+
}
|
81 |
+
e[i].color = new jscolor.color(e[i], prop);
|
82 |
+
}
|
83 |
+
}
|
84 |
+
},
|
85 |
+
|
86 |
+
|
87 |
+
preload : function() {
|
88 |
+
for(var fn in jscolor.imgRequire) {
|
89 |
+
if(jscolor.imgRequire.hasOwnProperty(fn)) {
|
90 |
+
jscolor.loadImage(fn);
|
91 |
+
}
|
92 |
+
}
|
93 |
+
},
|
94 |
+
|
95 |
+
|
96 |
+
images : {
|
97 |
+
pad : [ 181, 101 ],
|
98 |
+
sld : [ 16, 101 ],
|
99 |
+
cross : [ 15, 15 ],
|
100 |
+
arrow : [ 7, 11 ]
|
101 |
+
},
|
102 |
+
|
103 |
+
|
104 |
+
imgRequire : {},
|
105 |
+
imgLoaded : {},
|
106 |
+
|
107 |
+
|
108 |
+
requireImage : function(filename) {
|
109 |
+
jscolor.imgRequire[filename] = true;
|
110 |
+
},
|
111 |
+
|
112 |
+
|
113 |
+
loadImage : function(filename) {
|
114 |
+
if(!jscolor.imgLoaded[filename]) {
|
115 |
+
jscolor.imgLoaded[filename] = new Image();
|
116 |
+
jscolor.imgLoaded[filename].src = jscolor.getDir()+filename;
|
117 |
+
}
|
118 |
+
},
|
119 |
+
|
120 |
+
|
121 |
+
fetchElement : function(mixed) {
|
122 |
+
return typeof mixed === 'string' ? document.getElementById(mixed) : mixed;
|
123 |
+
},
|
124 |
+
|
125 |
+
|
126 |
+
addEvent : function(el, evnt, func) {
|
127 |
+
if(el.addEventListener) {
|
128 |
+
el.addEventListener(evnt, func, false);
|
129 |
+
} else if(el.attachEvent) {
|
130 |
+
el.attachEvent('on'+evnt, func);
|
131 |
+
}
|
132 |
+
},
|
133 |
+
|
134 |
+
|
135 |
+
fireEvent : function(el, evnt) {
|
136 |
+
if(!el) {
|
137 |
+
return;
|
138 |
+
}
|
139 |
+
if(document.createEvent) {
|
140 |
+
var ev = document.createEvent('HTMLEvents');
|
141 |
+
ev.initEvent(evnt, true, true);
|
142 |
+
el.dispatchEvent(ev);
|
143 |
+
} else if(document.createEventObject) {
|
144 |
+
var ev = document.createEventObject();
|
145 |
+
el.fireEvent('on'+evnt, ev);
|
146 |
+
} else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5)
|
147 |
+
el['on'+evnt]();
|
148 |
+
}
|
149 |
+
},
|
150 |
+
|
151 |
+
|
152 |
+
getElementPos : function(e) {
|
153 |
+
var e1=e, e2=e;
|
154 |
+
var x=0, y=0;
|
155 |
+
if(e1.offsetParent) {
|
156 |
+
do {
|
157 |
+
x += e1.offsetLeft;
|
158 |
+
y += e1.offsetTop;
|
159 |
+
} while(e1 = e1.offsetParent);
|
160 |
+
}
|
161 |
+
while((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') {
|
162 |
+
x -= e2.scrollLeft;
|
163 |
+
y -= e2.scrollTop;
|
164 |
+
}
|
165 |
+
return [x, y];
|
166 |
+
},
|
167 |
+
|
168 |
+
|
169 |
+
getElementSize : function(e) {
|
170 |
+
return [e.offsetWidth, e.offsetHeight];
|
171 |
+
},
|
172 |
+
|
173 |
+
|
174 |
+
getRelMousePos : function(e) {
|
175 |
+
var x = 0, y = 0;
|
176 |
+
if (!e) { e = window.event; }
|
177 |
+
if (typeof e.offsetX === 'number') {
|
178 |
+
x = e.offsetX;
|
179 |
+
y = e.offsetY;
|
180 |
+
} else if (typeof e.layerX === 'number') {
|
181 |
+
x = e.layerX;
|
182 |
+
y = e.layerY;
|
183 |
+
}
|
184 |
+
return { x: x, y: y };
|
185 |
+
},
|
186 |
+
|
187 |
+
|
188 |
+
getViewPos : function() {
|
189 |
+
if(typeof window.pageYOffset === 'number') {
|
190 |
+
return [window.pageXOffset, window.pageYOffset];
|
191 |
+
} else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
|
192 |
+
return [document.body.scrollLeft, document.body.scrollTop];
|
193 |
+
} else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
|
194 |
+
return [document.documentElement.scrollLeft, document.documentElement.scrollTop];
|
195 |
+
} else {
|
196 |
+
return [0, 0];
|
197 |
+
}
|
198 |
+
},
|
199 |
+
|
200 |
+
|
201 |
+
getViewSize : function() {
|
202 |
+
if(typeof window.innerWidth === 'number') {
|
203 |
+
return [window.innerWidth, window.innerHeight];
|
204 |
+
} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
|
205 |
+
return [document.body.clientWidth, document.body.clientHeight];
|
206 |
+
} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
|
207 |
+
return [document.documentElement.clientWidth, document.documentElement.clientHeight];
|
208 |
+
} else {
|
209 |
+
return [0, 0];
|
210 |
+
}
|
211 |
+
},
|
212 |
+
|
213 |
+
|
214 |
+
URI : function(uri) { // See RFC3986
|
215 |
+
|
216 |
+
this.scheme = null;
|
217 |
+
this.authority = null;
|
218 |
+
this.path = '';
|
219 |
+
this.query = null;
|
220 |
+
this.fragment = null;
|
221 |
+
|
222 |
+
this.parse = function(uri) {
|
223 |
+
var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);
|
224 |
+
this.scheme = m[3] ? m[2] : null;
|
225 |
+
this.authority = m[5] ? m[6] : null;
|
226 |
+
this.path = m[7];
|
227 |
+
this.query = m[9] ? m[10] : null;
|
228 |
+
this.fragment = m[12] ? m[13] : null;
|
229 |
+
return this;
|
230 |
+
};
|
231 |
+
|
232 |
+
this.toString = function() {
|
233 |
+
var result = '';
|
234 |
+
if(this.scheme !== null) { result = result + this.scheme + ':'; }
|
235 |
+
if(this.authority !== null) { result = result + '//' + this.authority; }
|
236 |
+
if(this.path !== null) { result = result + this.path; }
|
237 |
+
if(this.query !== null) { result = result + '?' + this.query; }
|
238 |
+
if(this.fragment !== null) { result = result + '#' + this.fragment; }
|
239 |
+
return result;
|
240 |
+
};
|
241 |
+
|
242 |
+
this.toAbsolute = function(base) {
|
243 |
+
var base = new jscolor.URI(base);
|
244 |
+
var r = this;
|
245 |
+
var t = new jscolor.URI;
|
246 |
+
|
247 |
+
if(base.scheme === null) { return false; }
|
248 |
+
|
249 |
+
if(r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) {
|
250 |
+
r.scheme = null;
|
251 |
+
}
|
252 |
+
|
253 |
+
if(r.scheme !== null) {
|
254 |
+
t.scheme = r.scheme;
|
255 |
+
t.authority = r.authority;
|
256 |
+
t.path = removeDotSegments(r.path);
|
257 |
+
t.query = r.query;
|
258 |
+
} else {
|
259 |
+
if(r.authority !== null) {
|
260 |
+
t.authority = r.authority;
|
261 |
+
t.path = removeDotSegments(r.path);
|
262 |
+
t.query = r.query;
|
263 |
+
} else {
|
264 |
+
if(r.path === '') {
|
265 |
+
t.path = base.path;
|
266 |
+
if(r.query !== null) {
|
267 |
+
t.query = r.query;
|
268 |
+
} else {
|
269 |
+
t.query = base.query;
|
270 |
+
}
|
271 |
+
} else {
|
272 |
+
if(r.path.substr(0,1) === '/') {
|
273 |
+
t.path = removeDotSegments(r.path);
|
274 |
+
} else {
|
275 |
+
if(base.authority !== null && base.path === '') {
|
276 |
+
t.path = '/'+r.path;
|
277 |
+
} else {
|
278 |
+
t.path = base.path.replace(/[^\/]+$/,'')+r.path;
|
279 |
+
}
|
280 |
+
t.path = removeDotSegments(t.path);
|
281 |
+
}
|
282 |
+
t.query = r.query;
|
283 |
+
}
|
284 |
+
t.authority = base.authority;
|
285 |
+
}
|
286 |
+
t.scheme = base.scheme;
|
287 |
+
}
|
288 |
+
t.fragment = r.fragment;
|
289 |
+
|
290 |
+
return t;
|
291 |
+
};
|
292 |
+
|
293 |
+
function removeDotSegments(path) {
|
294 |
+
var out = '';
|
295 |
+
while(path) {
|
296 |
+
if(path.substr(0,3)==='../' || path.substr(0,2)==='./') {
|
297 |
+
path = path.replace(/^\.+/,'').substr(1);
|
298 |
+
} else if(path.substr(0,3)==='/./' || path==='/.') {
|
299 |
+
path = '/'+path.substr(3);
|
300 |
+
} else if(path.substr(0,4)==='/../' || path==='/..') {
|
301 |
+
path = '/'+path.substr(4);
|
302 |
+
out = out.replace(/\/?[^\/]*$/, '');
|
303 |
+
} else if(path==='.' || path==='..') {
|
304 |
+
path = '';
|
305 |
+
} else {
|
306 |
+
var rm = path.match(/^\/?[^\/]*/)[0];
|
307 |
+
path = path.substr(rm.length);
|
308 |
+
out = out + rm;
|
309 |
+
}
|
310 |
+
}
|
311 |
+
return out;
|
312 |
+
}
|
313 |
+
|
314 |
+
if(uri) {
|
315 |
+
this.parse(uri);
|
316 |
+
}
|
317 |
+
|
318 |
+
},
|
319 |
+
|
320 |
+
|
321 |
+
/*
|
322 |
+
* Usage example:
|
323 |
+
* var myColor = new jscolor.color(myInputElement)
|
324 |
+
*/
|
325 |
+
|
326 |
+
color : function(target, prop) {
|
327 |
+
|
328 |
+
|
329 |
+
this.required = false; // refuse empty values?
|
330 |
+
this.adjust = true; // adjust value to uniform notation?
|
331 |
+
this.hash = true; // prefix color with # symbol?
|
332 |
+
this.caps = true; // uppercase?
|
333 |
+
this.slider = true; // show the value/saturation slider?
|
334 |
+
this.valueElement = target; // value holder
|
335 |
+
this.styleElement = target; // where to reflect current color
|
336 |
+
this.onImmediateChange = null; // onchange callback (can be either string or function)
|
337 |
+
this.hsv = [0, 0, 1]; // read-only 0-6, 0-1, 0-1
|
338 |
+
this.rgb = [1, 1, 1]; // read-only 0-1, 0-1, 0-1
|
339 |
+
this.minH = 0; // read-only 0-6
|
340 |
+
this.maxH = 6; // read-only 0-6
|
341 |
+
this.minS = 0; // read-only 0-1
|
342 |
+
this.maxS = 1; // read-only 0-1
|
343 |
+
this.minV = 0; // read-only 0-1
|
344 |
+
this.maxV = 1; // read-only 0-1
|
345 |
+
|
346 |
+
this.pickerOnfocus = true; // display picker on focus?
|
347 |
+
this.pickerMode = 'HSV'; // HSV | HVS
|
348 |
+
this.pickerPosition = 'bottom'; // left | right | top | bottom
|
349 |
+
this.pickerSmartPosition = true; // automatically adjust picker position when necessary
|
350 |
+
this.pickerButtonHeight = 20; // px
|
351 |
+
this.pickerClosable = false;
|
352 |
+
this.pickerCloseText = 'Close';
|
353 |
+
this.pickerButtonColor = 'ButtonText'; // px
|
354 |
+
this.pickerFace = 10; // px
|
355 |
+
this.pickerFaceColor = 'ThreeDFace'; // CSS color
|
356 |
+
this.pickerBorder = 1; // px
|
357 |
+
this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color
|
358 |
+
this.pickerInset = 1; // px
|
359 |
+
this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color
|
360 |
+
this.pickerZIndex = 10000;
|
361 |
+
|
362 |
+
|
363 |
+
for(var p in prop) {
|
364 |
+
if(prop.hasOwnProperty(p)) {
|
365 |
+
this[p] = prop[p];
|
366 |
+
}
|
367 |
+
}
|
368 |
+
|
369 |
+
|
370 |
+
this.hidePicker = function() {
|
371 |
+
if(isPickerOwner()) {
|
372 |
+
removePicker();
|
373 |
+
}
|
374 |
+
};
|
375 |
+
|
376 |
+
|
377 |
+
this.showPicker = function() {
|
378 |
+
if(!isPickerOwner()) {
|
379 |
+
var tp = jscolor.getElementPos(target); // target pos
|
380 |
+
var ts = jscolor.getElementSize(target); // target size
|
381 |
+
var vp = jscolor.getViewPos(); // view pos
|
382 |
+
var vs = jscolor.getViewSize(); // view size
|
383 |
+
var ps = getPickerDims(this); // picker size
|
384 |
+
var a, b, c;
|
385 |
+
switch(this.pickerPosition.toLowerCase()) {
|
386 |
+
case 'left': a=1; b=0; c=-1; break;
|
387 |
+
case 'right':a=1; b=0; c=1; break;
|
388 |
+
case 'top': a=0; b=1; c=-1; break;
|
389 |
+
default: a=0; b=1; c=1; break;
|
390 |
+
}
|
391 |
+
var l = (ts[b]+ps[b])/2;
|
392 |
+
|
393 |
+
// picker pos
|
394 |
+
if (!this.pickerSmartPosition) {
|
395 |
+
var pp = [
|
396 |
+
tp[a],
|
397 |
+
tp[b]+ts[b]-l+l*c
|
398 |
+
];
|
399 |
+
} else {
|
400 |
+
var pp = [
|
401 |
+
-vp[a]+tp[a]+ps[a] > vs[a] ?
|
402 |
+
(-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :
|
403 |
+
tp[a],
|
404 |
+
-vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?
|
405 |
+
(-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :
|
406 |
+
(tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)
|
407 |
+
];
|
408 |
+
}
|
409 |
+
drawPicker(pp[a], pp[b]);
|
410 |
+
}
|
411 |
+
};
|
412 |
+
|
413 |
+
|
414 |
+
this.importColor = function() {
|
415 |
+
if(!valueElement) {
|
416 |
+
this.exportColor();
|
417 |
+
} else {
|
418 |
+
if(!this.adjust) {
|
419 |
+
if(!this.fromString(valueElement.value, leaveValue)) {
|
420 |
+
styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
|
421 |
+
styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
|
422 |
+
styleElement.style.color = styleElement.jscStyle.color;
|
423 |
+
this.exportColor(leaveValue | leaveStyle);
|
424 |
+
}
|
425 |
+
} else if(!this.required && /^\s*$/.test(valueElement.value)) {
|
426 |
+
valueElement.value = '';
|
427 |
+
styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
|
428 |
+
styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
|
429 |
+
styleElement.style.color = styleElement.jscStyle.color;
|
430 |
+
this.exportColor(leaveValue | leaveStyle);
|
431 |
+
|
432 |
+
} else if(this.fromString(valueElement.value)) {
|
433 |
+
// OK
|
434 |
+
} else {
|
435 |
+
this.exportColor();
|
436 |
+
}
|
437 |
+
}
|
438 |
+
};
|
439 |
+
|
440 |
+
|
441 |
+
this.exportColor = function(flags) {
|
442 |
+
if(!(flags & leaveValue) && valueElement) {
|
443 |
+
var value = this.toString();
|
444 |
+
if(this.caps) { value = value.toUpperCase(); }
|
445 |
+
if(this.hash) { value = '#'+value; }
|
446 |
+
valueElement.value = value;
|
447 |
+
}
|
448 |
+
if(!(flags & leaveStyle) && styleElement) {
|
449 |
+
styleElement.style.backgroundImage = "none";
|
450 |
+
styleElement.style.backgroundColor =
|
451 |
+
'#'+this.toString();
|
452 |
+
styleElement.style.color =
|
453 |
+
0.213 * this.rgb[0] +
|
454 |
+
0.715 * this.rgb[1] +
|
455 |
+
0.072 * this.rgb[2]
|
456 |
+
< 0.5 ? '#FFF' : '#000';
|
457 |
+
}
|
458 |
+
if(!(flags & leavePad) && isPickerOwner()) {
|
459 |
+
redrawPad();
|
460 |
+
}
|
461 |
+
if(!(flags & leaveSld) && isPickerOwner()) {
|
462 |
+
redrawSld();
|
463 |
+
}
|
464 |
+
};
|
465 |
+
|
466 |
+
|
467 |
+
this.fromHSV = function(h, s, v, flags) { // null = don't change
|
468 |
+
if(h !== null) { h = Math.max(0.0, this.minH, Math.min(6.0, this.maxH, h)); }
|
469 |
+
if(s !== null) { s = Math.max(0.0, this.minS, Math.min(1.0, this.maxS, s)); }
|
470 |
+
if(v !== null) { v = Math.max(0.0, this.minV, Math.min(1.0, this.maxV, v)); }
|
471 |
+
|
472 |
+
this.rgb = HSV_RGB(
|
473 |
+
h===null ? this.hsv[0] : (this.hsv[0]=h),
|
474 |
+
s===null ? this.hsv[1] : (this.hsv[1]=s),
|
475 |
+
v===null ? this.hsv[2] : (this.hsv[2]=v)
|
476 |
+
);
|
477 |
+
|
478 |
+
this.exportColor(flags);
|
479 |
+
};
|
480 |
+
|
481 |
+
|
482 |
+
this.fromRGB = function(r, g, b, flags) { // null = don't change
|
483 |
+
if(r !== null) { r = Math.max(0.0, Math.min(1.0, r)); }
|
484 |
+
if(g !== null) { g = Math.max(0.0, Math.min(1.0, g)); }
|
485 |
+
if(b !== null) { b = Math.max(0.0, Math.min(1.0, b)); }
|
486 |
+
|
487 |
+
var hsv = RGB_HSV(
|
488 |
+
r===null ? this.rgb[0] : r,
|
489 |
+
g===null ? this.rgb[1] : g,
|
490 |
+
b===null ? this.rgb[2] : b
|
491 |
+
);
|
492 |
+
if(hsv[0] !== null) {
|
493 |
+
this.hsv[0] = Math.max(0.0, this.minH, Math.min(6.0, this.maxH, hsv[0]));
|
494 |
+
}
|
495 |
+
if(hsv[2] !== 0) {
|
496 |
+
this.hsv[1] = hsv[1]===null ? null : Math.max(0.0, this.minS, Math.min(1.0, this.maxS, hsv[1]));
|
497 |
+
}
|
498 |
+
this.hsv[2] = hsv[2]===null ? null : Math.max(0.0, this.minV, Math.min(1.0, this.maxV, hsv[2]));
|
499 |
+
|
500 |
+
// update RGB according to final HSV, as some values might be trimmed
|
501 |
+
var rgb = HSV_RGB(this.hsv[0], this.hsv[1], this.hsv[2]);
|
502 |
+
this.rgb[0] = rgb[0];
|
503 |
+
this.rgb[1] = rgb[1];
|
504 |
+
this.rgb[2] = rgb[2];
|
505 |
+
|
506 |
+
this.exportColor(flags);
|
507 |
+
};
|
508 |
+
|
509 |
+
|
510 |
+
this.fromString = function(hex, flags) {
|
511 |
+
var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);
|
512 |
+
if(!m) {
|
513 |
+
return false;
|
514 |
+
} else {
|
515 |
+
if(m[1].length === 6) { // 6-char notation
|
516 |
+
this.fromRGB(
|
517 |
+
parseInt(m[1].substr(0,2),16) / 255,
|
518 |
+
parseInt(m[1].substr(2,2),16) / 255,
|
519 |
+
parseInt(m[1].substr(4,2),16) / 255,
|
520 |
+
flags
|
521 |
+
);
|
522 |
+
} else { // 3-char notation
|
523 |
+
this.fromRGB(
|
524 |
+
parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255,
|
525 |
+
parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255,
|
526 |
+
parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255,
|
527 |
+
flags
|
528 |
+
);
|
529 |
+
}
|
530 |
+
return true;
|
531 |
+
}
|
532 |
+
};
|
533 |
+
|
534 |
+
|
535 |
+
this.toString = function() {
|
536 |
+
return (
|
537 |
+
(0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) +
|
538 |
+
(0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) +
|
539 |
+
(0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1)
|
540 |
+
);
|
541 |
+
};
|
542 |
+
|
543 |
+
|
544 |
+
function RGB_HSV(r, g, b) {
|
545 |
+
var n = Math.min(Math.min(r,g),b);
|
546 |
+
var v = Math.max(Math.max(r,g),b);
|
547 |
+
var m = v - n;
|
548 |
+
if(m === 0) { return [ null, 0, v ]; }
|
549 |
+
var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);
|
550 |
+
return [ h===6?0:h, m/v, v ];
|
551 |
+
}
|
552 |
+
|
553 |
+
|
554 |
+
function HSV_RGB(h, s, v) {
|
555 |
+
if(h === null) { return [ v, v, v ]; }
|
556 |
+
var i = Math.floor(h);
|
557 |
+
var f = i%2 ? h-i : 1-(h-i);
|
558 |
+
var m = v * (1 - s);
|
559 |
+
var n = v * (1 - s*f);
|
560 |
+
switch(i) {
|
561 |
+
case 6:
|
562 |
+
case 0: return [v,n,m];
|
563 |
+
case 1: return [n,v,m];
|
564 |
+
case 2: return [m,v,n];
|
565 |
+
case 3: return [m,n,v];
|
566 |
+
case 4: return [n,m,v];
|
567 |
+
case 5: return [v,m,n];
|
568 |
+
}
|
569 |
+
}
|
570 |
+
|
571 |
+
|
572 |
+
function removePicker() {
|
573 |
+
delete jscolor.picker.owner;
|
574 |
+
document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB);
|
575 |
+
}
|
576 |
+
|
577 |
+
|
578 |
+
function drawPicker(x, y) {
|
579 |
+
if(!jscolor.picker) {
|
580 |
+
jscolor.picker = {
|
581 |
+
box : document.createElement('div'),
|
582 |
+
boxB : document.createElement('div'),
|
583 |
+
pad : document.createElement('div'),
|
584 |
+
padB : document.createElement('div'),
|
585 |
+
padM : document.createElement('div'),
|
586 |
+
sld : document.createElement('div'),
|
587 |
+
sldB : document.createElement('div'),
|
588 |
+
sldM : document.createElement('div'),
|
589 |
+
btn : document.createElement('div'),
|
590 |
+
btnS : document.createElement('span'),
|
591 |
+
btnT : document.createTextNode(THIS.pickerCloseText)
|
592 |
+
};
|
593 |
+
for(var i=0,segSize=4; i<jscolor.images.sld[1]; i+=segSize) {
|
594 |
+
var seg = document.createElement('div');
|
595 |
+
seg.style.height = segSize+'px';
|
596 |
+
seg.style.fontSize = '1px';
|
597 |
+
seg.style.lineHeight = '0';
|
598 |
+
jscolor.picker.sld.appendChild(seg);
|
599 |
+
}
|
600 |
+
jscolor.picker.sldB.appendChild(jscolor.picker.sld);
|
601 |
+
jscolor.picker.box.appendChild(jscolor.picker.sldB);
|
602 |
+
jscolor.picker.box.appendChild(jscolor.picker.sldM);
|
603 |
+
jscolor.picker.padB.appendChild(jscolor.picker.pad);
|
604 |
+
jscolor.picker.box.appendChild(jscolor.picker.padB);
|
605 |
+
jscolor.picker.box.appendChild(jscolor.picker.padM);
|
606 |
+
jscolor.picker.btnS.appendChild(jscolor.picker.btnT);
|
607 |
+
jscolor.picker.btn.appendChild(jscolor.picker.btnS);
|
608 |
+
jscolor.picker.box.appendChild(jscolor.picker.btn);
|
609 |
+
jscolor.picker.boxB.appendChild(jscolor.picker.box);
|
610 |
+
}
|
611 |
+
|
612 |
+
var p = jscolor.picker;
|
613 |
+
|
614 |
+
// controls interaction
|
615 |
+
p.box.onmouseup =
|
616 |
+
p.box.onmouseout = function() { target.focus(); };
|
617 |
+
p.box.onmousedown = function() { abortBlur=true; };
|
618 |
+
p.box.onmousemove = function(e) {
|
619 |
+
if (holdPad || holdSld) {
|
620 |
+
holdPad && setPad(e);
|
621 |
+
holdSld && setSld(e);
|
622 |
+
if (document.selection) {
|
623 |
+
document.selection.empty();
|
624 |
+
} else if (window.getSelection) {
|
625 |
+
window.getSelection().removeAllRanges();
|
626 |
+
}
|
627 |
+
dispatchImmediateChange();
|
628 |
+
}
|
629 |
+
};
|
630 |
+
p.padM.onmouseup =
|
631 |
+
p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change'); } };
|
632 |
+
p.padM.onmousedown = function(e) {
|
633 |
+
// if the slider is at the bottom, move it up
|
634 |
+
switch(modeID) {
|
635 |
+
case 0: if (THIS.hsv[2] === 0) { THIS.fromHSV(null, null, 1.0); }; break;
|
636 |
+
case 1: if (THIS.hsv[1] === 0) { THIS.fromHSV(null, 1.0, null); }; break;
|
637 |
+
}
|
638 |
+
holdPad=true;
|
639 |
+
setPad(e);
|
640 |
+
dispatchImmediateChange();
|
641 |
+
};
|
642 |
+
p.sldM.onmouseup =
|
643 |
+
p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change'); } };
|
644 |
+
p.sldM.onmousedown = function(e) {
|
645 |
+
holdSld=true;
|
646 |
+
setSld(e);
|
647 |
+
dispatchImmediateChange();
|
648 |
+
};
|
649 |
+
|
650 |
+
// picker
|
651 |
+
var dims = getPickerDims(THIS);
|
652 |
+
p.box.style.width = dims[0] + 'px';
|
653 |
+
p.box.style.height = dims[1] + 'px';
|
654 |
+
|
655 |
+
// picker border
|
656 |
+
p.boxB.style.position = 'absolute';
|
657 |
+
p.boxB.style.clear = 'both';
|
658 |
+
p.boxB.style.left = x+'px';
|
659 |
+
p.boxB.style.top = y+'px';
|
660 |
+
p.boxB.style.zIndex = THIS.pickerZIndex;
|
661 |
+
p.boxB.style.border = THIS.pickerBorder+'px solid';
|
662 |
+
p.boxB.style.borderColor = THIS.pickerBorderColor;
|
663 |
+
p.boxB.style.background = THIS.pickerFaceColor;
|
664 |
+
|
665 |
+
// pad image
|
666 |
+
p.pad.style.width = jscolor.images.pad[0]+'px';
|
667 |
+
p.pad.style.height = jscolor.images.pad[1]+'px';
|
668 |
+
|
669 |
+
// pad border
|
670 |
+
p.padB.style.position = 'absolute';
|
671 |
+
p.padB.style.left = THIS.pickerFace+'px';
|
672 |
+
p.padB.style.top = THIS.pickerFace+'px';
|
673 |
+
p.padB.style.border = THIS.pickerInset+'px solid';
|
674 |
+
p.padB.style.borderColor = THIS.pickerInsetColor;
|
675 |
+
|
676 |
+
// pad mouse area
|
677 |
+
p.padM.style.position = 'absolute';
|
678 |
+
p.padM.style.left = '0';
|
679 |
+
p.padM.style.top = '0';
|
680 |
+
p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px';
|
681 |
+
p.padM.style.height = p.box.style.height;
|
682 |
+
p.padM.style.cursor = 'crosshair';
|
683 |
+
|
684 |
+
// slider image
|
685 |
+
p.sld.style.overflow = 'hidden';
|
686 |
+
p.sld.style.width = jscolor.images.sld[0]+'px';
|
687 |
+
p.sld.style.height = jscolor.images.sld[1]+'px';
|
688 |
+
|
689 |
+
// slider border
|
690 |
+
p.sldB.style.display = THIS.slider ? 'block' : 'none';
|
691 |
+
p.sldB.style.position = 'absolute';
|
692 |
+
p.sldB.style.right = THIS.pickerFace+'px';
|
693 |
+
p.sldB.style.top = THIS.pickerFace+'px';
|
694 |
+
p.sldB.style.border = THIS.pickerInset+'px solid';
|
695 |
+
p.sldB.style.borderColor = THIS.pickerInsetColor;
|
696 |
+
|
697 |
+
// slider mouse area
|
698 |
+
p.sldM.style.display = THIS.slider ? 'block' : 'none';
|
699 |
+
p.sldM.style.position = 'absolute';
|
700 |
+
p.sldM.style.right = '0';
|
701 |
+
p.sldM.style.top = '0';
|
702 |
+
p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';
|
703 |
+
p.sldM.style.height = p.box.style.height;
|
704 |
+
try {
|
705 |
+
p.sldM.style.cursor = 'pointer';
|
706 |
+
} catch(eOldIE) {
|
707 |
+
p.sldM.style.cursor = 'hand';
|
708 |
+
}
|
709 |
+
|
710 |
+
// "close" button
|
711 |
+
function setBtnBorder() {
|
712 |
+
var insetColors = THIS.pickerInsetColor.split(/\s+/);
|
713 |
+
var pickerOutsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1];
|
714 |
+
p.btn.style.borderColor = pickerOutsetColor;
|
715 |
+
}
|
716 |
+
p.btn.style.display = THIS.pickerClosable ? 'block' : 'none';
|
717 |
+
p.btn.style.position = 'absolute';
|
718 |
+
p.btn.style.left = THIS.pickerFace + 'px';
|
719 |
+
p.btn.style.bottom = THIS.pickerFace + 'px';
|
720 |
+
p.btn.style.padding = '0 15px';
|
721 |
+
p.btn.style.height = '18px';
|
722 |
+
p.btn.style.border = THIS.pickerInset + 'px solid';
|
723 |
+
setBtnBorder();
|
724 |
+
p.btn.style.color = THIS.pickerButtonColor;
|
725 |
+
p.btn.style.font = '12px sans-serif';
|
726 |
+
p.btn.style.textAlign = 'center';
|
727 |
+
try {
|
728 |
+
p.btn.style.cursor = 'pointer';
|
729 |
+
} catch(eOldIE) {
|
730 |
+
p.btn.style.cursor = 'hand';
|
731 |
+
}
|
732 |
+
p.btn.onmousedown = function () {
|
733 |
+
THIS.hidePicker();
|
734 |
+
};
|
735 |
+
p.btnS.style.lineHeight = p.btn.style.height;
|
736 |
+
|
737 |
+
// load images in optimal order
|
738 |
+
switch(modeID) {
|
739 |
+
case 0: var padImg = 'hs.png'; break;
|
740 |
+
case 1: var padImg = 'hv.png'; break;
|
741 |
+
}
|
742 |
+
p.padM.style.backgroundImage = "url('"+jscolor.getDir()+"cross.gif')";
|
743 |
+
p.padM.style.backgroundRepeat = "no-repeat";
|
744 |
+
p.sldM.style.backgroundImage = "url('"+jscolor.getDir()+"arrow.gif')";
|
745 |
+
p.sldM.style.backgroundRepeat = "no-repeat";
|
746 |
+
p.pad.style.backgroundImage = "url('"+jscolor.getDir()+padImg+"')";
|
747 |
+
p.pad.style.backgroundRepeat = "no-repeat";
|
748 |
+
p.pad.style.backgroundPosition = "0 0";
|
749 |
+
|
750 |
+
// place pointers
|
751 |
+
redrawPad();
|
752 |
+
redrawSld();
|
753 |
+
|
754 |
+
jscolor.picker.owner = THIS;
|
755 |
+
document.getElementsByTagName('body')[0].appendChild(p.boxB);
|
756 |
+
}
|
757 |
+
|
758 |
+
|
759 |
+
function getPickerDims(o) {
|
760 |
+
var dims = [
|
761 |
+
2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[0] +
|
762 |
+
(o.slider ? 2*o.pickerInset + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] : 0),
|
763 |
+
o.pickerClosable ?
|
764 |
+
4*o.pickerInset + 3*o.pickerFace + jscolor.images.pad[1] + o.pickerButtonHeight :
|
765 |
+
2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[1]
|
766 |
+
];
|
767 |
+
return dims;
|
768 |
+
}
|
769 |
+
|
770 |
+
|
771 |
+
function redrawPad() {
|
772 |
+
// redraw the pad pointer
|
773 |
+
switch(modeID) {
|
774 |
+
case 0: var yComponent = 1; break;
|
775 |
+
case 1: var yComponent = 2; break;
|
776 |
+
}
|
777 |
+
var x = Math.round((THIS.hsv[0]/6) * (jscolor.images.pad[0]-1));
|
778 |
+
var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.pad[1]-1));
|
779 |
+
jscolor.picker.padM.style.backgroundPosition =
|
780 |
+
(THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor.images.cross[0]/2)) + 'px ' +
|
781 |
+
(THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.cross[1]/2)) + 'px';
|
782 |
+
|
783 |
+
// redraw the slider image
|
784 |
+
var seg = jscolor.picker.sld.childNodes;
|
785 |
+
|
786 |
+
switch(modeID) {
|
787 |
+
case 0:
|
788 |
+
var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1);
|
789 |
+
for(var i=0; i<seg.length; i+=1) {
|
790 |
+
seg[i].style.backgroundColor = 'rgb('+
|
791 |
+
(rgb[0]*(1-i/seg.length)*100)+'%,'+
|
792 |
+
(rgb[1]*(1-i/seg.length)*100)+'%,'+
|
793 |
+
(rgb[2]*(1-i/seg.length)*100)+'%)';
|
794 |
+
}
|
795 |
+
break;
|
796 |
+
case 1:
|
797 |
+
var rgb, s, c = [ THIS.hsv[2], 0, 0 ];
|
798 |
+
var i = Math.floor(THIS.hsv[0]);
|
799 |
+
var f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i);
|
800 |
+
switch(i) {
|
801 |
+
case 6:
|
802 |
+
case 0: rgb=[0,1,2]; break;
|
803 |
+
case 1: rgb=[1,0,2]; break;
|
804 |
+
case 2: rgb=[2,0,1]; break;
|
805 |
+
case 3: rgb=[2,1,0]; break;
|
806 |
+
case 4: rgb=[1,2,0]; break;
|
807 |
+
case 5: rgb=[0,2,1]; break;
|
808 |
+
}
|
809 |
+
for(var i=0; i<seg.length; i+=1) {
|
810 |
+
s = 1 - 1/(seg.length-1)*i;
|
811 |
+
c[1] = c[0] * (1 - s*f);
|
812 |
+
c[2] = c[0] * (1 - s);
|
813 |
+
seg[i].style.backgroundColor = 'rgb('+
|
814 |
+
(c[rgb[0]]*100)+'%,'+
|
815 |
+
(c[rgb[1]]*100)+'%,'+
|
816 |
+
(c[rgb[2]]*100)+'%)';
|
817 |
+
}
|
818 |
+
break;
|
819 |
+
}
|
820 |
+
}
|
821 |
+
|
822 |
+
|
823 |
+
function redrawSld() {
|
824 |
+
// redraw the slider pointer
|
825 |
+
switch(modeID) {
|
826 |
+
case 0: var yComponent = 2; break;
|
827 |
+
case 1: var yComponent = 1; break;
|
828 |
+
}
|
829 |
+
var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.sld[1]-1));
|
830 |
+
jscolor.picker.sldM.style.backgroundPosition =
|
831 |
+
'0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.arrow[1]/2)) + 'px';
|
832 |
+
}
|
833 |
+
|
834 |
+
|
835 |
+
function isPickerOwner() {
|
836 |
+
return jscolor.picker && jscolor.picker.owner === THIS;
|
837 |
+
}
|
838 |
+
|
839 |
+
|
840 |
+
function blurTarget() {
|
841 |
+
if(valueElement === target) {
|
842 |
+
THIS.importColor();
|
843 |
+
}
|
844 |
+
if(THIS.pickerOnfocus) {
|
845 |
+
THIS.hidePicker();
|
846 |
+
}
|
847 |
+
}
|
848 |
+
|
849 |
+
|
850 |
+
function blurValue() {
|
851 |
+
if(valueElement !== target) {
|
852 |
+
THIS.importColor();
|
853 |
+
}
|
854 |
+
}
|
855 |
+
|
856 |
+
|
857 |
+
function setPad(e) {
|
858 |
+
var mpos = jscolor.getRelMousePos(e);
|
859 |
+
var x = mpos.x - THIS.pickerFace - THIS.pickerInset;
|
860 |
+
var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
|
861 |
+
switch(modeID) {
|
862 |
+
case 0: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break;
|
863 |
+
case 1: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break;
|
864 |
+
}
|
865 |
+
}
|
866 |
+
|
867 |
+
|
868 |
+
function setSld(e) {
|
869 |
+
var mpos = jscolor.getRelMousePos(e);
|
870 |
+
var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
|
871 |
+
switch(modeID) {
|
872 |
+
case 0: THIS.fromHSV(null, null, 1 - y/(jscolor.images.sld[1]-1), leavePad); break;
|
873 |
+
case 1: THIS.fromHSV(null, 1 - y/(jscolor.images.sld[1]-1), null, leavePad); break;
|
874 |
+
}
|
875 |
+
}
|
876 |
+
|
877 |
+
|
878 |
+
function dispatchImmediateChange() {
|
879 |
+
if (THIS.onImmediateChange) {
|
880 |
+
var callback;
|
881 |
+
if (typeof THIS.onImmediateChange === 'string') {
|
882 |
+
callback = new Function (THIS.onImmediateChange);
|
883 |
+
} else {
|
884 |
+
callback = THIS.onImmediateChange;
|
885 |
+
}
|
886 |
+
callback.call(THIS);
|
887 |
+
}
|
888 |
+
}
|
889 |
+
|
890 |
+
|
891 |
+
var THIS = this;
|
892 |
+
var modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0;
|
893 |
+
var abortBlur = false;
|
894 |
+
var
|
895 |
+
valueElement = jscolor.fetchElement(this.valueElement),
|
896 |
+
styleElement = jscolor.fetchElement(this.styleElement);
|
897 |
+
var
|
898 |
+
holdPad = false,
|
899 |
+
holdSld = false;
|
900 |
+
var
|
901 |
+
leaveValue = 1<<0,
|
902 |
+
leaveStyle = 1<<1,
|
903 |
+
leavePad = 1<<2,
|
904 |
+
leaveSld = 1<<3;
|
905 |
+
|
906 |
+
// target
|
907 |
+
jscolor.addEvent(target, 'focus', function() {
|
908 |
+
if(THIS.pickerOnfocus) { THIS.showPicker(); }
|
909 |
+
});
|
910 |
+
jscolor.addEvent(target, 'blur', function() {
|
911 |
+
if(!abortBlur) {
|
912 |
+
window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0);
|
913 |
+
} else {
|
914 |
+
abortBlur = false;
|
915 |
+
}
|
916 |
+
});
|
917 |
+
|
918 |
+
// valueElement
|
919 |
+
if(valueElement) {
|
920 |
+
var updateField = function() {
|
921 |
+
THIS.fromString(valueElement.value, leaveValue);
|
922 |
+
dispatchImmediateChange();
|
923 |
+
};
|
924 |
+
jscolor.addEvent(valueElement, 'keyup', updateField);
|
925 |
+
jscolor.addEvent(valueElement, 'input', updateField);
|
926 |
+
jscolor.addEvent(valueElement, 'blur', blurValue);
|
927 |
+
valueElement.setAttribute('autocomplete', 'off');
|
928 |
+
}
|
929 |
+
|
930 |
+
// styleElement
|
931 |
+
if(styleElement) {
|
932 |
+
styleElement.jscStyle = {
|
933 |
+
backgroundImage : styleElement.style.backgroundImage,
|
934 |
+
backgroundColor : styleElement.style.backgroundColor,
|
935 |
+
color : styleElement.style.color
|
936 |
+
};
|
937 |
+
}
|
938 |
+
|
939 |
+
// require images
|
940 |
+
switch(modeID) {
|
941 |
+
case 0: jscolor.requireImage('hs.png'); break;
|
942 |
+
case 1: jscolor.requireImage('hv.png'); break;
|
943 |
+
}
|
944 |
+
jscolor.requireImage('cross.gif');
|
945 |
+
jscolor.requireImage('arrow.gif');
|
946 |
+
|
947 |
+
this.importColor();
|
948 |
+
}
|
949 |
+
|
950 |
+
};
|
951 |
+
|
952 |
+
|
953 |
+
jscolor.install();
|
templates/index.php
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//silence is golden
|
3 |
+
?>
|
templates/itro-popup-template.php
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
function itro_popup_template()
|
3 |
+
{ ?>
|
4 |
+
<div id="itro_popup" style="visibility:hidden">
|
5 |
+
<div id="popup_content"><?php
|
6 |
+
$custom_field = stripslashes(itro_get_field('custom_html')); //insert custom html code
|
7 |
+
echo str_replace("\r\n",'',$custom_field); //return the string whitout new line
|
8 |
+
if ( itro_get_option('age_restriction') == 'yes' )
|
9 |
+
{?>
|
10 |
+
<p id="age_button_area" align="center">
|
11 |
+
<input type="button" id="ageEnterButton" onClick="itro_set_cookie('popup_cookie','one_time_popup',<?php echo itro_get_option('cookie_time_exp'); ?>); jQuery('#itro_popup').fadeOut(function(){itro_opaco.style.visibility='hidden';})" value="<?php echo itro_get_option('enter_button_text');?>">
|
12 |
+
<input type="button" id="ageLeaveButton" onClick="javascript:window.open('<?php echo itro_get_option('leave_button_url')?>','_self');" value="<?php echo itro_get_option('leave_button_text');?>">
|
13 |
+
</p><?php
|
14 |
+
}
|
15 |
+
?>
|
16 |
+
</div> <?php
|
17 |
+
if ( itro_get_option('age_restriction') == NULL )
|
18 |
+
{?>
|
19 |
+
<img id="close_cross" src="<?php echo itroPath . 'images/close-icon.png'; ?>" title="<?php _e('CLOSE','itro-plugin'); ?>" onclick="jQuery('#itro_popup').fadeOut(function(){itro_opaco.style.visibility='hidden';})">
|
20 |
+
<div id="popup_countdown" align="center"><?php _e('This popup will be closed in: ','itro-plugin'); ?> <b id="timer"></b></div>
|
21 |
+
<?php
|
22 |
+
} ?>
|
23 |
+
</div>
|
24 |
+
<div id="itro_opaco" style="visibility:hidden"></div>
|
25 |
+
<?php
|
26 |
+
}
|
27 |
+
?>
|
uninstall.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//uninstall not called from WordPress exit
|
3 |
+
if ( !defined( 'WP_UNINSTALL_PLUGIN' ) ) {exit ();}
|
4 |
+
else
|
5 |
+
{
|
6 |
+
include_once ('functions/database-function.php');
|
7 |
+
if( itro_get_option('delete_data') == 'yes' )
|
8 |
+
{
|
9 |
+
$preview_id = itro_get_option('preview_id'); //delete preview page
|
10 |
+
wp_delete_post( $preview_id , true );
|
11 |
+
|
12 |
+
delete_option('itro_curr_ver');
|
13 |
+
delete_option('itro_prev_ver');
|
14 |
+
delete_option('delete_data');
|
15 |
+
|
16 |
+
$con = mysql_connect(DB_HOST,DB_USER,DB_PASSWORD);
|
17 |
+
if (!$con){die('Could not connect: ' . mysql_error());}
|
18 |
+
mysql_select_db(DB_NAME);
|
19 |
+
|
20 |
+
mysql_query('DROP TABLE wp_itro_plugin_option');
|
21 |
+
mysql_query('DROP TABLE wp_itro_plugin_field');
|
22 |
+
}
|
23 |
+
}
|
24 |
+
?>
|