The MU forums have moved to

wpmu-admin.php - Site Stats - IP banning? (4 posts)

  1. plainsman
    Posted 18 years ago #

    I have taken the code from the Site Stats / wpmu-admin.php file and modified it to appear on my front page to show the most active blogs. Simple to do and works well.

    What I would like to do now is 'exclude' a few of the blogs from the list. I tried the info from the Codex used to accomplish the same thing with showing categories, pages, etc. but haven't had any luck so far.

    Has anyone succeeded in doing this?

    another issue is perhaps being able to (1) capture the IP of those signing up for a blog and (2) perhaps ban the IP of users that create spam blogs.

    I realize that banning IPs is often futile, but I have received a few from East European countries, etc. I would like to keep signup public for our project.

    I know how to do IP banning in .htaccess, but I don't get an IP when they sign up. Has anyone modded their site to accomplish this? capture the IP on signup?

    Thank you.

  2. deadlyromio
    Posted 18 years ago #

    How do you do that? To take the code from site stats and make the most active blog show on the front page. I tried that but I just errors.

  3. plainsman
    Posted 18 years ago #

    I took this code and altered it from the admin file:
    (hope it shows up with the code /code tags)

    Note: the "exclude=43" part did not have any effect. Still trying to figure out what to put where to exclude reporting certain blogs


    do_action( "wpmuadminresult", "" );

    switch( $_GET[ 'action' ] ) {
    // print some global stats.
    $stats = get_sitestats();
    print "<h3>Most Active Blogs</h3>
    There are currently ".$stats[ 'blogs' ]." blogs running on this server and ".$stats[ 'users' ]." users.

    print "<table>";
    #$blogs = get_blog_list(exclude=43);
    #print "<br>blogs: <br>";
    #print_r( $blogs );

    $most_active = get_most_active_blogs( 15, false );
    if( is_array( $most_active ) ) {
    print "<tr><th scope='col'>15 Most Active Blogs</th></tr>";
    while( list( $key, $details ) = each( $most_active ) ) {
    $class = ('alternate' == $class) ? '' : 'alternate';
    $url = "http://" . $details[ 'domain' ] . $details[ 'path' ];
    print "<tr class='$class'><td>$url</td></tr>";
    print "</table>";

    do_action( "wpmuadmindefaultpage", "" );


  4. skcsknathan001
    Posted 17 years ago #

About this Topic

  • Started 18 years ago by plainsman
  • Latest reply from skcsknathan001