Liberated WordPress

Placeholder page for discussing my modifications to WordPress to save bandwidth.

See also:

I offer a form of consultancy on WordPress, mostly at no charge on the #wordpress IRC channel. If you are looking to hire a WordPress consultant, I say only that I know the program very well and I’m a reasonably nice guy to work with. I am spoken of during a development meeting.

I write WordPress articles and comment on WordPress around the internet.

5 Comments

  1. Libertus says:

    Gavin Ayling Says:
    How does your blog extract the registered username and add it to the Description… I guess a plug-in, but I experimented briefly with using which singularly fails to work!

    It isn’t a plug-in – I just coded it directly into the template page. I think I could make a plug-in out of it, but in the meantime, here’s the code I’m using.

    If you would like to take another stab at this on your own blog, I’d be delighted to assist.

  2. Libertus says:

    From my theme’s header.php. This won’t work in anyone else’s WordPress though.

    
    <?php
    
    // Respectfully greet the reader, by name
    // Provide links to the home page and admin pages
    global $user_level$user_identity;
    
    $homehref get_settings('home');
    
    $namelink get_settings('blogname');
    if( !is_home() )
        $namelink "<a href='$homehref'>$namelink</a>";
    else
        if( function_exists('log_post_access') )
            log_post_access();    // post id for 0 indicates homepage access
    
    if( $user_level == USER_GOD )
        $honourific "regrets ";
    else if( $user_level == USER_KNOWN )
        $honourific "is honoured by ";
    else
        $honourific "is delighted by ";
    
    // login username or whatever you use to comment with
    $user_title = empty($user_identity)
                  ? trim(stripslashes($_COOKIE['comment_author_'.COOKIEHASH]))
                  : $user_identity;
    
    if( empty($user_title) ) {
        $honourific .= "your presence";
    } else
        $honourific .= "the presence of $user_title";
    
    if( $user_level == USER_GOD )
        $honourific "<a href='{$homehref}/wp-admin/'>$honourific</a>";
    
    wp_head();
    
    ?>
    </head>
    <body>
    
    <div id="page">
    <div id="header"><div id="headerimg">
    <h1><?php echo $namelink ?></h1>
    <div class="description"><?php echo $honourific ?></div>
    </div></div>
    
    
  3. Gavin Ayling says:

    Thanks Mr Libertus — I think it should be working now!

  4. Gavin Ayling says:

    Should have mentioned, it’s the label for the Random post which will be personalised if possible…

  5. Libertus says:

    You’re most welcome, Gav.

    Your blog is one of the more impressive I’ve seen. What’s your level of comfort with PHP and programming?

Leave a Reply

You must be logged in to post a comment.