New Circle Blog

Retrieve a Portion of Long Text

December 31st, 2007

Often, I need to get the first few sentances of a long article or post to display as summary. Things to consider include not cutting off any partial words; add … if there is more; make sure html tags are stripped off otherwise we might bury an openning tag in the summary and that will screw up the […]

Edit the Windows Vista Hosts File

December 26th, 2007

I had been trying to edit the hosts file on vista but always receives a message saying no privilege. I didn’t even recall setting up an admin user during vista installation. Finally found a solution on the Internet: http://www.maximumpcguides.com/edit-the-windows-vista-hosts-file/ Open Notepad with Administrative privileges by clicking Start, All Programs, Accessories, and then right-click Notepad and […]

Print Labels – Mail Merge

December 3rd, 2007

I prepared a list of customers to send holiday card to then needed to print them out. Spent some time figure out things since this is the first time I used Mail Merge. Here are the steps that worked for me: Exported customer’s list from Quickbooks into an Excel file Cleaned up Excel file to […]

PHP Date Format Cheat Sheet

November 29th, 2007

Please consult the original documentation for examples and more information. Usage Example: $format = “‘l M j, y \a\t g:iA'”; date($format, strtotime($date_str) Result: “Thursday Nov 29, 07 at 2:09PM” Format Character Description Example returned values Hour H 24-hour format of an hour with leading zeros 00 through 23 G 24-hour format of an hour without […]

Customize Pligg with Your Own Design

November 8th, 2007

Last week, I spent some time customizing a Pligg installation. After reading many pages of code to familiarize myself with the process, I decided to share my findings in hopes that it will be helpful to some others who also need to customize the look of a Pligg site. This was my first time installing […]

CSS … be careful when using wildcard *

November 3rd, 2007

I was working on a project today and found that the content in a table I created all squeezed together, even though that I had set “cellspacing=10”. After some investigation I found that in the CSS code, padding and margin of all elements was removed: body * { margin: 0; padding: 0; } I could, […]