Archive for June, 2003

Javascript: Trim whitespace

Thursday, June 26th, 2003

At developer.irt.org are two functions (same project as below) to trim whitespace around a string. (In php you have the handy function trim() - but in javascript I don’t think there’ anything that’s “pre-made”)

(There’s a few other’s floating around the web too. planet-source, breaking-par - there’s more if you search in google)

Javascript: Exploding a string into an array

Thursday, June 26th, 2003

Found the function below at webreference. It will take a string and explode it into an array.

In my project, I had one field in a form where the user would enter several email addresses seperated by semi-colon’s. I wanted to validate that each email address was valid, but first you have to seperate the long string…

function explodeArray(item,delimiter) {
tempArray=new Array(1);
var Count=0;
var tempString=new String(item);
while (tempString.indexOf(delimiter)>0) {
tempArray[Count]=tempString.substr(0,tempString.indexOf(delimiter));
tempString=tempString.substr(tempString.indexOf(delimiter)+1,tempString.length-tempString.indexOf(delimiter)+1);
Count=Count+1
}
tempArray[Count]=tempString;
return tempArray;
}

Post to your MT blog by EMAIL!!

Wednesday, June 25th, 2003

I know this is a much requested script, and after working with the author of this one, I did find a few other similar ones out there, but I’d never been able to get any of those to work - and this one did quite easily. In any case, Scott’s post about it is here.

You can see his detailed instructions here, but here’s the “Cliff notes version” for the people who install first and read the directions afterwards when it doens’t work ;) (that’s me, by the way) LOL!
(more…)

Comment Queue Script/MT hack UPDATED

Wednesday, June 25th, 2003

Another note to let you know Comment Queue Script/MT hack has been updated to v.03. (Just a small bug fix). See original post for details and download.

PHP File Manager

Wednesday, June 25th, 2003

While browsing through Sourceforge.net (something all of us should do now and then), I ran across an interesting PHP tool.

It is called “Simple File Manager (SFM).”

The author describes SFM as ” a web based file management utility. Target user: Those that won’t, can’t or SHOULD NOT use ftp. Upload, rename, delete, folder creation, image & text viewer and mime type downloads.”

This would probably be ideal for corporate sites where you want to give department heads the ability to upload files or update reports, but don’t want them messing with your other files. Or maybe it would be nice for a group blog or family website.

You can download the open-source code here (http://sourceforge.net/projects/onedotoh/), and view a working demo here (http://onedotoh.sourceforge.net/demo/fm.php).

I don’t have a server with PHP at work so I haven’t tested this, but judging from the online demo, it would be a great tool to have on-hand.

PHP: Pregnancy Count Up Script

Monday, June 23rd, 2003

Michelle wrote a great pregnancy count up script. Easy to customize and personalize, and gives little updates about various stages. :)

RSS for Everyone

Monday, June 23rd, 2003

RSS can be confusing and hard for people, no matter how new they are to the Internet, to understand. Sharing Your Site with RSS is a great article with all the basics that might help out. Link via J-Mo.

(And no, we are not bringing the latest RSS debates to ScriptyGoddess. I’ll leave those for people who know and understand much more than I do to sort out.)

Comment Queue Script/MT hack UPDATED

Friday, June 20th, 2003

Just a note to let you know that version .02 of the Comment Queue Script/MT hack has been released.

What’s new:
Script now uses the mt-rebuild script to rebuild posts. (This is a seperate download. Go here to download the mt-rebuild script) No more poping up seperate windows to rebuild posts. This also fixes the bug with the “allow pings” box getting unchecked.

Also fixed bug where the script assumes your blog pages are all .php.

See original post for download and more details.

Display all ALT values of images

Thursday, June 19th, 2003

This bookmarklet will show you all the images on the page with it’s ALT text next to it.

Posted in bookmarklets | 6 Comments »

Reset Skin Preference Cookie

Tuesday, June 17th, 2003

Originally posted at http://blog.kevindonahue.com

I presented Jennifer with a question: How do I remove skins? or –to be more specific– How do I let users delete their skin preferences and use the current default?
(more…)