Changeset 3379179
- Timestamp:
- 10/16/2025 02:01:55 AM (6 months ago)
- Location:
- hngamers-atavism-core
- Files:
-
- 4 edited
- 1 copied
-
tags/0.0.16 (copied) (copied from hngamers-atavism-core/trunk)
-
tags/0.0.16/hngamerscore.php (modified) (12 diffs)
-
tags/0.0.16/readme.txt (modified) (2 diffs)
-
trunk/hngamerscore.php (modified) (12 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hngamers-atavism-core/tags/0.0.16/hngamerscore.php
r3366147 r3379179 12 12 * Plugin URI: https://hngamers.com/courses/atavism-wordpress-cms/ 13 13 * Description: These are the Core Atavism Settings and are used in each of the addon plugins that will be coming. 14 * Version: 0.0.1 414 * Version: 0.0.16 15 15 * Author: thevisad 16 16 * Author URI: https://hngamers.com/ … … 29 29 add_action('admin_init', array( $this,'hngamers_core_admin_init')); 30 30 add_action('wp_login', array( $this, 'hngamers_core_get_user_characters'), 10, 2); 31 add_action('admin_enqueue_scripts', array( $this, 'hngamers_core_admin_styles'), 10, 2); 32 31 add_action('admin_enqueue_scripts', array( $this, 'hngamers_core_admin_styles'), 10, 2); 33 32 } 34 33 … … 56 55 57 56 if ($this->hngamers_core_check_server_port($db_test_options['hngamers_atavism_master_db_hostname_string'], $db_test_options['hngamers_atavism_master_db_port_string'])) { 58 $mysqli_conn = new mysqli(57 $mysqli_conn = @new mysqli( 59 58 $db_test_options['hngamers_atavism_master_db_hostname_string'], 60 59 $db_test_options['hngamers_atavism_master_db_user_string'], … … 63 62 $db_test_options['hngamers_atavism_master_db_port_string'] 64 63 ); 64 if ($mysqli_conn->connect_errno) { 65 error_log("MySQLi Connection Error: " . $mysqli_conn->connect_error); 66 return; 67 } 65 68 } else { 66 69 echo "<font color='red'><b>Failure!</b></font><p>Unable to connect to the server on the specified port.</p>"; … … 81 84 INNER JOIN admin.account_character ON `master`.account_character.character_id = admin.account_character.characterId 82 85 WHERE `master`.account.id = ?"); 86 87 $user_id = (int) get_current_user_id(); 83 88 $stmt->bind_param("i", $user_id); 84 89 $stmt->execute(); … … 167 172 <?php $this->hngamers_core_database_connectivity(); ?> 168 173 </div> 169 <?php submit_button(); ?> 174 </div> <!-- close .wrap if needed --> 175 176 <div style="margin-top: 20px;"> 177 <?php submit_button('Save All Settings'); ?> 178 </div> 179 </form> 170 180 </form> 171 181 </div> … … 184 194 <?php 185 195 } 196 186 197 function hngamers_core_admin_styles() { 187 wp_enqueue_style('hngamers-admin-styles', plugin_dir_url(__FILE__) . 'hngamers-admin-styles.css'); 188 } 198 $css_path = plugin_dir_path(__FILE__) . 'hngamers-admin-styles.css'; 199 $css_url = plugin_dir_url(__FILE__) . 'hngamers-admin-styles.css'; 200 if ( file_exists($css_path) ) { 201 wp_enqueue_style('hngamers-admin-styles', $css_url, [], filemtime($css_path)); 202 } 203 } 204 189 205 190 206 function hngamers_core_image_size_fn() { … … 217 233 218 234 if ($this->hngamers_core_check_server_port($hostname, $port)) { 219 $mysqli_conn = new mysqli($hostname, $user, $password, $schema, $port); 235 $mysqli_conn = @new mysqli($hostname, $user, $password, $schema, $port); 236 if ($mysqli_conn->connect_errno) { 237 error_log("MySQLi Connection Error: " . $mysqli_conn->connect_error); 238 return; 239 } 220 240 if ($mysqli_conn && $mysqli_conn->connect_errno) { 221 echo "<p class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error , $domain = 'default') . "</p>";241 echo "<p class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error) . "</p>"; 222 242 } else { 223 243 echo "<div class='hngamers-status-row'><span class='label'>Master:</span> … … 235 255 for ($count = 1; $count <= $server_count; $count++) { 236 256 echo '<div class="hngamers-admin-box">'; 237 echo '<h3>Server ' . esc_html( $count, $domain = 'default') . ' Database Status</h3>';257 echo '<h3>Server ' . esc_html( (string) $count ) . ' Database Status</h3>'; 238 258 239 259 // Admin Database … … 246 266 if ($this->hngamers_core_check_server_port($admin_hostname, $admin_port)) { 247 267 echo '<p>Admin: '; 248 $mysqli_conn = new mysqli($admin_hostname, $admin_user, $admin_password, $admin_schema, $admin_port); 268 $mysqli_conn = @new mysqli($admin_hostname, $admin_user, $admin_password, $admin_schema, $admin_port); 269 if ($mysqli_conn->connect_errno) { 270 error_log("MySQLi Connection Error: " . $mysqli_conn->connect_error); 271 return; 272 } 249 273 if ($mysqli_conn && $mysqli_conn->connect_errno) { 250 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error , $domain = 'default') . "</span></p>";274 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error) . "</span></p>"; 251 275 } else if (!$mysqli_conn) { 252 276 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Database Connection Failure!</span></p>"; … … 268 292 if ($this->hngamers_core_check_server_port($atavism_hostname, $atavism_port)) { 269 293 echo '<p>Atavism: '; 270 $mysqli_conn = new mysqli($atavism_hostname, $atavism_user, $atavism_password, $atavism_schema, $atavism_port); 294 $mysqli_conn = @new mysqli($atavism_hostname, $atavism_user, $atavism_password, $atavism_schema, $atavism_port); 295 if ($mysqli_conn->connect_errno) { 296 error_log("MySQLi Connection Error: " . $mysqli_conn->connect_error); 297 return; 298 } 271 299 if ($mysqli_conn && $mysqli_conn->connect_errno) { 272 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error , $domain = 'default') . "</span></p>";300 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error) . "</span></p>"; 273 301 } else if (!$mysqli_conn) { 274 302 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Database Connection Failure!</span></p>"; … … 291 319 if ($this->hngamers_core_check_server_port($worldcontent_hostname, $worldcontent_port)) { 292 320 echo '<p>Content: '; 293 $mysqli_conn = new mysqli($worldcontent_hostname, $worldcontent_user, $worldcontent_password, $worldcontent_schema, $worldcontent_port); 321 $mysqli_conn = @new mysqli($worldcontent_hostname, $worldcontent_user, $worldcontent_password, $worldcontent_schema, $worldcontent_port); 322 if ($mysqli_conn->connect_errno) { 323 error_log("MySQLi Connection Error: " . $mysqli_conn->connect_error); 324 return; 325 } 294 326 if ($mysqli_conn && $mysqli_conn->connect_errno) { 295 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error , $domain = 'default') . "</span></p>";327 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error) . "</span></p>"; 296 328 } else if (!$mysqli_conn) { 297 329 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Database Connection Failure!</span></p>"; -
hngamers-atavism-core/tags/0.0.16/readme.txt
r3366147 r3379179 4 4 Donate link: https://hngamers.com/support-and-thank-you/ 5 5 Requires at least: 6.0 6 Tested up to: 6.8. 26 Tested up to: 6.8.3 7 7 Requires PHP: 7.4 8 Stable tag: 0.0.1 48 Stable tag: 0.0.16 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 31 31 32 32 == Changelog == 33 = 0.0.16 = 34 Corrected an issue with the database structure and menu layout. This created a potential for a blank page if the database failed and also prevented the save button from rendering. 35 33 36 = 0.0.14 = 37 34 38 Too Tired Release 35 39 -
hngamers-atavism-core/trunk/hngamerscore.php
r3366147 r3379179 12 12 * Plugin URI: https://hngamers.com/courses/atavism-wordpress-cms/ 13 13 * Description: These are the Core Atavism Settings and are used in each of the addon plugins that will be coming. 14 * Version: 0.0.1 414 * Version: 0.0.16 15 15 * Author: thevisad 16 16 * Author URI: https://hngamers.com/ … … 29 29 add_action('admin_init', array( $this,'hngamers_core_admin_init')); 30 30 add_action('wp_login', array( $this, 'hngamers_core_get_user_characters'), 10, 2); 31 add_action('admin_enqueue_scripts', array( $this, 'hngamers_core_admin_styles'), 10, 2); 32 31 add_action('admin_enqueue_scripts', array( $this, 'hngamers_core_admin_styles'), 10, 2); 33 32 } 34 33 … … 56 55 57 56 if ($this->hngamers_core_check_server_port($db_test_options['hngamers_atavism_master_db_hostname_string'], $db_test_options['hngamers_atavism_master_db_port_string'])) { 58 $mysqli_conn = new mysqli(57 $mysqli_conn = @new mysqli( 59 58 $db_test_options['hngamers_atavism_master_db_hostname_string'], 60 59 $db_test_options['hngamers_atavism_master_db_user_string'], … … 63 62 $db_test_options['hngamers_atavism_master_db_port_string'] 64 63 ); 64 if ($mysqli_conn->connect_errno) { 65 error_log("MySQLi Connection Error: " . $mysqli_conn->connect_error); 66 return; 67 } 65 68 } else { 66 69 echo "<font color='red'><b>Failure!</b></font><p>Unable to connect to the server on the specified port.</p>"; … … 81 84 INNER JOIN admin.account_character ON `master`.account_character.character_id = admin.account_character.characterId 82 85 WHERE `master`.account.id = ?"); 86 87 $user_id = (int) get_current_user_id(); 83 88 $stmt->bind_param("i", $user_id); 84 89 $stmt->execute(); … … 167 172 <?php $this->hngamers_core_database_connectivity(); ?> 168 173 </div> 169 <?php submit_button(); ?> 174 </div> <!-- close .wrap if needed --> 175 176 <div style="margin-top: 20px;"> 177 <?php submit_button('Save All Settings'); ?> 178 </div> 179 </form> 170 180 </form> 171 181 </div> … … 184 194 <?php 185 195 } 196 186 197 function hngamers_core_admin_styles() { 187 wp_enqueue_style('hngamers-admin-styles', plugin_dir_url(__FILE__) . 'hngamers-admin-styles.css'); 188 } 198 $css_path = plugin_dir_path(__FILE__) . 'hngamers-admin-styles.css'; 199 $css_url = plugin_dir_url(__FILE__) . 'hngamers-admin-styles.css'; 200 if ( file_exists($css_path) ) { 201 wp_enqueue_style('hngamers-admin-styles', $css_url, [], filemtime($css_path)); 202 } 203 } 204 189 205 190 206 function hngamers_core_image_size_fn() { … … 217 233 218 234 if ($this->hngamers_core_check_server_port($hostname, $port)) { 219 $mysqli_conn = new mysqli($hostname, $user, $password, $schema, $port); 235 $mysqli_conn = @new mysqli($hostname, $user, $password, $schema, $port); 236 if ($mysqli_conn->connect_errno) { 237 error_log("MySQLi Connection Error: " . $mysqli_conn->connect_error); 238 return; 239 } 220 240 if ($mysqli_conn && $mysqli_conn->connect_errno) { 221 echo "<p class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error , $domain = 'default') . "</p>";241 echo "<p class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error) . "</p>"; 222 242 } else { 223 243 echo "<div class='hngamers-status-row'><span class='label'>Master:</span> … … 235 255 for ($count = 1; $count <= $server_count; $count++) { 236 256 echo '<div class="hngamers-admin-box">'; 237 echo '<h3>Server ' . esc_html( $count, $domain = 'default') . ' Database Status</h3>';257 echo '<h3>Server ' . esc_html( (string) $count ) . ' Database Status</h3>'; 238 258 239 259 // Admin Database … … 246 266 if ($this->hngamers_core_check_server_port($admin_hostname, $admin_port)) { 247 267 echo '<p>Admin: '; 248 $mysqli_conn = new mysqli($admin_hostname, $admin_user, $admin_password, $admin_schema, $admin_port); 268 $mysqli_conn = @new mysqli($admin_hostname, $admin_user, $admin_password, $admin_schema, $admin_port); 269 if ($mysqli_conn->connect_errno) { 270 error_log("MySQLi Connection Error: " . $mysqli_conn->connect_error); 271 return; 272 } 249 273 if ($mysqli_conn && $mysqli_conn->connect_errno) { 250 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error , $domain = 'default') . "</span></p>";274 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error) . "</span></p>"; 251 275 } else if (!$mysqli_conn) { 252 276 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Database Connection Failure!</span></p>"; … … 268 292 if ($this->hngamers_core_check_server_port($atavism_hostname, $atavism_port)) { 269 293 echo '<p>Atavism: '; 270 $mysqli_conn = new mysqli($atavism_hostname, $atavism_user, $atavism_password, $atavism_schema, $atavism_port); 294 $mysqli_conn = @new mysqli($atavism_hostname, $atavism_user, $atavism_password, $atavism_schema, $atavism_port); 295 if ($mysqli_conn->connect_errno) { 296 error_log("MySQLi Connection Error: " . $mysqli_conn->connect_error); 297 return; 298 } 271 299 if ($mysqli_conn && $mysqli_conn->connect_errno) { 272 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error , $domain = 'default') . "</span></p>";300 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error) . "</span></p>"; 273 301 } else if (!$mysqli_conn) { 274 302 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Database Connection Failure!</span></p>"; … … 291 319 if ($this->hngamers_core_check_server_port($worldcontent_hostname, $worldcontent_port)) { 292 320 echo '<p>Content: '; 293 $mysqli_conn = new mysqli($worldcontent_hostname, $worldcontent_user, $worldcontent_password, $worldcontent_schema, $worldcontent_port); 321 $mysqli_conn = @new mysqli($worldcontent_hostname, $worldcontent_user, $worldcontent_password, $worldcontent_schema, $worldcontent_port); 322 if ($mysqli_conn->connect_errno) { 323 error_log("MySQLi Connection Error: " . $mysqli_conn->connect_error); 324 return; 325 } 294 326 if ($mysqli_conn && $mysqli_conn->connect_errno) { 295 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error , $domain = 'default') . "</span></p>";327 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Failure! " . esc_html($mysqli_conn->connect_error) . "</span></p>"; 296 328 } else if (!$mysqli_conn) { 297 329 echo "<span class='hngamers-status-failure'><img src='" . $plugin_url . "images/offline$image_set.png' alt='Offline' width='$image_size' height='$image_size'> Database Connection Failure!</span></p>"; -
hngamers-atavism-core/trunk/readme.txt
r3366147 r3379179 4 4 Donate link: https://hngamers.com/support-and-thank-you/ 5 5 Requires at least: 6.0 6 Tested up to: 6.8. 26 Tested up to: 6.8.3 7 7 Requires PHP: 7.4 8 Stable tag: 0.0.1 48 Stable tag: 0.0.16 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 31 31 32 32 == Changelog == 33 = 0.0.16 = 34 Corrected an issue with the database structure and menu layout. This created a potential for a blank page if the database failed and also prevented the save button from rendering. 35 33 36 = 0.0.14 = 37 34 38 Too Tired Release 35 39
Note: See TracChangeset
for help on using the changeset viewer.