PluginProbe
VdoCipher: Secure Video Player and Hosting / 1.26
VdoCipher: Secure Video Player and Hosting v1.26
trunk 1.10 1.11 1.12 1.13 1.14 1.15 1.17 1.18 1.19 1.20 1.21 1.22 1.23 1.24 1.25 1.26 1.27 1.28 1.29 1.3 1.30 1.4 1.5 1.6 All 28 releases
← All changes | include/options.php +126 -45 1.201.26 View file →
@@ -9,9 +9,9 @@
9 9
10 10 <div class="wrap">
11 11 <h2>VdoCipher Options</h2>
12 12
13 -<form method="post" action="options.php">
13 +<form name="vdoOptionForm" method="post" action="options.php">
14 14 <?php
15 15 settings_fields('vdo_option-group');
16 16 do_settings_sections('vdo_option-group');
17 17 ?>
@@ -19,17 +19,26 @@
19 19 <p><strong>Status : </strong> Ready to use. You can now embed your videos inside posts and pages.</p>
20 20 </div>
21 21 <table class="form-table">
22 22 <tr valign="top">
23 - <th scope="row">Client Secret Key</th>
24 - <td><input type="text" name="vdo_client_key"
23 + <th scope="row">API Secret Key</th>
24 + <td>
25 + <div style="display: inline-flex;">
26 + <input type="password" name="vdo_client_key"
25 27 value="<?php echo esc_attr(get_option('vdo_client_key')); ?>"
26 - max-length="64" style="width: 640px" id="vdo_client_key" /></td>
28 + max-length="64" style="width: 640px" id="vdo_client_key" />
29 + <p style="margin-left:20px; position: relative">
30 + <span id="toggle_span">
31 + <button id="toggle_API_visibility" href="#" data-protected="On">Show API Secret Key</button>
32 + </span>
33 + </p>
34 + </div>
35 + </td>
27 36 </tr>
28 37
29 38 <tr valign="top">
30 39 <th scope="row">Default Width</th>
31 - <td><input type="text" name="vdo_default_width"
40 + <td><input type="text" id="vdo_default_width" name="vdo_default_width"
32 41 value="<?php echo esc_attr(get_option('vdo_default_width')); ?>"
33 42 /></td>
34 43 </tr>
35 44
@@ -34,45 +43,59 @@
34 43 </tr>
35 44
36 45 <tr valign="top">
37 46 <th scope="row">Default Height</th>
38 - <td><input type="text" name="vdo_default_height"
47 + <td><input type="text" id="vdo_default_height" name="vdo_default_height"
39 48 value="<?php echo esc_attr(get_option('vdo_default_height')); ?>"
40 49 /></td>
41 50 </tr>
42 51
43 52 <!-- Version Number -->
44 - <?php
45 - if ((get_option('vdo_embed_version')) == false) {
46 - update_option('vdo_embed_version', '1.5.0');
47 - }
53 + <?php
54 + if ((get_option('vdo_embed_version')) == false) {
55 + update_option('vdo_embed_version', VDOCIPHER_PLAYER_VERSION);
56 + }
48 57 ?>
49 58 <tr valign="top">
50 59 <th scope="row">Player Version</th>
51 60 <td>
52 - <?php $vdo_embed_version_vars = array('0.5', '1.0.0', '1.1.0', '1.1.3', '1.2.7', '1.3.3', '1.4.5','1.5.0'); ?>
53 - <select name="vdo_embed_version" id="vdo_embed_version">
61 + <div style="display: inline-flex">
62 + <select id="vdo_embed_version">
54 63 <?php
55 - $vdo_embed_version_str = get_option('vdo_embed_version');
64 + $vdo_embed_version_vars = array(
65 + '0.5', '1.0.0', '1.1.0', '1.1.3', '1.2.7', '1.3.3', '1.4.5','1.5.0','1.6.4','1.6.10'
66 + );
67 + $vdo_embed_version_string = get_option('vdo_embed_version');
68 + foreach ($vdo_embed_version_vars as $vdo_embed_version_var) {
69 + if ($vdo_embed_version_string == $vdo_embed_version_var) {
70 + $selected = 'selected';
71 + } else {
72 + $selected = '';
73 + }
74 + switch ($vdo_embed_version_var) {
75 + case '0.5':
76 + $version_old_new = ' (old player)';
77 + break;
78 + case VDOCIPHER_PLAYER_VERSION:
79 + $version_old_new = ' (newest player)' ;
80 + break;
81 + default:
82 + $version_old_new = ' (new player)';
83 + break;
84 + }
56 85 ?>
57 - <?php
58 - foreach($vdo_embed_version_vars as $vdo_embed_version_var) {
59 - if ($vdo_embed_version_str == $vdo_embed_version_var) {
60 - $selected = 'selected="selected"'; }
61 - else { $selected = ''; }
62 -
63 - if($vdo_embed_version_var === '0.5') {
64 - $version_old_new = ' (old player)' ; }
65 - elseif ($vdo_embed_version_var === '1.5.0'){
66 - $version_old_new = ' (newest player)' ; }
67 - else {
68 - $version_old_new = ' (new player)' ; }
69 - ?>
70 86 <option value="<?php echo $vdo_embed_version_var; ?>" <?php echo $selected; ?> >
71 87 <?php echo $vdo_embed_version_var . $version_old_new ; ?>
72 88 </option>
73 89 <?php } ?>
74 - </select>
90 + <option value="Custom Version">
91 + <?php echo 'Custom Version' ?>
92 + </option>
93 + </select>
94 + <input type="text" name="vdo_embed_version"
95 + id="vdo_custom_version"
96 + style="margin-left:20px; position: relative; width:120px;" />
97 + </div>
75 98 <p class="description">It is recommended that you use the latest player version for best video playback.</p>
76 99 </td>
77 100 </tr>
78 101
@@ -77,51 +100,109 @@
77 100 </tr>
78 101
79 102 <!-- Player Theme Options -->
80 103 <?php
81 - if ((get_option('vdo_player_theme')) == false) {
82 - update_option('vdo_player_theme','9ae8bbe8dd964ddc9bdb932cca1cb59a');
83 - }
104 + if (!(get_option('vdo_player_theme'))) {
105 + update_option('vdo_player_theme', '9ae8bbe8dd964ddc9bdb932cca1cb59a');
106 + }
84 107 ?>
85 108 <tr valign="top">
86 109 <th scope="row">Player Theme</th>
87 110 <td>
88 - <input type="text" name="vdo_player_theme"
89 - value="<?php echo esc_attr(get_option('vdo_player_theme')); ?>" max-length = "32" style="width: 320px"
111 + <div style="display:inline-flex; margin-bottom:10px;">
112 + <input
113 + type="text"
114 + name="vdo_player_theme"
115 + value="<?php echo esc_attr(get_option('vdo_player_theme')); ?>"
116 + max-length = "32"
117 + style="width: 320px"
118 + readonly
90 119 />
91 - <p class="description">Player theme is not available for old player version(0.5). The default theme will be applied for old player.</p>
120 + <p style="margin-left:20px; position: relative">
121 + <span><a href="<?php menu_page_url('themesvdo', 1); ?> " >Select Custom Player Theme</a><br/>
122 + </p>
123 + </div>
124 + <p class="description">
125 + Player theme is not available for old player version(0.5). The default theme will be applied for old player.
126 + </p>
127 +
92 128 </td>
93 129 </tr>
130 + <!-- Player Theme Options end-->
94 131
132 + <!-- Player Watermark option - Flash/ HTML5 starts -->
133 + <tr id="vdo_watermark_html_flash" valign="top">
134 + <th scope="row"> Choice of Watermark </th>
135 + <td>
136 + <?php
137 + if ((get_option('vdo_watermark_flash_html') == 'html5')) {
138 + $vdocheckedhtml5 = 'checked';
139 + $vdocheckedflash = '';
140 + } elseif ((get_option('vdo_watermark_flash_html') == 'flash')) {
141 + $vdocheckedhtml5 = '';
142 + $vdocheckedflash = 'checked';
143 + }
144 + ?>
145 + <input type="radio" class="vdo-htmlflash"
146 + value="html5" name="vdo_watermark_flash_html"
147 + id="vdo_html5" <?php echo $vdocheckedhtml5; ?> >
148 + <label for="vdo_html5">HTML5 (Overlay)</label>
149 + &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;
150 + <input type="radio" class="vdo-htmlflash"
151 + value="flash" name="vdo_watermark_flash_html"
152 + id="vdo_flash" <?php echo $vdocheckedflash; ?> >
153 + <label for="vdo_flash">Flash (Hard-Coded)</label>
154 + </td>
155 + </tr>
156 + <!-- Player Watermark option - Flash/ HTML5 ends -->
95 157 <tr valign="top">
96 158 <th scope="row">Annotation Statement</th>
97 159 <td>
98 160 <div style="display: inline-flex;">
99 - <textarea name="vdo_annotate_code" id="vdo_watermarkjson" type="textarea" rows="6" cols="55" style="display: float-left"> <?php
161 + <textarea name="vdo_annotate_code" id="vdo_watermarkjson"
162 + type="textarea" rows="6" cols="55" style="display: float-left"
163 + ><?php
100 164 if (get_option('vdo_annotate_code') != "") {
101 - echo get_option('vdo_annotate_code');
102 - $vdo_annotation_code = get_option('vdo_annotate_code');
103 - }
104 - ?>
105 - </textarea>
165 + echo get_option('vdo_annotate_code');
166 + $vdo_annotation_code = get_option('vdo_annotate_code');
167 + }
168 + ?></textarea>
106 169 <p class="description" style="margin-left:20px; position: relative">
107 170 <span style="color:purple"><b>Sample Code for Dynamic Watermark</b></span><br/>
108 - [{'type':'rtext', 'text':' {name}', 'alpha':'0.60', 'color':'0xFF0000','size':'17','interval':'5000'}] <br/>
171 + [{'type':'rtext', 'text':' {name}', 'alpha':'0.60', 'color':'0xFF0000','size':'15','interval':'5000'}] <br/>
109 172 <span style="color:purple"><b>Sample Code for Static Watermark</b></span><br/>
110 173 [{'type':'text', 'text':'{ip}', 'alpha':'0.5' , 'x':'10', 'y':'100', 'color':'0xFF0000', 'size':'12'}] <br/>
111 174 </p>
112 175 </div>
113 176 <p class="description" id="vdojsonvalidator"></p>
114 - <p class="description">Leave this text blank in case you do not need watermark over all videos. For details on writing the annotation code <a href="https://www.vdocipher.com/blog/2014/12/add-text-to-videos-with-watermark/" target="_blank">check this out</a></p>
177 + <p class="description">
178 + Leave this text blank in case you do not need watermark over all
179 + videos. For details on writing the annotation code
180 + <a href="https://www.vdocipher.com/blog/2014/12/add-text-to-videos-with-watermark/" target="_blank">
181 + check this out
182 + </a>
183 + </p>
115 184 </td>
116 185 </tr>
186 + <tr style="display:none;">
187 + <td>Plugin version no.: </td>
188 + <td><input
189 + id="vdo_plugin_version" name="vdo_plugin_version"
190 + value="<?php echo esc_attr(get_option('vdo_plugin_version')); ?>" readonly>
191 + </td>
192 + </tr>
117 193 </table>
118 194 <?php
119 - wp_enqueue_script('vdo_change_player_version',plugin_dir_url(__FILE__).'js/validatewatermark.js');
120 - wp_localize_script('vdo_change_player_version', 'vdoVersionData', array(
195 + wp_enqueue_script('vdo_validate_watermark', plugin_dir_url(__FILE__).'js/validatewatermark.js');
196 + wp_localize_script('vdo_validate_watermark', 'vdoValidateWatermark', array(
121 197 'vdoWatermark' => $vdo_annotation_code
122 - )
123 - );
198 + ));
199 + wp_enqueue_script('vdo_html_flash_choice', plugin_dir_url(__FILE__).'js/flashhtml5choice.js');
200 + wp_enqueue_script('vdo_hide_key', plugin_dir_url(__FILE__).'js/showkey.js');
201 + wp_localize_script('vdo_html_flash_choice', 'vdoVD', array(
202 + 'vdoAV' => $vdo_embed_version_vars,
203 + 'vdoSV' => $vdo_embed_version_string
204 + ));
124 205 ?>
125 206 <?php submit_button(); ?>
126 207 </form>
127 208 </div>