Posts Tagged ‘Code’

Memory Size Bytes Exhausted Error

// September 28th, 2007 // No Comments » // Code, Web

A big thanks to TechTracer for pointing me in the right direction for a frustrating WordPress error.

After upgrading to WordPress 2.3 (fairly painless, despite the major changes due to “tag” implementation) I couldn’t upload images. Any image over 100K would produce an error stating: Allowed memory size of 16388608 bytes exhausted (tried to allocate 6400 bytes). It also made reference to the includes\image.php file.

After reading the TechTracer post, I added one line of code just after the <? php tag in the image.php file:

ini_set(‘memory_limit’,’32M’);

The additional functions in WordPress (tags) and the plug-ins that I’m running must max out the memory. Now, I can upload my images and WordPress will resize and generate thumbnails just like it should (using the excellent Flexible Upload plug-in, that is).

Smashing Magazine’s 10 Usability Nightmares

// September 27th, 2007 // No Comments » // Code, Web

Smashing Magazine has posted 10 Usability Nightmares You Should Be Aware of and it’s a great read. Several things in there that all developers have probably been guilty of at one time or another. Read it and then try to remove as much of them from your sites as you can.

Smashing Magazine also provided a list of 8 Usability Checkpoints as well. Just read the article for more info on each one listed below.

1. You don’t use pop-ups.
2. You don’t change users’ window size.
3. You don’t use too small font sizes.
4. You don’t have unclear link text.
5. You don’t have dead links.
6. You have at most one animation per page.
7. You make it easy to contact you.
8. Your links open in the same window.

WordPress 2.3 New Features

// September 21st, 2007 // No Comments » // Code, Web

WordPress 2.3 is right around the corner. Schedule for release on Sept. 24, it has several nice, new features. To get up to speed, I’d recommend reading 10 Things You Need to Know About WordPress 2.3. It’s the first article I’ve seen that sums up all the work and changes from 2.2 to 2.3 in an easy to understand format.

The most notable change is the support for “tagging” posts. Similar to Flickr and other sites, posts will not have categories and can also be tagged with more general relationships. This addition changes the structure of the WP database and could possibly break some of you favorite WP plug-ins.

I’ve installed Release Candidate 1 on another site and the only casualty was the excellent Extended Live Archive plug-in. I doubt the problem will be fixed, since the plug-in has seen little activity. Maybe someone will come along with something similar for 2.3.

Post Like a Pirate

// September 19th, 2007 // 1 Comment » // Code, Web

Thanks to Dougal Campbell’s Text-Filter-Suite, all the posts on the site should be formatted in “pirate speak” in honor of International Talk Like A Pirate Day. Everything should resume to normal tomorrow. Now go talk like a pirate.

FCK Editor Revisited – Adding a Custom Link Style

// September 19th, 2007 // 2 Comments » // Code, Web

I’ve had a few questions/comments on using Custom Styles with FCK Editor, so here’s a style that I created that will format any link you apply it to as a red button that changes color on mouse over.

Add this CSS to the fck.css and portal.css files in you PORTALS folder.

/* Both variations --a.color-- and --span.color a--
    are needed to handle DNN's span applications
    not being consistent */

.red_button, a.red_button:link, a.red_button:visited,
 span.red_button a, span.red_button a:link,
 span.red_button a:visited {
        font-weight: bold;
	font-size:10px;
	color: #FFF;
	background-color:#C00;
	padding:4px 8px;
	text-decoration: none;
	border-top: 1px solid #DFDFDF;
	border-left: 1px solid #DFDFDF;
	border-bottom: 1px solid #333;
	border-right: 1px solid #333;
	}

a:hover span.red_button,
span.red_button a:hover {
	background-color:#900;
	border-top: 1px #31557f solid;
	border-left: 1px #31557f solid;
	border-bottom: 1px #666666 solid;
	border-right: 1px #666666 solid;
	text-decoration:none
}

Be sure to add the following to the fck.xml file, to append the style to the menu in the FCK editor.

<Style name="red_button" element="span">
  <Attribute name="class" value="red_button" />
</Style>

Hope this helps, post any questions in the comments.

Resizer Technology for Images

// August 29th, 2007 // No Comments » // Web

This has got to be one of the coolest image editing innovations ever. Evidently, one of the developers of this technology has been hired by Adobe. Let’s hope this is added to Photoshop, or maybe even better, as a plug-in.

Source Chart Extension for Firefox

// July 26th, 2007 // No Comments » // Code

Just found a new Firefox Extension that’s quickly become a favorite. The View Source Chart extension works similar to a “View Source” command, but formats the page code in easy to read, color-coded blocks. It’s great for finding tags or code that are causing rendering problems or other issues. When debugging a site, you may not know exactly what you’re looking for, but with the nice hierarchy Source Chart provides, it’s easy to spot the item that’s out of place.

Leaflets for Your iPhone

// July 16th, 2007 // No Comments » // Web

Sure, I’d like to have an iPhone. However, since I don’t have $600 to drop on a new phone (and I’m indentured to Sprint for at least another year – or more). I’ll settle for playing with the Leaflets web based demo.

To get the full effect, you’ll need to be running Safari 3 on a Mac or PC. The idea of Leaflets is a great one. Provide a portal that formats a lot of the popular RSS based services for iPhone viewing. The RSS / Feeds view is very efficient and all the demos read very well on the small screen of the iPhone.

Still, the negatives on the iPhone (no MS Exchange, no high-speed data, etc.) make me want to wait for a later version anyway.

Embiggen Your Soul (and TinyURLs)

// June 14th, 2007 // 1 Comment » // Web

“Hitch that team up Jebediah Springfield,
whip them horses, let them wagons roll.
That a people might embiggen America,
that a man might embiggen his soul.
his soul,
his soul, …, …”

Jebediah: [on film] A noble spirit embiggens the smallest man.
Edna: Embiggens? I never heard that word before I moved to Springfield
Ms.Hoover: I don’t know why. It’s a perfectly cromulent word.

Both of those quites are from Episode 3F13: Lisa the Iconoclast from the Simpsons. Is it bad when I see a JavaScript that expands Tiny URLs and I immediately realize it’s named after a fake word from The Simpsons?

Seems there’s also a PHP/MySQL Content Management System called Embiggen.

Wookieepedia, myIPneighbors, and Texter

// June 6th, 2007 // No Comments » // Web

More semi-random link goodness for today.

Wookieepedia is an impressive Wiki for all things Star Wars. First of all, you can’t beat that name. Wookieepedia has got to be one of the Top 10 web site names in my book. Second, the Wookieepedia is great for catching up on all your Star Wars lore. I’ve fallen way behind on the books (and will not catch up anytime soon), but in just a few minutes browsing I found out that one character from the Marvel Comics Star Wars run is returning. Lumiya was one of the first evil Jedi created after Darth Vader and has quite a good history in the comic series. Definitely makes me want to read the new Legacy of the Force series.

myIPneighbors.com is a fascinating site if you have a website. You can enter your IP or domain name and see what other sites are sharing your server. Since my host is European, nothing really cool popped up. That also means that my site (and the few others a friend and I host on that server) get most of server resources. Find the most overloaded server out there. Once search returned 641 sites on a shared host. Wow.

Texter is a great time saving tool for Windows users that do a lot of typing or coding. Within a few minutes, you can set Texter up to replace a few keystrokes with any text you choose. It makes blogging a snap. I can type hre+TAB key and instantly I’ve got a fully formatted link tag with the URL in my clipboard pasted in my document. Try it, you’ll like it.