Category: Blogs

Dec 13 2008

Wordpess 2.7 and PHP4

I upgraded to Wordpress 2.7 but found that the ‘Press This’ bookmarklet returned this error:

Fatal error: Call to undefined function: htmlspecialchars_decode

It identified line 554 of the ‘wp-admin/press-this.php‘ file. As it turns out, ‘htmlspecialchars_decode‘ is a PHP version 5 function call and I’m running PHP version 4. This fix is to edit wp-admin/press-this.php and change the ‘htmlspecialchars_decode‘ call to the version 4 function call ‘html_entity_decode‘.

Jul 18 2008

WordPress 2.6

Version 2.6 of WordPress.org is now available, almost a month ahead schedule. Version 2.6 “Tyner,” named for jazz pianist McCoy Tyner, contains a number of new features that make WordPress a more powerful CMS: you can now track changes to every post and page and easily post from wherever you are on the web, plus there are dozens of incremental improvements to the features introduced in version 2.5.

A brief video tour of 2.6 has been prepared. If you have 3 minutes and 29 seconds to spare, it’s worth a watch:

WordPress › Blog » WordPress 2.6.

Jun 24 2008

Elastix - The reliable PBX appliance software

I just discovered Elastix, It is an ISO image that installs CentOS, Asterisk, FreePBX, and other goodies to create an instant PBX. Compare it to PBX In A Flash and Trixbox.

Mar 30 2008

WordPress Widgets

Widgets are now part of WordPress core since version 2.2. You can proceed straight to the WordPress Widgets Blog to find some widgets to try out for your WordPress blog.

Oct 22 2007

HOWTO: Make your Wordpress code highlited

An easy way to make your code (or preformatted text) stand out is to add an entry to your style.css cascading style sheet for your current theme. On this site you will notice little blue boxes wherever I have inserted code or shell commands. To do this, add the <pre> and <code> tags around the text you want highlighted. Don’t forget to close the tags after your text with </code> and </pre> tags. For example:

<pre><code>
 some text here
< /code>< /pre>

Note: I had to insert a space in the code and pre closing tags above to make them appear. In your code the spaces should not be there.

Now edit your /wordpress/wp-content/themes/mytheme/style.css and add a pre section to wherever your theme styles the post. On my theme it is under the .post section. So my style.css looks like this:

.post pre {
        -moz-border-radius: 5px;
        background-color: #F9FBFC;
        border: 1px solid #C3CED9;
        padding: 8px;
        margin-bottom: 5px;
        width: 400px;
        overflow: auto;
        text-align: left;
        }

To clean things up further, download the Code Auto Escape plugin. This will make sure wordpress does not step on your code.

Oct 16 2007

Installing/Updating WordPress with Subversion

Here is an easy way to upgrade your Wordpress installations.
Installing/Updating WordPress with Subversion « WordPress Codex

New Install

To install a fresh copy of WordPress, type the following at your command prompt, starting from the directory above where you want to install WordPress. These commands will create a directory “blog” for your blog, and then check out (Subversion command “co”), or extract from the repository, the stable version of WordPress you have chosen. Do not type the “$” characters — they are just indications of the command prompt. Here are the commands (assuming the version you want is 2.3):

Read more »

Apr 13 2007

Search and Replace Wordpress Plugin

If you run wordpress then this plugin is for you. There will come a time when you will want to change something across your site. This is the way to do it. In my case, I needed to change

 to <code> due to an old plugin not being compatible with the latest version of wordpress.

Software: Search and Replace Wordpress Plugin

This is a plugin for Wordpress to allow you to search and replace text across all your posts.

This plugin is for Wordpress 1.5 or better (including 2.0).

It is uses SQL replace so it’s fast but not very flexible.

Dec 27 2006

HOWTO: Send JPilot alarms to your Cell Phone

I use JPilot as my desktop organizer and sync it with my Palm TX on Ubuntu. An alarm box will pop up on the desktop when appointments are due. But what if you are away from your computer when the reminder pops up? Here is my solution. This should give you some ideas so that you can customize as needed.

