How to change Wordpress default emoticons

  1. Install the Smilies Themer plugin
  2. Activate it.
  3. Go to Settings > Smilies Themer and pick a theme pack. If you want to create a custom one, keep reading
  4. Create a folder with the name of your theme pack in wp-content/themes/smilies-themer/. In my case I called it devthought
  5. Place your emoticons in that folder and a file called package-config.php

    art

  6. Place a code like this in package-config.php

    <?php
     
    /*
     * Package-Name: Theme name
     * Package-URI: http://yourwebsite.com
     * Package-Description: Your theme description
     * Package-Author: Your name
     * Package-Author-URI: http://yourwebsite.com
     */
     
    $wp_smilies = array(
    	'>:o'      => 'angryface.png',
    	'>:-O'   => 'angryface.png',
    	':-['       => 'blush.png',
    	':['         => 'blush.png',
    );
    // add as many as you want respecting the same format:
    // 'emoticon' => 'file.jpg',
  7. Go to Settings and choose your package!

Now you’re done! :) :[ >:o :o :X :-/ ;) :D o:)

This post has 7 responses

Count your feed readers with style

I’ve just released a new Wordpress plugin: FeedBurnerCount. It gets the job of retrieving feed readers from the FeedBurner API done efficiently.

Lately it seems the API is up and down all the time, many times providing invalid data, and recently moved to a new URI. The one plugin that solves this same task hasn’t been updated in months, and it’s not ready for an inconsistent API, which results in a N/A count all the time.

FeedBurnerCount can maintain your feed count even if the Awareness API is not working (or you can specify a custom message for those situations), and calculate the average readers count in a period of time. It also sniffs your feedburner details (if the FeedBurner plugin installed) for an impossibly easier setup.

Head to the the plugin page for more details.

This post has 13 responses

Posted in Projects about 1 year ago

Prevent caching of modified Javascript & CSS assets

There’s a very useful PHP function called filemtime, that returns the timestamp of the modification time of the file. This is similar to how the HTTP 1.1 ETag header is generated. The strategy is basically to append the modification date to the script or CSS URI in order to refresh the user’s cache when you’ve modified them.

This is an extract from Devthought header.php Wordpress template file:

<link rel="stylesheet" href="<?php echo get_stylesheet_directory_uri() . '/style.css?' . filemtime(get_stylesheet_directory() . '/style.css'); ?>" type="text/css" media="screen" title="Stylesheet" charset="utf-8" />
 
<script type="text/javascript" charset="utf-8" src="<?php echo get_template_directory_uri() . '/js/scripts.js?' . filemtime(get_template_directory() . '/js/scripts.js'); ?>" ></script>

All you have to do is change the routes to match your files. If you’re not using wordpress, you’ll have to remove the get_stylesheet_directory* and get_template_directory* function calls and replace with your paths.

This post has 3 responses

Posted in Server side about 1 year ago

Best Wordpress Design awards

I’m signing up for this Wordpress design competetion, organized by the guys over at WPWebHost team. Only Wordpress-powered sites are elegible, and there are 5 categories with 10 featured sites and 1 winner each.

The winners will be decided by the public, so it’ll be nice if you cast your vote for your all-time favorite Devthought! As for the prizes, winners will get a badge, $200 cash via Paypal, and excellent life-time hosting (which I’d love).

I’m signing up for the Best Modern and Elegant category, which probably also means some strong competition :)

This post has 5 responses

Posted in General about 1 year ago

Append your blog description to the window title in Wordpress

I wanted my homepage title to reveal my writing goals and interests. The importance of the title, to me, is obvious:

  • It’s one of the first things people notice.
  • It’s visible in the window chrome, the tabs, the bookmarks
  • It’s something search engines pay attention to

Wordpress settings allow you to set the blog title and description. With this modification, the description will be appended whenever a post title is not displayed, to avoid making it extremely long.

Edit the functions.php file of your template and append:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
add_filter('wp_title', 'dv_wp_title', 100, 3);
 
$dv_append_subtitle = false;
 
function dv_wp_title($title)
{
  global $dv_append_subtitle;
 
  if($title === '') 
    $dv_append_subtitle = true;
 
  return $title;
}
 
function dv_the_subtitle($sep = '&mdash;')
{
  global $dv_append_subtitle;
 
  if($dv_append_subtitle)
  {
    echo $sep ? $sep . ' ' : '';
    bloginfo('description');  
  }
}

Then go to header.php and make your title tag look like this (notice that I added the dv_the_subtitle call)

<title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?> <?php dv_the_subtitle(); ?></title>

And that’s it! If you want to customize the separator, which defaults to — pass it as an argument to dv_the_subtitle.

This post has 7 responses

WP-o-Matic 1.0RC4 released

