Archive for the ‘Wordpress’ Category

Wordpress: Implementing Custom Smilies

Posted on July 24, 2008

I’m offering free smilies and thought I should add a tutorial for WordPress users explaining how to add smilies you have downloaded from other sites or smilies they you have made. You may need some knowledge of PHP before editing the code.

Upload Your Smiley Set

The first step is to upload your images to the wp-includes/images/smilies directory. You can name them whatever you want to, I suppose. For example, stfu-please.gif and chuck-norris.gif can both be used. However, I followed the default WordPress set: icon_name.gif.

You may replace the default smilies or delete all of them and upload your new set. Make sure you back them them up before deletion.

Finding The Array

There is an array that converts text into images in a file called functions.php (vars.php in older versions) located in the wp-includes folder. The array starts somewhere around line 1863. I suggest you use a program for code editing such as Notepad++ or TextWrangler (for Mac).

Adding To The Array

If you are going to create a new array, I suggest you back up the old array or leave /* */ comment tags around the default array like in the example below:

// my new array
':chuck:' => 'icon_chucknorris.gif',
':stfu:' => 'icon_stfu.gif',
/*
'8)' => 'icon_cool.gif',
'8O' => 'icon_eek.gif',
':(' => 'icon_sad.gif',
':)' => 'icon_smile.gif',
':?' => 'icon_confused.gif',
':D' => 'icon_biggrin.gif',
':P' => 'icon_razz.gif',
':o' => 'icon_surprised.gif',
':x' => 'icon_mad.gif',
':|' => 'icon_neutral.gif',
';)' => 'icon_wink.gif',
*/

As you can see it is very straightforward and easy to do. To make it clearer, I will “translate” the array for you.

:-) convert to => :)

You may also want several ways for WordPress to convert an image, like so:

':)' => 'icon_smile.gif',
':-)' => 'icon_smile.gif',
':smile:' => 'icon_smile.gif',

Results

If I write :-) it will come out as :)

If I write :-P it will come out as :P

Hopefully, I made it clear enough for you to understand. If you need any help, drop a comment or contact me.

This post is filed under Geeky, Tutorials, Wordpress and has no comments

Smiley Set Test

Posted on July 22, 2008

I hax0red Wordpress. Yay.

:) :D =3 :3 :O 8D x( :wtf: :P :blush: :B

This post is filed under Wordpress and has 1 comment

“Tyner” is Out

Posted on July 15, 2008

Wordpress v2.6 “Tyner” just came out today or tonight, wherever you are. Although the administration is similar to 2.5, there are new features which makes life way easier for users (and me, especially).

You still browse around your administration through the same clickity, click, click, oh yay I’m here navigation unless you use a plugin called Lighter Menus in which you don’t have to clickity, click, click consistently.

Wordpress 2.6 also allows you to “skip back in time” (like Hiro Nakamura, yatta!) to previous drafts of the same content. It also enables you to compare all the past revisions you have saved. Yay for that.

I feel like an advertiser now. Mehh….

Besides poking around WP 2.6, I finally installed Chyrp. The beta version requires only MySQL 4.1 or SQLite 3 and does not need the MySQL PDO driver. However, it requires PHP 5.

I’m still having some problems but that’s just because I’m not very fluent in any coding other than XHTML and CSS.

For now, I’ll be “Wordpressing” my new design. Tata for now.

This post is filed under Geeky, Wordpress and has 5 comments