Tag Archive for 'wordpress'

In need of an automatic wordpress post scheduler plugin

You know those moments where you have many ideas for blog posts, all at once? And, really, you would love to post them all — but publish them spaced out a bit better, just because you like to have a steady stream of posts out in your blog. You can delay the publication of a post in wordpress manually — just set a date in the future.

But is there a wordpress plugin that automatically schedules posts so that, for example, the time between two posts is 3 days?

Lazyweb? Lazyweb? Anyone?

Redesign - Part 1

As you may have noticed I am redesigning the site a bit. In this little series I will be posting some tips and tricks how certain things get done here.

You may have noticed the addition of a third column — or rather a second sidebar. This was done by utilizing a variant of k2 called “3 Column K2“. In these sidebars I have chosen to actually use the widgets for adding and customizing stuff (rather than editing the source files as I did in my previous attempts of adapting k2 to my needs).

Also you might find that little entry from my last.fm journal interesting. It got placed there via a php-widget with the following code (thanks to Jeriko One for the code):

<h2 class=widgettitle><a href=http://www.last.fm/user/dekay/journal/ 
    title=Syndicate as RSS>last.fm journal</a></h2>
<span class=metalink>
    <img src=http://www.last.fm/favicon.ico alt=RSS />
</span>
<?php require_once (ABSPATH . WPINC . /rss-functions.php); ?>
<?php $today = current_time(mysql, 1); ?>
<?php
$rss = @fetch_rss(http://ws.audioscrobbler.com/1.0/user/dekay/journals.rss);
if ( isset($rss->items) && 0 != count($rss->items) ) { ?>
<ul>
    <?php
    $rss->items = array_slice($rss->items, 0, 1);
    foreach ($rss->items as $item ) {
        ?>
    <li>
        <a href=<?php echo wp_filter_kses($item['link']); ?>>
        <?php echo wp_specialchars($item['title']); ?></a> <br/>
        <small><?php echo human_time_diff( strtotime($item[’pubdate’], time())); _e(’ago’); ?>
        </small><br/>
        <?php echo  _e($item['description']) ?>
    </li>

    <?php
    }
}
    ?>
</ul>

The above source code display with all its color coding glory was produced by textmate, theme by Thomas Aylott — even though it seems not all color markups make it.

Old clothes…

If anyone wonders why this blog has been reverted to plain k2: I just upgraded to the current version of k2 (0.9.1) from the old beta 2… and some things broke. No matter, I don’t feel like re-designing the site now, so here it goes… brand new k2, but just the plain old look.

Google analytics plugin, modified

I am using the $dt->blog(); » Google analytics plugin here on this site, but for tracking outgoing link clicks I have had to modify the plugin like this:


add_filter('the_content', 'ga_addonclick', 10);

function ga_addonclick($value){

    if(get_option('ga_onclick')){

        $value = preg_replace("/<a href=\"([^\"]+)\”/e”,
        “‘<a href=\’$1\’ rel=\’nofollow\’ onclick=\”.ga_parseurl(’$1′).’\””   ,$value);
        }
        return $value;
}

function ga_parseurl($href){
    $onclickcode = stripslashes(get_option(’ga_onclick_code’));

    $href = str_replace(’http://’, ”, $href); 

    return str_replace(’$site’,$href,$onclickcode);
}