Archive for May, 2003

ASP - (database) connection strings

Monday, May 12th, 2003

An extensive list of connection strings: connectionstrings.com

Another way to manage links

Sunday, May 11th, 2003

Back when I first changed the format of my page so that I had the same list of links down the side of every page, I quickly discovered that it was a pain to have to go through 5 or 6 pages of HTML/PHP adding new links here and there.

I eventually came up with a system that makes it much easier to add/remove links from all my pages in a single go. On every page that has a list of links, I put this at the top:

include “path/to/linkage.inc”;

The file linkage.inc contains a series of multidimensional arrays, like so:

$blogsLinkage = array(
0 => array(”http://www.snazzykat.com/”, “snazzykat”),
1 => array(”http://www.scriptygoddess.com/”, “Scriptygoddess”),
2 => array(”http://www.technoerotica.net/”, “technoerotica”),
4 => array(”http://www.neuroticfishbowl.com/”, “neurotic fishbowl”),
5 => array(”http://www.tampatantrum.com/”, “aint too proud to blog”),
7 => array(”http://troll54.blogspot.com/”, “Troll54″),
8 => array(”http://timatollah.blogspot.com/”, “Timatollah”),
9 => array(”http://www.greasypants.org/”, “greasypants”),
10 => array(”http://www.randomramblings.com/”, “Random Ramblings”),
);

$techLinkage = array(
0 => array(”http://www.thinkgeek.com/”, “ThinkGeek”),
1 => array(”http://www.phpbuilder.com/”, “PHP Builder”),
2 => array(”http://www.scriptygoddess.com/”, “scriptygoddess”),
3 => array(”http://www.dynamicdrive.com/”, “Dynamic Drive”),
);

Then, in each file where the links are to be listed, it’s a simple matter of a nice little loop to render the code:

<?php
foreach ($blogsLinkage as $val) {
print “<a href=\”$val[0]\”>$val[1]</a><br />”;
}
?>
[more HTML code...]
<?php
foreach ($techLinkage as $val) {
print “<a href=\”$val[0]\”>$val[1]</a><br />”;
}
?>

Then, whenever I need to add a new link, I simply put a new entry into linkage.inc. If I need to remove a link, simply take it out of linkage.inc. This way, all the pages are updated automatically, and it’s much easier!

Guest authored by:
Will - silverfisch.net

Automated Posting of Deferred MovableType Entries

Sunday, May 11th, 2003

Just ran across this script to automatically post drafted entries in Movable Type.

Honestly, I haven’t been able to figure it out, but I thought perhaps others might be able to wrap their brains aound it.

(Note by Jennifer: If this works, then this would take care of that whole “pre-post” issue. We had come up with a script that did this, but there were a lot of holes. This one won’t even publish the post until the date/time it’s supposed to - it looks promising.)

Guest authored by:
Patricia - lunanina.com

Zipped Archives in Unix Shell

Sunday, May 11th, 2003

If you’re working with scripts, the time will come when you need to work with a Unix archive. Generally, these are .tar files or .tar.gz (zipped). These .tar files are commonly called “tarballs”. These are no different than any other archive/backup/zipped files, they just take a little getting used to.

How to decompress a .tar or .tar.gz archive in Windows:
Winzip is my windows-based zip file manager of choice. There are several versions available, included a free “evaluation” version. Winzip can decompress .tar and .tar.gz files locally to your hard drive. Make sure you use the wizard or select “Use Folder Names” from the Classic interface so the file structure will be maintained.

How to decompress a .tar or .tar.gz archive on your webserver:
You need shell access (telnet or ssh). If you don’t have shell access, you’ll just have to decompress the tarball local (see Windows directions above) and upload via ftp.

1) Assuming you have shell access, upload the tarball to your webserver in binary mode via ftp. (Note: Choose binary mode, not ascii or automatic detect - binary). Most of the time, you’ll want to place the tarball one level above where you want the files installed, as the structure of most tarballs begins with a folder.

2) Once the tarball is on your server, log into your shell account (ask your host for directions).

3) Use the following commands to decompress:

.tar files: tar -xvfz filename.tar
.tar.gz files: tar -xvfz filename.tar.gz

4) The files will decompress into it’s original uncompressed structure. You can browse the structure using your ftp program or other tools that are more familiar to you.

While we’re at it, let’s just round out this topic.

How to zip a folder in Unix:
To create an archive from the Unix shell (telnet/ssh), use the following command:

tar -cvzf filename.tar.gz folder-name

So, if I want to create a tarball to backup my “images” folder, I’d use the following command:

tar -cvzf images.tar.gz images

Note the space between the “z” and the name of the folder I am compressing. You can create archives of individual files as well, just replace the “folder-name” in the example with a file name (i.e. “image.jpg”).

If you need a good telnet/ssh client for windows, I recommend Putty. For more information on unix shell commands, google “unix shell commands”. There are 1,000s of good resources.

Guest authored by:
Kevin Donahue - blog.kevindonahue.com

Quickstart your photoblog

Friday, May 9th, 2003

A lot of people would like to have a photoblog, I was one of them. Even though I really like designing and building websites, I really didn?t want to spend too much time on building one. Instead, I wanted to focus on creating the photos.

I came around quite a few sites with photoblogs and tutorials, here are the three most popular I found based on MovableType:

The Moonpost tutorial:
This is an easy, down to earth photoblog how-to, based on the standard MT weblog templates.

Blogstyles Photoblog Tutorial:
Slightly more custom then the Moonpost photoblog. It is also very easy to setup, and it is supplied with all MT templates already!

The Quixotic Photoblog Tutorial:
The most customized photolog of these three, but also drop-dead-easy to setup, complete with templates and stylesheets and stuff! An excellent and beautiful photoblog. I used this one to build my own photoblog (www.sindono.com) At the end of the tutorial are some tips on how to expand your weblog with extra features such as voting and a random image.

Guest authored by:
Arno Jansen - www.sindono.com

Doors are now open…

Friday, May 9th, 2003

I am happy to announce that we are now accepting guest authored posts!

Read the FAQ, then submit your post.

Pardon our appearance…

Tuesday, May 6th, 2003

I’m going to be rearranging things around here (see previous post) so I apologize in advance if things get a little confusing/messy….

Change in format on Scriptygoddess

Monday, May 5th, 2003

Despite it’s win of a bloggie in March, I’ve had the de-fib paddles out on Scriptygoddess for some time. But blogging is not my full-time job, and I can’t do this alone. I’ve added several authors, but many of them have become involved with other sites, other projects, or just their own life in general. I don’t blame them, but what still remains is a project I put a lot of effort and love into that is dying a slow painful death (even if it is only visible from this side, at the moment).

Despite my desire to want it to be more, it was not the original intention of scriptygoddess. The original intention was for it to be my personal journal/notebook of things I learned, scripts I wrote as I learned more about scripting - specifically PHP.

Things change - focuses shift - as have mine. Because of my job, I will need to be focusing on ASP scripts (and no, not .NET - don’t get me started - we’re still supporting NS 4.7 - I can’t even use CSS. Until today, I had been running Win98, so you can imagine, they’re not upgrading their servers to support .NET anytime soon!!) So what I’ll be posting about are ASP script snippets. Not much use for the blog-world.

Trying to run a mutli-author blog is a complicated job - one, that I can’t say I’ve enjoyed. I like scripting - that’s what’s fun to me.

My first thought was, rather than let this blog dwindle down to nothingness, or something “not worthy” of blog interest, I could take it down completely. Revert it back to it’s original intention - Have it be by me, for me, and only visible to me - and only me. (me me me!) ;-)
I’ve been using this site to “give back” to the blogging community - but aside from a few very generous people who have “tipped” - what have I gotten in return? Why exactly am I doing this? And for the emotional toll of trying to make this blog be what I thought was it’s potential, to what end?

I posted my emotional issues on the subject on my own blog, and discussed the matter at great length over the phone with Christine (also a scriptygoddess and a good friend). Many of you have emailed me as well. And I’ve listened…

I’m going to change the format around Scriptygoddess, but I won’t take it down. At least not right now. Not unless things improve. I’m leaving it up for the only reason that YOU have told me you find it valuable. But if you want it to stay alive - it needs you. I’m hereby appointing all of you official scriptygoddesses!

Here’s the new format (and this will be implemented over the next week):
- Scriptygoddess will be moderated by Christine and myself.
- I will continue on as I planned and post my useless ASP drivel.
- Christine will continue to post her linky-goodness.
Now here’s the important part.
- The main heart and sole of scriptygoddess will be from guest authors. (YOU!) I’m going to create an email box to which you can send your suggestions for posts on scriptygoddess. Christine and I will both check that mailbox and act as “copyeditors” for your posts. In return you will get a byline for your post and a link back to your blog if you so desire.

Now, I would just like to say one thing. Some of you have put me and scriptygoddes on some sort of a pedestal. I’ve heard some of you say something along the lines of “well, someday I’ll have something good enough to suggest on scriptygoddess”. Fact of the matter is we’re all still learning this! There are simple php things I learned a full year ago that I cannot remember for the life of me and have to look up everytime I do them. So PLEASE do not feel intimidated. If you have a post that you find useful - more than likely, there are other people who will find it useful as well. So send it on.

That being said, I won’t go so far as to guarantee that everything submitted will be appear on scriptygoddess. But I WILL guarantee that no one will be ridiculed and no one should feel afraid to send a post.

This week I will create a more detailed FAQ type page for submitting posts.

So that’s the story. You want Scriptygoddess to stay alive? You need to get involved.

Free Software, Free Society

Monday, May 5th, 2003

Just picked this up on Friday, and I’d just about finished it by Sunday evening. Its a collection of R. Stallman’s lecutures & articles on free software, copyright, copyleft, the GNU license and so on.

Recommended with anyone with even a passing interest in the free software movement. You will be much richer (intellectually) for having done so.

Free Software, Free Society

For my deeper thoughts…
(more…)

The Neverending Post

Monday, May 5th, 2003

Have you ever had one of those posts that just won’t die? Out of nowhere, months later, people still leave comments? This script will allow you to automatically close comments for entries older than X hours or X days. Written for MT 2.6 or above with MySQL.

Found at Ste’s site, Wanderlost.org.