Since I’m using Ubuntu I had to install the email package so I could email from the command line. You may already have this ability with your distribution. If so, skip the next step.

  • Install command-line email:
  • sudo apt-get install ssmtp
    sudo apt-get install mailutils
  • After installing ssmtp I like to run this command to get everything configured properly with the new mail utils:
  • sudo dpkg-reconfigure ssmtp
  • Create a shell file called jpilot-alarm.sh and place it in your .jpilot home directory. I used vi to create my file:
  • vi ~/.jpilot/jpilot-alarm.sh
  • Then insert this line into the file, substituting your cell phone email address:
  • /bin/echo "$1 $2 - $4" | mail -s "JPilot Alarm - $3" cellphonenumber@cellphonecompany.com;aplay /usr/share/sounds/phone.wav

    The first part of this line (the part before the semicolon) sends the email to your cell phone. The $1 will be substituted automatically with the date, $2 with the time, $3 with the description, and $4 with the body of the note. If you don’t know the email address of your cell phone then contact your cell phone provider. The second part of this line plays a wav file through your computer’s speakers to scare the ba-jeebers out of you when your sitting in front of your computer. :-o

  • Now we need to make this shell script executable. Type this command:
  • chmod 755 ~/.jpilot/jpilot-alarm.sh
  • Now open up JPilot, select File/Preferences and click on the Alarms tab. Check both “Open alarm windows” and “Execute this command”. Then put this command in the Alarm Command box.
  • ~/.jpilot/jpilot-alarm.sh "%d" "%t" "%D" "%N"

That should do it. If you have the email address to your cell phone set correctly, and your computer is connected to the Internet, you should be getting your JPilot alarms on your cell phone.

[NOTE] The JPilot package provided with Ubuntu does not have the %D and %N flags compiled in. So you may just get %D as the name of all your alarms and %N as the message body. If you compile JPilot from source using the configuration flag --enable-alarm-shell-danger you will be able to get this functionality. If you want the pretty Ubuntu buttons in jpilot then include the configuration flag --enable-stock-buttons too. To compile jpilot on a Ubuntu box you will need several development packages and the pilot-link package installed. Add them in like this:

sudo apt-get install gettext pilot-link build-essential libgtk2.0-dev libgnome-pilot2-dev libssl-dev
Apr 27 2006

Google AdSense and Wordpress 2

The Social Programmer

If you are using Google AdSense make sure that your AdSense code is protected from WordPress’s new Preview feature. Easily achieved using something similar to this

< ?php global $wp_query; if (!$wp_query->is_preview): ?>
// Paste your AdSense code here //
< ?php endif; ?>

Mar 16 2006

WordPress: 2.0.2 is available

This latest release of WordPress looks really good. This site is running WordPress 2.0.

WordPress - Home

WordPress is a state-of-the-art semantic personal publishing platform with a focus on aesthetics, web standards, and usability. What a mouthful. WordPress is both free and priceless at the same time.

More simply, WordPress is what you use when you want to work with your blogging software, not fight it.

Feb 05 2006

WordPress Hack: Bookmarklet #2

When I make a post that quotes another site I always want the link to open in another window. I’ve been manually adding target=”_blank” to every post. This gets old. In addition, I thought it would be nice to visually indicate that this is a quote from somewhere else. How do you get this to happen automatically.

Here’s the answer …

