TextMate Find & Replace Using Regular Expressions

While working on a new section of the Question-Defense.com web site that will include articles related to Kali Linux I was creating a menu system that would be similar to the Kali Linux menu system. Once the menu was completed with the necessary content and was visually what I was looking for I needed to go back and make some enhancements for SEO (Search Engine Optimization). The goal was to add a HTML title tag where a HTML alt tag already existed and I knew this shouldn’t be to hard to accomplish using regular expressions via TextMate’s find and replace function. Below I describe the issue in more detail along with the regular expression syntax that can be used to accomplish this in the TextMate find and replace window. Please make sure to backup all files you are going to modify before beginning so you can always rollback if need be.

Technology Insights

Use CSS To Make Text Wrap Around An Image, Insert Image In A Paragraph

Earlier today while working on an e-commerce store for a client I was adding a couple simple content pages such as the typical “About Us” page. Anyhow I don’t use CSS on a daily basis so I typically forget the various syntax and/or tags that I need to use to accomplish certain tasks. In this case I needed to add a couple head shot images to the bio section of the About Us page and wanted the text to wrap around the head shot images. This is easy to do but I wanted to note for others and for future reference for myself.

Technology Insights

Amazon Machine Tags WordPress Plugin Not Working, Easy Switch To Amazon Product In A Post Plugin

I have been using the Amazon Machine Tags WordPress plugin on numerous sites for a long time and have been happy with the results up until the last couple of months. I believe that Amazon has made some changes to their API over the last year or so and it has caused a lot of issues with the Amazon Machine Tags plugin. I even wrote this article in mid February discussing a work around that would allow the Amazon Machine Tags plugin to continue working until the developer was able to make some changes. Since that time I have been monitoring my posts to see if the Amazon products are always displaying and unfortunately even with the fix mentioned in the February article items were still not displaying at all times. Below I noted an alternative that provides solid functionality.

Technology Insights

WordPress Lightbox 2 Plugin Pop Up Falling Behind WordPress Theme Content

Typically I will use the WordPress Lightbox 2 plugin to provide a format for images within posts on a WordPress site. Basically this plugin provides an ajax window that images open in and you can scroll between the images with mini arrows to the left and the right side or you can close the image with a close button that appears at the bottom right of the image display. You can also change any of this appearance easily through the various CSS files included with four different default themes with Lightbox 2. While working on a WordPress site earlier tonight I ran into an issue where the lightbox 2 image pop up was falling behind the body content. The fix ended up being easy but it needed to be pointed out for others to fix quickly.

Technology Insights

WordPress Syntaxhighlighter Evolved: No Wrap Alternating Background Colors Cut Off

I have been using the WordPress Syntaxhighlighter Plus plugin to display code for quite awhile now. Today I wanted to check on recent updates and through reading on the developers site found out that the code is no longer maintained and he recommends people use the WordPress Syntaxhighlighter Evolved plugin instead. I decided to go ahead and download the Syntaxhighlighter Evolved plugin and test it on my development site. I was pleased immediately with the choice and knew that I would be moving it live as soon as I had any kinks worked out. There was only one thing holding me bac which was the fact that with the code wrap turned off the CSS for alternating colors and for the highlighting was cut off when you started to scroll to any code that spilled out past the default size. The plugin also blew out the right side of my site a bit so I needed to modify a couple CSS width parameters. I describe a workaround for the alternating colors being cut off below as well as how to set the width so it doesn’t blow out your layout.