wpmu-signup.php verändern

Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen

  • wpmu-signup.php verändern

    Hey,
    ich würde gerne in folgenden Code ein paar Wörter einfügen, da ich auf meine AGBs verweisen will.
    Jedoch funktioniert es nicht, da die Seite nach der Änderung nach wie vor genauso (unverändert) erscheint. Hab es auch schon mit dem echo Befehl probiert.
    Wo muss ich genau hinschreiben, damit die PHP-Datei etwas ausgibt?

    PHP-Quellcode

    1. <?php
    2. /** Sets up the WordPress Environment. */
    3. require( dirname(__FILE__) . '/wp-load.php' );
    4. add_action( 'wp_head', 'signuppageheaders' ) ;
    5. require( 'wp-blog-header.php' );
    6. require_once( ABSPATH . WPINC . '/registration.php' );
    7. if( is_array( get_site_option( 'illegal_names' )) && $_GET[ 'new' ] != '' && in_array( $_GET[ 'new' ], get_site_option( 'illegal_names' ) ) == true ) {
    8. wp_redirect( "http://{$current_site->domain}{$current_site->path}" );
    9. die();
    10. }
    11. function do_signup_header() {
    12. do_action("signup_header");
    13. }
    14. add_action( 'wp_head', 'do_signup_header' );
    15. function signuppageheaders() {
    16. echo "<meta name='robots' content='noindex,nofollow' />\n";
    17. }
    18. if( $current_blog->domain . $current_blog->path != $current_site->domain . $current_site->path ) {
    19. wp_redirect( "http://" . $current_site->domain . $current_site->path . "wp-signup.php" );
    20. die();
    21. }
    22. function wpmu_signup_stylesheet() {
    23. ?>
    24. <style type="text/css">
    25. .mu_register { width: 90%; margin:0 auto; }
    26. .mu_register form { margin-top: 2em; }
    27. .mu_register .error { font-weight:700; padding:10px; color:#333333; background:#FFEBE8; border:1px solid #CC0000; }
    28. .mu_register #submit,
    29. .mu_register #blog_title,
    30. .mu_register #user_email,
    31. .mu_register #blogname,
    32. .mu_register #user_name { width:100%; font-size: 24px; margin:5px 0; }
    33. .mu_register .prefix_address,
    34. .mu_register .suffix_address {font-size: 18px;display:inline; }
    35. .mu_register label { font-weight:700; font-size:15px; display:block; margin:10px 0; }
    36. .mu_register label.checkbox { display:inline; }
    37. .mu_register .mu_alert { font-weight:700; padding:10px; color:#333333; background:#ffffe0; border:1px solid #e6db55; }
    38. </style>
    39. <?php
    40. }
    41. add_action( 'wp_head', 'wpmu_signup_stylesheet' );
    42. get_header();
    43. ?>
    44. <div id="content" class="widecolumn">
    45. <div class="mu_register">
    46. <?php
    47. function show_blog_form($blogname = '', $blog_title = '', $errors = '') {
    48. global $current_site;
    49. // Blog name
    50. if( constant( "VHOST" ) == 'no' )
    51. echo '<label for="blogname">' . __('Blog Name:') . '</label>';
    52. else
    53. echo '<label for="blogname">' . __('Blog Domain:') . '</label>';
    54. if ( $errmsg = $errors->get_error_message('blogname') ) { ?>
    55. <p class="error"><?php echo $errmsg ?></p>
    56. <?php }
    57. if( constant( "VHOST" ) == 'no' ) {
    58. echo '<span class="prefix_address">' . $current_site->domain . $current_site->path . '</span><input name="blogname" type="text" id="blogname" value="'.$blogname.'" maxlength="50" /><br />';
    59. } else {
    60. echo '<input name="blogname" type="text" id="blogname" value="'.$blogname.'" maxlength="50" /><span class="suffix_address">.' . $current_site->domain . $current_site->path . '</span><br />';
    61. }
    62. if ( !is_user_logged_in() ) {
    63. print '(<strong>' . __( 'Your address will be ' );
    64. if( constant( "VHOST" ) == 'no' ) {
    65. print $current_site->domain . $current_site->path . __( 'blogname' );
    66. } else {
    67. print __( 'domain.' ) . $current_site->domain . $current_site->path;
    68. }
    69. echo '.</strong> ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed so choose carefully!)' ) . '</p>';
    70. }
    71. // Blog Title
    72. ?>
    73. <label for="blog_title"><?php _e('Blog Title:') ?></label>
    74. <?php if ( $errmsg = $errors->get_error_message('blog_title') ) { ?>
    75. <p class="error"><?php echo $errmsg ?></p>
    76. <?php }
    77. echo '<input name="blog_title" type="text" id="blog_title" value="'.wp_specialchars($blog_title, 1).'" /></p>';
    78. ?>
    79. <p>
    80. <label for="blog_public_on"><?php _e('Privacy:') ?></label>
    81. <?php _e('I would like my blog to appear in search engines like Google and Technorati, and in public listings around this site.'); ?>
    82. <div style="clear:both;"></div>
    83. <label class="checkbox" for="blog_public_on">
    84. <input type="radio" id="blog_public_on" name="blog_public" value="1" <?php if( !isset( $_POST['blog_public'] ) || $_POST['blog_public'] == '1' ) { ?>checked="checked"<?php } ?> />
    85. <strong><?php _e( 'Yes' ); ?></strong>
    86. </label>
    87. <label class="checkbox" for="blog_public_off">
    88. <input type="radio" id="blog_public_off" name="blog_public" value="0" <?php if( isset( $_POST['blog_public'] ) && $_POST['blog_public'] == '0' ) { ?>checked="checked"<?php } ?> />
    89. <strong><?php _e( 'No' ); ?></strong>
    90. </label>
    91. </p>
    92. <?php
    93. do_action('signup_blogform', $errors);
    94. }
    95. function validate_blog_form() {
    96. $user = '';
    97. if ( is_user_logged_in() )
    98. $user = wp_get_current_user();
    99. ...
    Alles anzeigen
  • Man sollte niemals Dateien einer Fremdkomponente selbst editieren. Entweder das System hat eine Plugin Schnittstelle oder das System ist nicht erweiterbar.
    Im Falle von Wordpress hast du Glück und gibt es eine Plugin Schnittstelle. Ich würde dir empfehlen hier ein bisschen nach Stichworten wie signup oder registration zu recherchieren.

    Treffer für bestehende Plugins:
    WordPress › Support » Tags — terms of use
    The Wordpress Terms of Use plugin, yes I know there are many other options out there to do this however this plugin takes a slightly different approach. ...
    wordpress.org/tags/terms-of-use

    WordPress Custom Fields Plugin
    This is truly an extremely useful Wordpress plugin which allows you to insert custom user input fields into the registration form and profile editing pages ...
    tribulant.com/products/view/7/wordpress-custom-fields-plugin

    Ansonsten musst du dich in die Plugin Architektur einarbeiten:
    wordpress.org/development/