Changeset 2500100
- Timestamp:
- 03/20/2021 02:16:17 PM (5 years ago)
- Location:
- stapp-video
- Files:
-
- 10 edited
-
tags/1.0/readme.txt (modified) (1 diff)
-
trunk/admin/admin.php (modified) (6 diffs)
-
trunk/admin/menu/OverviewSubMenuHTML.php (modified) (1 diff)
-
trunk/includes/css/styleForCreate.css (modified) (2 diffs)
-
trunk/includes/css/styleForGlobalBackend.css (modified) (1 diff)
-
trunk/includes/db/stapp_video_readData.php (modified) (2 diffs)
-
trunk/includes/db/stapp_video_writeData.php (modified) (1 diff)
-
trunk/includes/stapp_activate_plugin.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/stapp_video.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
stapp-video/tags/1.0/readme.txt
r2495988 r2500100 33 33 == Questions & Support == 34 34 35 For more informations, please visit us at: [dev-wordpress.com](https://dev-wordpress.com/) 36 If you have any questions, please contact us Mail(mailto:[email protected] "[email protected]") 35 For more informations, please visit us at: [dev-wordpress.com](https://dev-wordpress.com/produkt/video/) 36 If you have any questions, please [contact us directly](https://dev-wordpress.com/contact/) 37 37 38 38 39 == Changelog == 39 40 41 40 42 = 1.0 = 41 43 44 * Initial release 42 45 43 46 44 -
stapp-video/trunk/admin/admin.php
r2495895 r2500100 2 2 3 3 include_once STAPP_VIDEO_PLUGIN_DIR.'/includes/db/stapp_video_writeData.php'; 4 5 /* 6 * Message / Result 7 */ 8 9 $Stapp_Video_Result_Type = [ 10 'message' => '', 11 'value' => '', 12 'success' => false 13 ]; 14 4 15 5 16 add_action( 'admin_init', 'stapp_video_admin_init', 10, 0 ); … … 25 36 'stappvideo', 26 37 'stapp_video_page_mainmenu_html', 27 'dashicons- menu-alt3',38 'dashicons-playlist-video', 28 39 $_wp_last_object_menu 29 40 ); … … 52 63 add_action( 'load-' . $addnew, 'stapp_video_create_admin', 10, 0 ); 53 64 54 //} 65 66 if (!checkSTAppVideoIsProEnabled()) { 67 $stapp_pro_page = add_submenu_page( 68 'stappvideo', 69 __('STApp Video Pro Version', 'stapp_video'), 70 __('Pro Version', 'stapp_video'), 71 'manage_options', 72 'stappvideo_pro_version', 73 'stapp_video_page_proversion_html' 74 ); 75 76 add_action('load-' . $stapp_pro_page, 'stapp_video_proversion_admin', 10, 0); 77 } 55 78 } 56 79 … … 61 84 function stapp_video_page_create_html(){ 62 85 require_once STAPP_VIDEO_PLUGIN_DIR."/admin/menu/CreateSubMenuHTML.php"; 86 } 87 88 function stapp_video_page_proversion_html(){ 89 require_once STAPP_VIDEO_PLUGIN_DIR."/admin/menu/ProVersionSubMenuHTML.php"; 63 90 } 64 91 … … 76 103 77 104 function stapp_video_create_admin(){ 78 if ( isset($_POST[' action']) ){105 if ( isset($_POST['save_action']) ){ 79 106 $data = sanitize_post($_POST); 80 107 $cdatabase = new stapp_video_writeData; … … 83 110 } 84 111 112 113 function stapp_video_proversion_admin(){ 114 $GLOBALS['Stapp_Video_Result_Type']['message'] = ''; 115 $GLOBALS['Stapp_Video_Result_Type']['success'] = false; 116 if ( isset($_POST['unlock_action']) ){ 117 $data = sanitize_post($_POST); 118 $cClass = new stapp_video_unlock_plugin(); 119 $cClass->unlock($data); 120 } 121 122 } 123 -
stapp-video/trunk/admin/menu/OverviewSubMenuHTML.php
r2495895 r2500100 34 34 <div class="wrap"> 35 35 <h1><?php esc_html_e( get_admin_page_title() ); ?></h1> 36 <?php 37 // output security fields for the registered setting "wporg_options" 38 settings_fields( 'manage_options' ); 39 // output setting sections and their fields 40 // (sections are registered for "wporg", each field is registered to a specific section) 41 do_settings_sections( 'manage_options' ); 42 ?> 36 43 <br> 37 44 <div class="stapp_input white_background"><label class="mainLabel"><?php esc_html_e( "Getting started", 'stapp_video' ); ?></label> -
stapp-video/trunk/includes/css/styleForCreate.css
r2495895 r2500100 1 /*2 Global Classes for all Tabs3 */4 5 6 .mainLabel{7 top: -10px;8 left: 10px;9 background-color: #f1f1f1;10 position: relative;11 }12 13 .important_label{14 color: red;15 }16 17 .slider{18 -webkit-appearance: none;19 width: 100%;20 height: 25px;21 background: #d3d3d3;22 outline: none;23 opacity: 0.7;24 -webkit-transition: .2s;25 transition: opacity .2s;26 border-style: solid;27 border-color: black;28 border-width: 2px;29 border-radius: 5px;30 }31 32 .slider::-webkit-slider-thumb {33 -webkit-appearance: none;34 appearance: none;35 top: -5px;36 width: 15px;37 height: 35px;38 background: none;39 border-style: solid;40 border-color: black;41 border-width: 2px;42 border-radius: 5px;43 cursor: pointer;44 }45 46 .slider::-moz-range-thumb {47 top: -5px;48 width: 15px;49 height: 35px;50 background: none;51 border-style: solid;52 border-color: black;53 border-width: 2px;54 border-radius: 5px;55 cursor: pointer;56 }57 58 59 60 61 .color_slider_bg {62 background: -webkit-gradient(linear, left top, right top, from(red), color-stop(17%, #ff0), color-stop(33%, lime), color-stop(50%, cyan), color-stop(66%, blue), color-stop(83%, #f0f), to(red));63 background:linear-gradient(to right, red, #ff0 17%, lime 33%, cyan, blue 66%, #f0f 83%, red);64 }65 66 .LinkButton{67 text-align: center;68 vertical-align: middle;69 line-height: 60px;70 background: #0073aa;71 color: white;72 height: 60px;73 font-size: 17px;74 cursor: pointer;75 }76 77 78 .hidden{79 display: none;80 }81 82 .text_input{83 width: 100%;84 }85 86 87 88 89 1 /* 90 2 Elements on Color Tab … … 163 75 } 164 76 165 166 .divButton{167 text-align: center;168 vertical-align: middle;169 background: #777777;170 color: white;171 font-size: 17px;172 cursor: pointer;173 width: 20%;174 padding: 3px 10px 3px 10px;175 top: 10px;176 position: relative;177 box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4), 0 6px 20px 0 rgba(0, 0, 0, 0.28);178 }179 .divButton:hover{180 color: white;181 background: #777777;182 box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);183 } -
stapp-video/trunk/includes/css/styleForGlobalBackend.css
r2495895 r2500100 120 120 } 121 121 122 /* 123 DIV BUTTTON 124 */ 125 126 127 128 .divButton{ 129 text-align: center; 130 vertical-align: middle; 131 background: #777777; 132 color: white; 133 font-size: 17px; 134 cursor: pointer; 135 width: 20%; 136 padding: 3px 10px 3px 10px; 137 top: 10px; 138 position: relative; 139 box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.4), 0 6px 20px 0 rgba(0, 0, 0, 0.28); 140 } 141 .divButton:hover{ 142 color: white; 143 background: #777777; 144 box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 145 } 146 147 148 /* 149 Global Classes for all Tabs 150 */ 151 152 153 .mainLabel{ 154 top: -10px; 155 left: 10px; 156 background-color: #f1f1f1; 157 position: relative; 158 } 159 160 .important_label{ 161 color: red; 162 } 163 164 .slider{ 165 -webkit-appearance: none; 166 width: 100%; 167 height: 25px; 168 background: #d3d3d3; 169 outline: none; 170 opacity: 0.7; 171 -webkit-transition: .2s; 172 transition: opacity .2s; 173 border-style: solid; 174 border-color: black; 175 border-width: 2px; 176 border-radius: 5px; 177 } 178 179 .slider::-webkit-slider-thumb { 180 -webkit-appearance: none; 181 appearance: none; 182 top: -5px; 183 width: 15px; 184 height: 35px; 185 background: none; 186 border-style: solid; 187 border-color: black; 188 border-width: 2px; 189 border-radius: 5px; 190 cursor: pointer; 191 } 192 193 .slider::-moz-range-thumb { 194 top: -5px; 195 width: 15px; 196 height: 35px; 197 background: none; 198 border-style: solid; 199 border-color: black; 200 border-width: 2px; 201 border-radius: 5px; 202 cursor: pointer; 203 } 204 205 206 207 208 .color_slider_bg { 209 background: -webkit-gradient(linear, left top, right top, from(red), color-stop(17%, #ff0), color-stop(33%, lime), color-stop(50%, cyan), color-stop(66%, blue), color-stop(83%, #f0f), to(red)); 210 background:linear-gradient(to right, red, #ff0 17%, lime 33%, cyan, blue 66%, #f0f 83%, red); 211 } 212 213 .LinkButton{ 214 text-align: center; 215 vertical-align: middle; 216 line-height: 60px; 217 background: #0073aa; 218 color: white; 219 height: 60px; 220 font-size: 17px; 221 cursor: pointer; 222 } 223 224 225 .hidden{ 226 display: none; 227 } 228 229 .text_input{ 230 width: 100%; 231 } -
stapp-video/trunk/includes/db/stapp_video_readData.php
r2495895 r2500100 151 151 152 152 function checkSTAppVideoCounter(){ 153 $cClass = new STAppVideo Counter();153 $cClass = new STAppVideoAdjustment(); 154 154 return $cClass->isMax(); 155 155 } 156 156 157 157 function checkSTAppVideoConfigExists(){ 158 $cClass = new STAppVideo Counter();158 $cClass = new STAppVideoAdjustment(); 159 159 return $cClass->checkExists(); 160 160 } 161 161 162 class STAppVideoCounter{ 162 function checkSTAppVideoIsProEnabled(){ 163 $cClass = new STAppVideoAdjustment(); 164 return $cClass->isEnabled(); 165 } 166 167 class STAppVideoAdjustment{ 168 169 170 function isEnabled(){ 171 return $this->isProEnabeled(); 172 } 173 174 163 175 function isMax(){ 176 if ($this->isProEnabeled()){ 177 return false; 178 } 164 179 if ($this->getCurrentCounter()>=$this->getMaxLimit()){ 165 180 return true; … … 200 215 } 201 216 202 } 217 private function isProEnabeled(){ 218 if (get_option('stapp_video_pro_value') == 1){ 219 return true; 220 } 221 return false; 222 } 223 224 } -
stapp-video/trunk/includes/db/stapp_video_writeData.php
r2495895 r2500100 101 101 102 102 } 103 104 105 class stapp_video_unlock_plugin{ 106 107 function unlock($data){ 108 if ($this->checkKey($data)){ 109 $this->setunlockPlugin(); 110 } 111 } 112 113 114 private function checkKey($data){ 115 $key = 'unlock_key'; 116 if ($this->isKeyIsSet($data, $key)) { 117 $value = sanitize_key($this->getValue($data,$key)); 118 $GLOBALS['Stapp_Video_Result_Type']["value"] = $this->getValue($data,$key); 119 $GLOBALS['Stapp_Video_Result_Type']["message"] = $this->checkValue($value); 120 if (empty($GLOBALS['Stapp_Video_Result_Type']["message"])){ 121 return true; 122 } 123 } 124 return false; 125 } 126 127 private function isKeyIsSet($data, $key){ 128 if ( isset($data[$key]) ){ 129 return true; 130 } 131 $GLOBALS['Stapp_Video_Result_Type']["message"] = "You entered no licence key!"; 132 return false; 133 } 134 135 private function getValue($data, $key){ 136 return $data[$key]; 137 } 138 139 140 private function checkValue($value){ 141 if (empty ($value)){ 142 return "You entered no licence key!"; 143 }else { 144 $value = $this->replaceByKey("-", "", $value); 145 if ( strlen( $value ) != 16){ 146 return "You entered a incorrect licence key!"; 147 }else{ 148 if ($this->checkValueList(str_split ( $value , 1 ))){ 149 return ""; 150 } else{ 151 return "You entered a worng licence key!"; 152 } 153 } 154 } 155 } 156 157 private function checkValueList($list){ 158 $i = 0; 159 160 $ref = $this->refList(); 161 foreach ($list as $item){ 162 if (chr($ref[$i]) != $item){ 163 return false; 164 } 165 $i++; 166 } 167 return true; 168 169 } 170 171 172 private function refList(){ 173 return [ 174 0 => '114', 175 1 => '117', 176 2 => '53', 177 3 => '103', 178 4 => '114', 179 5 => '56', 180 6 => '103', 181 7 => '101', 182 8 => '97', 183 9 => '114', 184 10 => '57', 185 11 => '113', 186 12 => '118', 187 13 => '56', 188 14 => '97', 189 15 => '122', 190 ]; 191 } 192 193 //replace parameter form list 194 private function replaceByKey($old, $new, $shortcode_string) 195 { 196 $shortcode_string = str_ireplace($old, $new, $shortcode_string); 197 return $shortcode_string; 198 } 199 200 private function setunlockPlugin(){ 201 update_option('stapp_video_pro_value', 1); 202 } 203 204 } -
stapp-video/trunk/includes/stapp_activate_plugin.php
r2495895 r2500100 6 6 7 7 function activate(){ 8 if (!$this->isActivated()){ 9 $this->createVideoTable(); 10 $this->setVersion(); 11 $this->setCounter(); 12 $this->setDefaultVideoWidth(); 13 $this->setSTappVideoDesignModus(); 14 } 8 $this->createVideoTable(); 9 $this->setVersion(); 10 $this->setCounter(); 11 $this->setDefaultVideoWidth(); 12 $this->setSTappVideoDesignModus(); 13 $this->setSTappVideoDesignProValue(); 15 14 } 16 15 17 16 18 17 private function createVideoTable(){ 19 $class = new stapp_video_create_tables(); 20 $class->createTable(); 18 if (!$this->isOptionActivated('stapp_video_version')) { 19 $class = new stapp_video_create_tables(); 20 $class->createTable(); 21 } 21 22 } 22 23 … … 24 25 private function setVersion(){ 25 26 static $stapp_tbl_version = 100; 26 add_option( 'stapp_video_version', $stapp_tbl_version );27 $this->checkOption( 'stapp_video_version', $stapp_tbl_version ); 27 28 } 28 29 29 30 private function setCounter(){ 30 31 static $stapp_counter = 1; 31 add_option( 'stapp_video_counter', $stapp_counter );32 $this->checkOption( 'stapp_video_counter', $stapp_counter ); 32 33 } 33 34 34 35 private function setDefaultVideoWidth(){ 35 36 36 add_option( 'stapp_video_phone_default_breakpoint', 0 );37 add_option( 'stapp_video_tablet_default_breakpoint', 500 );38 add_option( 'stapp_video_desktop_default_breakpoint', 960 );39 add_option( 'stapp_video_desktop_hd_default_breakpoint', 1200 );40 add_option( 'stapp_video_desktop_4k_default_breakpoint', 1600 );37 $this->checkOption( 'stapp_video_phone_default_breakpoint', 0 ); 38 $this->checkOption( 'stapp_video_tablet_default_breakpoint', 500 ); 39 $this->checkOption( 'stapp_video_desktop_default_breakpoint', 960 ); 40 $this->checkOption( 'stapp_video_desktop_hd_default_breakpoint', 1200 ); 41 $this->checkOption( 'stapp_video_desktop_4k_default_breakpoint', 1600 ); 41 42 } 42 43 43 44 44 45 private function setSTappVideoDesignModus(){ 45 add_option( 'stapp_video_design_modus', 0 ); 46 $this->checkOption( 'stapp_video_design_modus', 0 ); 47 } 48 49 private function setSTappVideoDesignProValue(){ 50 $this->checkOption( 'stapp_video_pro_value', 0 ); 46 51 } 47 52 48 53 54 private function checkOption($optionKey,$initalValue){ 55 if (!$this->isOptionActivated($optionKey)){ 56 $this->setOption($optionKey, $initalValue); 57 } 58 } 49 59 50 private function isActivated(){ 51 $option = trim( get_option('stapp_video_counter')); 60 private function setOption($optionKey,$initalValue) { 61 add_option( $optionKey, $initalValue ); 62 } 63 64 65 private function isOptionActivated($optionKey){ 66 $option = trim( get_option($optionKey)); 52 67 if ( empty( $option ) ) { 53 68 return false; -
stapp-video/trunk/readme.txt
r2495988 r2500100 6 6 Tested up to: 5.7 7 7 Requires PHP: 7.0 8 Stable tag: 1. 08 Stable tag: 1.1 9 9 License: GPLv3 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 33 33 == Questions & Support == 34 34 35 For more informations, please visit us at: [dev-wordpress.com](https://dev-wordpress.com/) 36 If you have any questions, please contact us Mail(mailto:[email protected] "[email protected]") 35 For more informations, please visit us at: [dev-wordpress.com](https://dev-wordpress.com/produkt/video/) 36 If you have any questions, please [contact us directly](https://dev-wordpress.com/contact/) 37 37 38 38 39 == Changelog == 39 40 41 42 = 1.1 = 43 44 * Enable Support for Pro Version 45 * Minor Bugfixes 46 40 47 = 1.0 = 41 48 49 * Initial release 42 50 43 51 44 -
stapp-video/trunk/stapp_video.php
r2495897 r2500100 7 7 Plugin URI: https://dev-wordpress.com/forum/ 8 8 Description: Insert videos on any postion via shortcode 9 Version: 1. 09 Version: 1.1 10 10 Author: STApp Professional GmbH 11 11 Author URI: https://stapp-professional.de … … 24 24 25 25 26 define( 'STAPP_VIDEO_VERSION', '1. 0' );26 define( 'STAPP_VIDEO_VERSION', '1.1' ); 27 27 28 28 define( 'STAPP_VIDEO_REQUIRED_WP_VERSION', '5.7' );
Note: See TracChangeset
for help on using the changeset viewer.