Some important and some not-as-important bug fixes in this version. Hopefully this will be the last release candidate before the grand 1.0 release:

  • Tables not deleted anymore upon installation
  • Fixed SimplePie error report.
  • Fixed small post content bug (not hidden by default)
  • Fixed cron url
  • Removed inverted quotes from queries
  • Fixed notices in debug mode
  • No error showing for campaigns w/o feeds fixed

Click here to download

As usual, head to Lighthouse for bug reports

This post has 6 responses

Posted in Projects over 2 years ago

WP-o-Matic 1.0RC3 beta shipping.

Here is the upcoming RC3 release!

Remember that, just like any release prior to 1.0, upgrading will erase your previous campaigns, feeds, logs, etc.

  • Now compatible with Wordpress 2.5
  • Categories shown with indentation (parent > children now separated)
  • SimplePie updated to 1.1.1, and SimplePie Core now supported.
  • Fixed broken cron command
  • Fixed broken export on some systems
  • Fixed broken redirect when resetting a campaign
  • Everything now stored in GMT to avoid time issues. Gotten rid of NOW() functions in favor of WP time functions
  • Fixed bug with validation upon deletion of feeds in existing campaigns
  • Fixed bug with ‘allow comments’ setting.
  • Fixed bug with logs dates
  • Fixed bug with double quote escaping (fixes campaign templates / rewrite html bugs)
  • Username in options tab changed to a more handy select box.
  • Interface now looks better on IE (d’oh)
  • Added many help files
  • Fixed annoying duplicates bug
  • Fixed small bug in import with labels

I need feedback on:

  • All sorts of errors, warnings, notices, blank screens
  • Styling problems, indicating Browser, OS, URL and a screenshot.
  • Behavioral problems: bad dates, bad content, duplicates, etc
  • Performance problems
  • Unexpected behavior

Always include instructions on how to reproduce the issues please!

Go ahead and download it

Updates

  • 1 – Fixed bugs with categories in edit mode and posts tools (thanks Mike)
  • 2 – Fixed empty rewrite bug (thanks Mike) and replacements now case insensitive
  • 3 – Fixed bugs with ‘use feed date’ option, footer copyright, bad dates in ‘view all’ logs, log message field made text, timestamps converted to datetime, ‘Clean logs’ function fixed (big changes, please test)
  • 4 – Fixed bugs with older WP releases (now WP-o-Matic works with any version starting from 2.2). Now rewrite works with PHP4.
  • 5 – str_ireplace bug fixed, allow comments bug fixed, now user can choose comments state.
  • 6 – {content} not getting rewritten fixed, titles and other settings not being stored fixed.

This post has 87 responses

Posted in Projects over 2 years ago

WP-o-Matic 1.0RC3 on its way

Update: here it is

Just writing to let you know that the upcoming release candidate of WP-o-Matic is being cooked and betatested!

This is a list of all the exciting changes, which include new features you’ve been requesting and lots of bugfixes

  • Categories shown with indentation (parent > children now separated)
  • Fixed broken cron command
  • SimplePie updated to 1.1
  • Fixed broken export on some systems
  • Fixed broken redirect when resetting a campaign
  • Everything now stored in GMT to avoid time issues. Gotten rid of NOW() functions in favor of WP time functions
  • Fixed bug with validation upon deletion of feeds in existing campaigns
  • Fixed bug with ‘allow comments’ setting.
  • Fixed bug with logs dates
  • Fixed bug with double quote escaping (fixes campaign templates / rewrite html bugs)
  • Username in options tab changed to a more handy select box.
  • Interface now looks better on IE (d’oh)
  • New option added to select max number of items to process
  • New option added to decide whether the permalink should point to the created blog post or to the source permalink
  • New general option to get logs feedback while the campaign is being processed.

As usual, stay tuned. Sorry for not being able to respond and release with more frequency, but I’ve been really busy.

This post has 43 responses

Posted in Projects over 2 years ago

WP-o-Matic 1.0 to be released

This weekend (around Sat 26) WP-o-Matic 1.0 is to be released, including many bugfixes, some small new features (like tags support in campaign creation), and most importantly, full Wordpress 2.3 support

This stable branch will not see feature updates in quite a while, only bugfixes, in an attempt to provide a solid and reliable feed aggregating plugin for Wordpress once and for all.

You can contribute! Suggest new features or changes for the upcoming WP-o-Matic 1.1 by posting your comments here. You can stay up-to-date with all the news regarding WP-o-Matic through your favorite RSS reader.

Update: Here is a pre-release version for you to try.

It’s fully 2.3 and 2.4 compatible, and includes the new setup screen to assist users in installing WP-o-Matic successfully. Click here to download

Update 2: Newest version here. WP-o-Matic is slowly reaching perfection

Update 3: You can find WP-o-Matic RC2 in the main post now.

This post has 78 responses

Posted in Projects over 2 years ago

WP-o-Matic 1.0RC1 released (updated again)

After so much feedback, reading so many of your -often annoying- comments, the first release candidate is out.

Continue reading

This post has 59 responses

Posted in Projects over 3 years ago