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 +136 -34 1.151.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,73 +43,166 @@
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', '0.5');
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'); ?>
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 - else {
66 - $version_old_new = ' (new player)' ; }
67 - ?>
68 86 <option value="<?php echo $vdo_embed_version_var; ?>" <?php echo $selected; ?> >
69 87 <?php echo $vdo_embed_version_var . $version_old_new ; ?>
70 88 </option>
71 89 <?php } ?>
72 - </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>
98 + <p class="description">It is recommended that you use the latest player version for best video playback.</p>
73 99 </td>
74 100 </tr>
75 101
76 102 <!-- Player Theme Options -->
77 103 <?php
78 - if ((get_option('vdo_player_theme')) == false) {
79 - update_option('vdo_player_theme','9ae8bbe8dd964ddc9bdb932cca1cb59a');
80 - }
104 + if (!(get_option('vdo_player_theme'))) {
105 + update_option('vdo_player_theme', '9ae8bbe8dd964ddc9bdb932cca1cb59a');
106 + }
81 107 ?>
82 108 <tr valign="top">
83 109 <th scope="row">Player Theme</th>
84 110 <td>
85 - <input type="text" name="vdo_player_theme"
86 - 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
87 119 />
88 - <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 +
89 128 </td>
90 129 </tr>
130 + <!-- Player Theme Options end-->
91 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 -->
92 157 <tr valign="top">
93 158 <th scope="row">Annotation Statement</th>
94 159 <td>
95 - <textarea name="vdo_annotate_code" type="textarea" rows="5" cols="60"><?php
160 + <div style="display: inline-flex;">
161 + <textarea name="vdo_annotate_code" id="vdo_watermarkjson"
162 + type="textarea" rows="6" cols="55" style="display: float-left"
163 + ><?php
96 164 if (get_option('vdo_annotate_code') != "") {
97 165 echo get_option('vdo_annotate_code');
166 + $vdo_annotation_code = get_option('vdo_annotate_code');
98 167 }
99 168 ?></textarea>
100 - <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>
169 + <p class="description" style="margin-left:20px; position: relative">
170 + <span style="color:purple"><b>Sample Code for Dynamic Watermark</b></span><br/>
171 + [{'type':'rtext', 'text':' {name}', 'alpha':'0.60', 'color':'0xFF0000','size':'15','interval':'5000'}] <br/>
172 + <span style="color:purple"><b>Sample Code for Static Watermark</b></span><br/>
173 + [{'type':'text', 'text':'{ip}', 'alpha':'0.5' , 'x':'10', 'y':'100', 'color':'0xFF0000', 'size':'12'}] <br/>
174 + </p>
175 + </div>
176 + <p class="description" id="vdojsonvalidator"></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>
101 184 </td>
102 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>
103 193 </table>
194 + <?php
195 + wp_enqueue_script('vdo_validate_watermark', plugin_dir_url(__FILE__).'js/validatewatermark.js');
196 + wp_localize_script('vdo_validate_watermark', 'vdoValidateWatermark', array(
197 + 'vdoWatermark' => $vdo_annotation_code
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 + ));
205 + ?>
104 206 <?php submit_button(); ?>
105 207 </form>
106 -</div>
208 +</div>