22 May, 2003
Posted by: Jennifer In: Scripts
Introduction
Do you have lots of links you want to keep up with? Browser bookmarks
just not cutting it? The TRH Link Manager is designed to work with a
web hosting provider that provides both PHP and access to MySQL. While
the TRH Link Manager includes hooks for the Moveable Type weblog
manager, you are not required to use it with MT.
Read the rest of this entry »
22 May, 2003
Posted by: Jennifer In: Bookmarks
Recently I needed a bookmarklet I had rememberd seeing on webgraphics. I did a search and ended up finding a BUNCH of bookmarklets they've linked to in the past…
This post about a ruler bookmarklet here
This one about a bookmarklet (for mozilla) that will let you move the images on page around (great for if you're playing around with a design) [link here]
This one and this one (which was the one I was originally looking for) that will parse out all the images on the page, and give you info about them all… The code on their page looks a little messed up (maybe because it's an older post, etc.?) In any case, this is what I needed: Image ALT Info
20 May, 2003
Posted by: Jennifer In: Bookmarks
I think with Windows 2000 you can do this from the menu, but my laptop is Windows 98 (it's an old laptop) and those extra menus really annoy me and tend to just clutter everything up. I keep having to go back and find these links, and I figured it might be nice to bookmark them where I and others who might be interested can find them.
Remove Documents Folder from Start Menu
Remove Favorites Folder from Start Menu
20 May, 2003
Posted by: Jennifer In: Scripts
On sites where the homepage is not the main page of the blog, it isn't always easy to tell when the last update was, and for those of us whose sites are built that way, it can sometimes be a pain to keep the "Last Updated: #########" line up to date. I realized a while back that since I generally write a blog entry of the "hey I added something to {link}this page{/link}" sort even when my updates weren't directly blog content related, so I built this little PHP script that keeps my last updated tag correct without my even thinking about it, since it gets it from the most recent blog entry and pastes it into any page on my site. I use Greymatter, but I don't think it would be too hard to modify this to any other blog program.
Read the rest of this entry »
18 May, 2003
Posted by: Jennifer In: MT hacks
This was an item cooked up by Lynda of digitalwoe.com but her original entry appears to be lost and this hack is so handy, I wanted to make sure it was readily available to anyone who wants it. You need to be using PHP to use this – just insert the code in your MT index template after inserting your IP iformation:
<?
$ip = $REMOTE_ADDR;
if ($ip == "IP #1" || $ip == "IP #2") {
print "<a href=\"<$MTCGIPath$>mt.cgi?__mode=view&_type=entry&id=<$MTEntryID$>&blog_id=<$MTBlogID$>\" target=\"edit\" title=\"For me, not you\">[edit]</a>";
}
?>
(replace "IP #1" and "IP #2" with your IP address(s) that you want to be able to edit posts from)
Guest authored by:
Donna – deliriouscool.org
17 May, 2003
Posted by: Jennifer In: MT hacks
I was recently frustrated by Movable Type's basic support of time zones. You can select a time zone as a number of hour plus or minus UTC, but there's no adjustment for Daylight Savings Time, and entry dates and times are saved in whatever localtime was at the time. The default RSS 1.0 template just tacks on the +/- hours, a global setting. If you ware exporting a year's worth of entries, there's no way to get the correct time for both summer and winter entries.
I then remembered some perl functions that can convert times from local time to UTC and then to whatever timezone you want. A Unix system can keep track of DST, even from the past, so the new UTC times will be correct. With Brad Choate's PerlScript plugin, you can put perl code right in your template. With 4 lines of code, I was able to print out a UTC date and time suitable for RSS.
<dc:date><MTPerlScript>
use Time::Local;
my $mytime = timelocal(<$MTEntryDate format=
"('%S', '%M', '%H', '%e', '%m'-1, '%Y'-1900)"$>);
my ($sec,$min,$hour,$mday,$mon,$year,
$wday,$yday,$isdst)=gmtime($mytime);
printf('%d-%02d-%02dT%02d:%02d:%02dZ',
$year+1900,$mon+1,$mday,$hour,$min,$sec);
</MTPerlScript></dc:date>
A couple of notes. The arguments to timelocal are in quotes, since the values may have a leading 0 that will confuse perl. If your time zone is different from your server, you'll have to adjust the %H parameter by the difference. Also, in perl months are numbered 0 to 11, and years are numbered from 1900, so we have to adjust accordingly. We then have a Unix timestamp in $mytime, and can obtain the individual components in UTC. I'm using printf for the output since the format for dc:date in RSS is so strict. Each %02d formats the output of an integer to two places padded with a 0 if necessary.
(This code was originally posted www.papascott.de/2003/05/17/2256.php)
Guest authored by:
Scott Hanson – papascott.de
Comments Off on Converting entry dates to UTC in Movable Type with the PerlScript plugin
17 May, 2003
Posted by: Jennifer In: Bookmarks
Comments Off on MT: Quick Code plugin
15 May, 2003
Posted by: Jennifer In: Bookmarks
If you're looking for a simple photo gallery script, Photopal may be right up your alley. It's not completely template driven. The latest version is completely template driven. Confetti Falling is a good example of Photopal in action.
Guest authored by:
Carla – andshesaid.com
A simple little ASP snippet. If you want to see what's coming over from your method="POST" form – here's a bit of code that will loop through everything, show you the variable name and it's value:
for each x in request.form()
response.write(x & ": " & request.form(x) & "<br>" )
next
if you're using method="GET" then it would be:
for each x in request.querystring()
response.write(x & ": " & request.querystring(x) & "<br>" )
next
15 May, 2003
Posted by: Christine In: Bookmarks
"How we really use the Web" is a sample chapter from Don't Make Me Think that is chock full of good information. Even if you've been designing websites for years, it is always a good idea to step back and remember to consider how people will be using the site. (The challenge after that is getting your boss or the client to understand!)