Subdomain form for anti-splog signup – force random string


I am running Anti-Splog on a subdomain wpmu install.

I have edited ust-wp-signup.php

I am able to generate a random string with this code:

$subdomainhash = array_merge(range(0,9),range('a','z'));
$newsubdomain = implode('',array_slice($subdomainhash,0,32));
echo $newsubdomain;

Now, to force users to use that string on the select subdomain form I have to edit the following code:

<label for="blogname">' . __('Site Domain:') . '</label>';

if ( $errmsg = $errors->get_error_message('blogname') ) { ?>
<p class="error"><?php echo $errmsg ?></p>
<?php }

if ( !is_subdomain_install() )

echo '<span class="prefix_address">' . $current_site->domain . $current_site->path . '</span><input name="blogname" type="text" id="blogname" value="'. esc_attr($blogname) .'" maxlength="60" />';
echo '<input name="blogname" type="text" id="blogname" value="'.esc_attr($blogname).'" maxlength="60" /><span class="suffix_address">.' . ( $site_domain = preg_replace( '|^www.|', '', $current_site->domain ) ) . '</span>';

if ( !is_user_logged_in() ) {
if ( !is_subdomain_install() )

$site = $current_site->domain . $current_site->path . __( 'sitename' );
$site = __( 'domain' ) . '.' . $site_domain . $current_site->path;

echo '<p>(<strong>' . sprintf( __('Your address will be %s.'), $site ) . '</strong>) ' . __( 'Must be at least 4 characters, letters and numbers only. It cannot be changed, so choose carefully!' ) . '</p>';

It doesn’t seem to matter if I force $blogname or $site to be $newsubdomain.

It does not fill the value of the form, or replace the above strings. I can’t get it working?

Ideally, I want to stop users from choosing their own subdomain and force them to use the random subdomain string above on a new site registration.

I believe Aaron developed this plugin. But any php guru could help.

Thanks in advance,