Assuming you have already dragged the bookmarklet link from the Write Post screen to your browser’s toolbar, you need to make changes to the Location field of the bookmarklet. Your existing bookmarklet location should look something like this:
[code lang="javascript"]javascript:if(navigator.userAgent.indexOf(’Safari’)>=0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href=’http://www.example.com/wp-admin/post-new.php?text=’+encodeURIComponent(Q)+’&popupurl=’+encodeURIComponent(location.href)+’&popuptitle=’+encodeURIComponent(document.title);

Change it to:
[code lang="javascript"]javascript:if(navigator.userAgent.indexOf(’Safari’)>=0){Q=getSelection();}else{Q=document.selection?document.selection.createRange().text:document.getSelection();}location.href=’http://www.example.com/wp-admin/post-new.php?text=’+encodeURIComponent(’<BLOCKQUOTE>’+Q+’</BLOCKQUOTE>’)+’&popupurl=’+encodeURIComponent(location.href+’" target="_blank’)+’&popuptitle=’+encodeURIComponent(document.title);

Of course you need to change example.com to your actual blog address.

Now whenever you quote another site using the bookmarklet you will automatically insert a link with a target. In addition, the text will stand out as indented.

Feb 05 2006

Wordpress Hack: Opening Links in New Windows

Here’s a quick hack that lets you add a Target to html link using the ‘link’ button on the WordPress Write Post screen. The page referes to the ‘quicktags.js’ file being in the wp-admin folder. On WordPress 2.x it is located in the wp-includes/js/ folder.

Wordpress Hack: Opening Links in New Windows

The code creates a prompt for the target when you click on link button in the Quicktags toolbar. I have set the default target to be _blank using the variable LinkTarget. You can set it to what you want.

Read more »

Jul 06 2005

WordPress Plugin: Exhibit

Red Alt - Page tools and resources

“This plugin allows you to associate image thumbnails to posts, and display them in a variety of ways that link to the original images.”

May 11 2005

opensourceCMS.com

Thinking of trying out a content management system (CMS) on your server? This site lets you test drive all the popular opensource packages, whether its a blog, portal, groupware, wiki, etc.

opensourceCMS.com

“This site was created with one goal in mind. To give you the opportunity to “try out” some of the best php/mysql based free and open source software systems in the world.”

May 07 2005

WordPress Hack: My Category Listing

There are two things I don’t like about WordPress’ default listing for categories. (The defaults for day, month, search, etc. are fine.)

  1. It does not show all posts for the category. It follows the number of posts you define under options for the main page. Personally I like to see every post for each catergory.
  2. I don’t like to see the excerpt for posts in the category listing. Generally the category list can get long and the excerpts add to the mess.

So here is my hack to fix these two problems …
Read more »

May 03 2005

WordPress Plugin: RSS feed

My Other Side of the Stories » CA-Terasi

“This plugin will grab news from RSS feed.”

May 03 2005

WordPress Plugin: Code Highlight

Chroder.com » Blog Archive » WordPress Code Highlight Plugin

“Post syntax highlighted code, or simply post code that is not affected by the WordPress text replacement features.”

May 03 2005

WordPress Plugin: WeatherIcon 2.0

Sonicpling - Jeremiah’s Blog » WeatherIcon 2.0

“WeatherIcon (a plugin for wordpress that shows the current weather conditions for your location with a pretty icon)”

Read more »

May 02 2005

WordPress Hack: Dropdown without Submit Button

Template Tags/dropdown cats « WordPress Codex

“Displays category select (dropdown) in HTML form without a submit button.
[code lang="xml"]



A note on the second example: Using this as-is will work, but your page will no longer validate as correct XHTML. If this is important to you, you will need to edit your template-functions-category.php file to comment-out lines 208 (echo “<select name=’cat’ class=’postform’>\n”;) and 227 (echo “</select>\n”;). This will prevent your form generating superfluous tags.”

Note: In versions 1.5.1.3 - 1.5.2 you need to comment-out lines 201 and 220 instead of 208 and 227.

Note: Not only does it not validate XHTML, it does not display the categories in a drop down box when viewed with Internet Explorer. Firefox works just fine. IE bombs. I recommend hacking the two lines in /wp-includes/template-functions-category.php.

Apr 25 2005

WordPress Hack: Bookmarklet

WordPress Bookmarklet Hack by Blogging Pro

Most of the posting I do here at Blogging Pro is done using the JavaScript bookmark found at the bottom left hand side of the Write Post screen in the admin section of WordPress. By dragging that link to the quick links section of your browser, you have an easy way to quickly create a post with the URL and selected data from the page you’re currently looking at.

The problem is I like to use the advanced Write Post screen mainly because of the edit timestamp feature. I like to space out my posts so I usually future date them, especially if I find a boat load of WordPress resources all at once.

To have the Advanced Write Post screen display, open up bookmarklet.php in the wp-admin folder and change line 101 to <?php require(’edit-form-advanced.php’); ?>.

Jan 20 2005

MovableType Bookmarklet Hack

When I make a post that quotes another site I always want the link to open in another window. I’ve been manually adding target=”link” to every post. This gets old. In addition, I thought it would be nice to visually indicate that this is a quote from somewhere else. How do you get this to happen automatically.

Here’s the answer …
Read more »

Jan 06 2005

Poor Man’s MT Comment Spam Blocker

I was recently hit with a ton of comment spam on my Movable Type blogs. I created a quick and dirty script that prompts the user to press an additional button before the comment will post. This should block automated commenting scripts. (I hope) Here is the modified mt-comment.cgi file. I’m using Movable Type version 2.661 so this may not work for other version.
Read more »

Nov 10 2004

How to combat comment spam with WordPress

WordPress Wiki - How to combat comment spam with WordPress

This little article is going to try and save you from the incredibly annoying entity that is comment spam (Boo, Hiss!!). If it you don’t have a problem with comment spam right now, it is almost a certainty that you will at some point in the future.

Nov 09 2004

MT-Blacklist

MT-Blacklist - A Movable Type Anti-spam Plugin

A Movable Type plugin to eradicate
comment and trackback spam

May 19 2004

How do you make a website skinnable?

Skinning a website / creating website themes - the basics

You need a combination of two things - a server-side scripting language, and cookies. I got the idea from bakiwop.com; he used ASP and cookies. (Alas, the site appears to be gone now.) I don’t have access to ASP on my server, and I don’t know how to make it work in ASP, so if you want to use that language…well…I don’t know what to tell you. Me, I use PHP4 cookies.

Apr 10 2004

Movable Style: Style Switcher Implementation

Movable Style: Style Switcher Implementation

If you like the way you can select multiple style sheets on our site, then checkout the above link which describes how to do it.

Read more »

Mar 31 2004

Movable Style

Movable Style

Ready to use style sheets for default Movable Type templates.

Dec 02 2003

Weather Plugin for MovableType

Weather Plugin Installation Instructions

This is a MovableType.org plugin to get the weather.
Read more »

Nov 11 2003

Drop Down Menus in MovableType

Drop Down Menus

See also: Dave’s JavaScript Guide / Theory and Drop Down List URL Jump Box

Nov 10 2003

NOT Filter for Categories

Ramblings of a Code Monkey: NOT Filter for Categories

This hack adds the ability to specify categories not to display when filtering categories in the tag of MovableType. With this hack, you’ll no longer have to specify each and every category in your blog in order to not display one or two categories.

Oct 30 2003

Adding a “Sideblog” in MT

Anders Jacobsen’s blog: Adding a “Sideblog” in MT

This requires SSI (Server Side Includes). By default the Apache server does not have the .shtml type added nor the XBitHack turned on. However, you can include “XBitHack on” in a .htaccess file. Place this file in the folder where your index.html file is located. You will also need to change the HTMLUmask in mt.cfg to 0022 and set HTMLPerms to 0777.
See: Apache Tutorial: Introduction to Server Side Includes - Apache HTTP Server

Oct 29 2003

A reviews blog

Legends of the Sun Pig: A reviews blog (or sidebar reviews) with Movable Type

And so the “Quick Reviews” sidebar was born.

Oct 27 2003

MT Support Forum

movabletype.org : Support Forum

Movable Type Support Forums

Oct 24 2003

Blogging with MovalbleType

Blogging with MovableType

A Beginner’s Guide to Blogging with MovableType

Oct 24 2003

BlogData Tutorial

Works in Progress - Blogdata

This site has a good tutorial on adding footers to the MovableType Blogger.