Sunday, March 21, 2010

Removing trailing comas with PHP

November 2, 2009 by Josh Highland  
Filed under php, tutorials

Removing trailing comas with PHP

Dealing with trailing comas in lists is common problem for developers. I found the best way to handle this situation in PHP is with the following regular expression.

$string = eregi_replace(’,$’, ”, $string);

Before: string = “2, 6, 9,”
After: string = “2, 6, 9″
Only the trailing coma will be stripped. If no coma is found, the string [...]

Create Wordpress Thumbnails Automatically

September 29, 2009 by Josh Highland  
Filed under php, tutorials, wordpress

Create Wordpress Thumbnails Automatically

WordPress has the ability to allow post authors to assign custom fields to a post. This arbitrary extra information is known as meta-data. This meta-data can be used by theme authors to do some pretty cool things.
The theme I am currently using allows for a custom field named “thumb”. If you create the “thumb” custom [...]

phpBB admin password manual reset

phpBB admin password manual reset

Today I ran into a situation where I had forgotten the password to my development instance of phpBB 3. I was stuck in a situation were I needed to reset the password. I had full admin access to the database, so changing it there wouldn’t be the problem. The real problem is that phpBB uses [...]

Modifying MimboPro to Add Paged Navigation To Category Pages

December 8, 2008 by Josh Highland  
Filed under hacks, internet, php, tutorials, web 2.0, wordpress

Modifying MimboPro to Add Paged Navigation To Category Pages

Recently I have been doing a lot of work with Wordpress. I love Wordpress. one of the things I like most about Wordpress is the plugins and themes.
I recently bought a copy of the MimboPro theme. Mimbo is clean and very professional. More of a CMS theme then a blogging theme, prefect for what I [...]

WordPress 2.7 is almost here!

December 3, 2008 by Josh Highland  
Filed under php, web 2.0

WordPress 2.7 is almost here!

OMG OMG OMG! WordPress 2.7 is almost here. Here is a long list of the changes that are going to be in the latest release. I have been a huge wordpress fan for some years now. Its always treated me well. Its treated me so well that I have decided to move my main website, [...]

How I do layouts and views in CodeIgniter

November 9, 2008 by Josh Highland  
Filed under php, software, tutorials

How I do layouts and views in CodeIgniter

I have been a loyal fan of the kick-ass php framework, codeIgniter, for some time now. A while back I made a post on how to improve the view handling of codeIgniter. I would like to retract that post. Through the comments on that post I found out about an undocumented parameter (as of version [...]

php sprintf + sql like

July 6, 2008 by Josh Highland  
Filed under MySQL, php, tutorials

php sprintf + sql like

Sometimes I do my best programming when I’m tired. Don’t ask me why, I just do. It’s a skill I picked up in college.
Being tired and producing good code wasn’t the case last night. I was trying to use the sprintf PHP function with a SQL “Like” statement. I made some dumb mistakes that tripped [...]

Improving CodeIgniters View Handling

April 29, 2008 by Josh Highland  
Filed under php, tutorials

Improving CodeIgniters View Handling

If you have ever worked with an MVC framework for web developent, you know that the “V” stands for “view”.
At work, I program in coldfusion, and use the coldbox framework, and I love it. At home, I write PHP code, with the codeigniter framework.
I love codeigniter, but I think that its biggest weakness is the [...]

LifeStreaming Is Simple As Pie

LifeStreaming Is Simple As Pie

Its not secret, I love social networking, I cant get enough of it. I also love programming and anything internet related.
I’m not sure how I came across it, but a PHP based, Object Oriented RSS caching tool named SimplePie caught my attention.
Previously I had been using a tool called Last RSS, but I found that [...]

WordPress 2.5 image upload problem : SOLVED

March 30, 2008 by Josh Highland  
Filed under hacks, internet, php, software, tutorials, wordpress

WordPress 2.5 image upload problem : SOLVED

This afternoon I upgraded my blog to the latest version of wordpress, 2.5. The install went great and it was simple to do. I didn’t realize that I had any problems until I went to make a blog post and upload an image. When I tried to upload, I was greeted with the following:

Something was [...]

Next Page »