Ayuda con codigo PHP Steam Group
Hola a todos.
Tengo el siguiente codigo PHP, como puedo hacer para incrustarlo en un codigo html y poder crear un widget para mi web?
<? php / * Nombre del complemento: Widget de grupo de la comunidad de Steam URI del complemento: http://panotlet.tk/steam-group-widget/ Descripción: Muestra tu grupo como un widget! Versión: 1.0.1 Autor: Paweł Otlewski Autor URI: http://panotlet.tk/ * / la clase otletsg_widget extiende WP_Widget { función __construir () { padre :: __construido ( ' otletsg_widget ' , __ ( ' Steam Group ' , ' otletsg_widget_domain ' ), array ( ' description ' => __ ( ' Widget de Steam Group para mostrar un grupo de Steam ' , ' otletsg_widget_domain ' ),) ); } formulario de función pública ( $ instancia ) { if ( isset ( $ instance [ ' title ' ])) { $ title = $ instance [ ' title ' ]; } else { $ title = __ ( ' Steam Group ' , ' otletsg_widget_domain ' ); } if ( isset ( $ instance [ ' adress ' ])) { $ dirección = $ instancia [ ' dirección ' ]; } else { $ adress = __ ( ' http://example.com ' , ' otletsg_widget_domain ' ); } ? > < p > < label for = " <? php echo $ this -> get_field_id ( ' title ' ); ? > " > <? php _e ( ' Title: ' ); ? > </ label > ? > " /> </ p > < p > < Etiqueta de = " <? Php? Echo $ this -> get_field_id ( ' dirección ' ); ? > " > Dirección </ etiqueta > ? > " /> </ p > <? php } widget de función pública ( $ args , $ instance ) { $ title = apply_filters ( ' widget_title ' , $ instance [ ' title ' ]); echo $ args [ ' before_widget ' ]; si ( ! vacio ( $ titulo )) echo $ args [ ' before_title ' ] . $ título . $ args [ ' after_title ' ]; $ groupURL = apply_filters ( ' widget_text ' , $ instance [ ' adress ' ]); $ xml = simplexml_load_file ( $ groupURL . '/ memberslistxml /' ); eco ' <table> <tr> <th colspan = "2"> <img src = " ' . $ xml -> groupDetails -> avatarFull . ' " width = "100%"> </th> </tr> <tr> <td> Nombre del grupo </td> <td> ' . $ xml -> groupDetails -> groupName . ' </td> </tr> <tr> <td> Cuenta de miembros </td> <td> ' . $ xml -> groupDetails -> memberCount . ' </td> </tr> <tr> <td> En el juego </td> <td> ' . $ xml -> groupDetails -> membersInGame . ' </td> </tr> <tr> <td> en línea </td> <td> ' . $ xml -> groupDetails -> membersOnline . ' </td> </tr> <tr> <td colspan = "2"> <a href=" '$groupURL.' "> Mostrar este grupo </a> </ td> </tr> </table> ' ; echo $ args [ ' after_widget ' ]; } actualización de la función pública ( $ new_instance , $ old_instance ) { $ instance = array (); $ instance [ ' title ' ] = ( ! empty ( $ new_instance [ ' title ' ]))? strip_tags ( $ new_instance [ ' title ' ]): ' ' ; $ instancia [ ' dirección ' ] = ( ! empty ( $ new_instance [ ' dirección ' ]))? strip_tags ( $ new_instance [ ' dirección ' ]): ' ' ; devolver $ instancia ; } } función otletsg_load_widget () { register_widget ( ' otletsg_widget ' ); } add_action ( ' widgets_init ' , ' otletsg_load_widget ' );