Hola a todos,
IM trabajando en MinepressUK un proyecto para mí aprender php y suelte una alternativa libre de la próxima minepress (desparramando ambos tuvimos la misma idea al mismo tiempo)
Me preguntaba si habría alguna forma posible de hacer que cuando alguien entradas en un formulario de configuración de su dirección ip del servidor que mostrará un mapa dinámico.
Uso por primera vez
Al iniciar CraftBukkit, debería poder navegar a http://yourserverip:8123/ en su navegador. En caso de que se está CraftBukkit en el PC que está trabajando actualmente, puede navegar a http://localhost:8123/ . Usted debe ser capaz de ver los jugadores que están en juego. Tenga en cuenta que el mapa no está todavía representa, por lo tanto, el fondo será negro.
Si usted está planeando utilizando al procesador de HD, ahora sería un buen momento para hacerlo. Habilitar deftemplatesuffix: contrata en la parte superior de configuration.txt. Más información sobre deftemplatesuffix está disponible en configuración de plugin de Base.
Si sólo desea ver Dynmap trabajar, utilice el comando siguiente en el juego: /dynmap fullrender. El wiki contiene más información sobre comandos y permisos. El mapa debe revelarse gradualmente en el navegador, darle algún tiempo. Mensajes de progreso indican que Dynmap está trabajando y se mostrará cuando se ha completado el procesamiento.
por lo que todos tienen que escribir en el cuadro de entrada es su http://
iphere y agregará automáticamente el puerto
Aquí es lo que tengo hasta ahora:
<?php
/*
Plugin Name: Minepress Dynmap Plugin
Plugin URI: removed
Description: A Minepress plugin which allows the user to integrate the Minecraft
Dynmap
Author: Bradly Spicer
Version: 0.02
Author URI: removed
*/
/* Runs when plugin is activated */
register_activation_hook(__FILE__,'minecraft_dynmap_install');
/* Runs on plugin deactivation*/
register_deactivation_hook( __FILE__, 'minecraft_dynmap_remove' );
function minecraft_dynmap_install() {
/* Creates new database field */
add_option("minecraft_dynmap_data", 'Default', '', 'yes');
}
function hello_world_remove() {
/* Deletes the database field */
delete_option('minecraft_dynmap_data');
if ( is_admin() ){
/* Call the html code */
add_action('admin_menu', 'minecraft_dynmap_admin_menu');
function minecraft_dynmap_admin_menu() {
add_options_page('Dynmap', 'Dynmap', 'administrator',
'hello-world', 'hello_world_html_page');
}
}
?>
The above code, is placed under is_admin() which means it only runs in the wordpress
admin area.
The below function has the html code for the settings page, containing the form and
notice how the php tag is split to accomodate the html code.
and the coding part is..
<?php
function minecraft_dynmap_html_page() {
?>
<div>
<h2>Dynmap Options</h2>
<form method="post" action="options.php">
<?php wp_nonce_field('update-options'); ?>
<table width="510">
<tr valign="top">
<th width="92" scope="row">Enter your server Ip:</th>
<td width="406">
<input name="hello_world_data" type="text" id="minecraft_dynmap_data"
value="<?php echo get_option('minecraft_dynmap_data'); ?>" />
(ex. minecraft_dynmap)</td>
</tr>
</table>
<input type="hidden" name="action" value="update" />
<input type="hidden" name="page_options" value="minecraft_dynmap_data" />
<p>
<input type="submit" value="<?php _e('Save Changes') ?>" />
</p>
</form>
</div>
- <?php
- /*
- Plugin Name: Minepress Dynmap Plugin
- Plugin URI: removed
- Description: A Minepress plugin which allows the user to integrate the Minecraft
-
- Dynmap
- Author: Bradly Spicer
- Version: 0.02
- Author URI: removed
- */
-
- /* Runs when plugin is activated */
- register_activation_hook(__FILE__,'minecraft_dynmap_install');
-
- /* Runs on plugin deactivation*/
- register_deactivation_hook( __FILE__, 'minecraft_dynmap_remove' );
-
- function minecraft_dynmap_install() {
- /* Creates new database field */
- add_option("minecraft_dynmap_data", 'Default', '', 'yes');
- }
-
- function hello_world_remove() {
- /* Deletes the database field */
- delete_option('minecraft_dynmap_data');
-
- if ( is_admin() ){
-
- /* Call the html code */
- add_action('admin_menu', 'minecraft_dynmap_admin_menu');
-
- function minecraft_dynmap_admin_menu() {
- add_options_page('Dynmap', 'Dynmap', 'administrator',
- 'hello-world', 'hello_world_html_page');
- }
- }
- ?>
- The above code, is placed under is_admin() which means it only runs in the wordpress
-
- admin area.
- The below function has the html code for the settings page, containing the form and
-
- notice how the php tag is split to accomodate the html code.
-
- and the coding part is..
- <?php
- function minecraft_dynmap_html_page() {
- ?>
- <div>
- <h2>Dynmap Options</h2>
-
- <form method="post" action="options.php">
- <?php wp_nonce_field('update-options'); ?>
-
- <table width="510">
- <tr valign="top">
- <th width="92" scope="row">Enter your server Ip:</th>
- <td width="406">
- <input name="hello_world_data" type="text" id="minecraft_dynmap_data"
- value="<?php echo get_option('minecraft_dynmap_data'); ?>" />
- (ex. minecraft_dynmap)</td>
- </tr>
- </table>
-
- <input type="hidden" name="action" value="update" />
- <input type="hidden" name="page_options" value="minecraft_dynmap_data" />
-
- <p>
- <input type="submit" value="<?php _e('Save Changes') ?>" />
- </p>
-
- </form>
- </div>