ColorMatch 5K
Wednesday, September 25th, 2002Found this really cool color combo tool. [link thanks to Carla]
Found this really cool color combo tool. [link thanks to Carla]
Unfortunately, I’m spending the majority of my awake time actually working on PHP code, but very little of it I can actually share here, because almost none of it makes sense out of context. However, I wanted to pass along a few bits I’ve collected that can stand on their own, and might be useful as reference bits for other people.
So, a few variously-nifty PHP functions.
(more…)
My scriptygoddess crown to the first person that can give me the PHP code to validate a form field so that no special characters are allowed…
(well, okay it’s not really a crown; more like a plastic tiara… how about lots of plugs here, and the good feeling that you’ve helped out a friend in need?) ![]()
UPDATE: Nevermind! I got it! (YAY! I get to keep my tiara!!) ;-P
(Update again: Actually, Amy saw my function and raised it… her’s is better/quicker/easier, etc.)
Amy is the grand champion Tiara holder!! ![]()
Here’s a php function that will return true if the character is alphanumeric, and false if it’s anything else:
(more…)
This site actually looks pretty nice… they have some cool tools to dl in the “Tools” section as well.
Well, for those that know me, its a known fact that I’m an obsessive book reader… so here are a couple scripting books I’ve been working my way through over the last few weeks:
Windows NT/2000 ADSI Scripting for System Administration
Ok, its VB & VBScript, but the best for scripting windows domain stuff.. a constant reference
Windows Script Host
Everything you need to know about WSH. Useful for Sys Admins, and those wanting to tweak windows…
Professional PHP4 Programming
Great book, just what it says, and not for the newbies.
Professional Apache 2.0
Another fine WROX book… its getting me up to speed on Apache 2.0
Maximum Apache Security
Last listed, but highly recommended.. if you want to know *anything* about security and the web, get this book ASAP. Ins and outs of apache
This is really for Web Admins, but someone may be interested…
This is kinda in response to a posting on Jenn’s site, but if anyone out there works at all with Apache, do yourself a favor and learn how to use the Virtual Host tags in the httpd.conf file. You can avoid so many “low level” network issues if
I use the following VH tags to set up name based virtual hosts to tie different names into different IP addresses:
<VirtualHost *>
ServerName netstat.wpsweb.net
DocumentRoot /var/www/htdocs/phpBB2
</VirtualHost>
This lets me set up a host on my server, and any request to netstat.wpsweb.net is resolved to the given DocumentRoot, and others are passed on to other VHs. (Its not a bad idea to set up a default VH to point to your default DocRoot) This name based hosting is very useful. Other directives can be placed in the VH tags (say different logging options) and only have them effect my test site. Lots more information in the Apache Docs.
(more…)
On request of someone in the MT forums, I put together a small php script that displays a different word (i.e. Today) depending on the date stamp of your server. This could be easily modified for any blogging software - this is pointed towards MT.
Here’s the basics: If the day is today, display Today. If the day is 1 day ago, display Yesterday. Otherwise, show the Day of the Week.
if ($mtdate==$today) {
echo “Today”;
}
elseif ($mtdate==$yesterday) {
echo “Yesterday”;
}
else {
echo(”<$MTEntryDate format=”%A”$>”);
}
?>
Enjoy! Its working on my journal right now.
Are you running more than one blog from your copy of MT? Would you like to have a list of the latest entries in the order they’ve been updated? The solutions in the past have required you to add a new template to each blog and then use PHP to order them [Brenna's PHP ordered updates thread]. Since I’m already doing something similar with my portal page [PHP portal tutorial], I didn’t really want to add another template to each blog every time besides the one I already use in my portal.
With the advent of the MySQL version of MT, its possible to connect directly to the database, and so I am sharing the code I’m using to make a “latest updates” list for my blogs.
(more…)
Well.. this took me a little while, and I’m somewhat embarrased to admit it…
I was writing a script to pull some data from several tables, and the date field looked something like this:
1031849565
Its a Unix Timestamp (representing the number of seconds from Jan, 1 1970 up to sometime in 2037), and luckily MySQL gives you a good way to convert them into readable dates. When you make a SQL query, just add this around the timestamp field:
FROM_UNIXTIME(yourtable.yourfield, ‘%d, %m, %Y’)
So a sample query would look like:
SELECT FROM_UNIXTIME(yourtable.yourfield, ‘%d, %m, %Y’) WHERE yourtable.index > 0;
The %d, %m etc. represent date & time format variables… a complete list can be found in the MySQL Documentation in section 6.3.4
I’m a little slow on the uptake with all this CSS stuff, and the longer an article is, the less likely I am to understand it. So when I can, I try to make things simpler.
One concept I have been trying to wrap my head around is the difference between class vs ID. I always specified styles using the attribute class=”classname”. I could never understand why/when you’d use ID=”classname”… that is until today when I read this article on digital-web
So, here’s my cliffnotes version “dumbed” down so I could finally understand it.
(more…)