Kristine posted on her blog a few weeks ago that she added the date/time to the show referrers. Since I can't see another toy and not know how it's done (and have it for myself) – I figured out how to do it…
Read the rest of this entry »
Kristine posted on her blog a few weeks ago that she added the date/time to the show referrers. Since I can't see another toy and not know how it's done (and have it for myself) – I figured out how to do it…
Read the rest of this entry »
Just thought I'd put this up here for anyone else… if you're UPGRADING to MT 2.5 – and you were previously using MT-Search… It isn't actually mentioned in the upgrade instructions themselves… but you will need to do a few extra (albeit) easy steps to get search working again. Just look in the REGULAR instructions for MT about "Public Search"… and "Alternate Templates" there will be a section in there that explains what you need to do.
(Oh, and btw – search is now working again on this blog
I've been having a problem for a long time setting cookies on Netscape. This morning, with some downtime on my hands I finally figured out what the deal was. It was this comment in the PHP manual that finally turned the light on for me:
Netscape cookie spec says that you need to specify a DOMAIN with two periods – screw all the redirection to www.domain.com.
Use DOMAIN=.domain.com
or actually in php you'd just use
setcookie("TEST",$VALUE,time()+60,"/",".test.com");
THAT did the trick!!
Another thing you should know – (I actually knew this from before (after an agonizing trial and error), but I'm writing it down should I ever forget): If you try to set a cookie and ACCESS the value of that cookie in the same "page load" it won't work. It'll see the cookie the next time the page is loaded… but it won't see it in the same "session" as setting the cookie.
Now, please excuse me while I dig through some of my cookie-related scripts here and make this fix… =sigh=
Several months ago, I got very, very tired of maintaining a large number of separate, standalone pages on my site. Since my pages were exactly the same except for three things (meta description tag, title tag, and content), I decided to create a database table that could hold this information and a single page that could be used to display all the information.
As far as I'm concerned, PHP and mySQL are nothing but tools to further my habit of code laziness. What you have here is the result.
This package consists of five files: add_page.php, content.php, install.php, index.php, and a readme file.
Read the rest of this entry »
Another script for ya! On the low tech side – but the name of the game is KISS – Keep It Simple Stupid.
This script will let you enter in events (through a web interface/page). They can either be recurring events (like birthdays, anniversaries, etc.) or single occurence events.
Then, with a simple line of php, you can have the next x# of days' events display on your site.
The script should be fairly easy to install – just requires your editing a config file… You enter in the dates. Add the line of code to your site… you're done.
Once again – I have little time to actually support this stuff, but please feel free to post any questions you may have in the comments section. If I can't/don't have time to answer it, there might be someone else who can. But before you post a question – if there are already comments here, please read through the comments to see if your question has already been answered.
This is an introduction to a couple of postings I'll be writing on system admin style scripting. Web scripting is great, but its good to see how the skills you aquire scripting for the web can spill over into "backend" style administration work. That said, lets get into Active Directory (AD), and how to script against it.
What is AD?
AD is basically a Microsoft based implementation of LDAP (Light Directory Access Protocol), which is a hierarchical database of objects (users, computers, etc). LDAP is an open, standard based protocol, meaning that LDAP enabled applications should be able to work with AD. Since this will probably be a long article, please read on…
Read the rest of this entry »
UPDATE 10/5: I'm releasing the v2 on this.
Lest you thought we disappeared… I have a script for you!
This one is not an easy one to implment, but there's lot of instructions to help you along the way. However, I STRONGLY suggest you have some knowledge of PHP before you attempt this one. The idea here is – lets say you have a lot of junk in your sidebar. Maybe some users are interested. Maybe not. With this script, your users can customize the page… showing/hiding whatever sidebar elements they want. All the info is stored in a single cookie.
(V2 lets you rearrange the order of the gadgets by moving one of them to the top. The one drawback here is that the way the script is written – you kind of have to have your "gadgets" all stacked together. You could, with some tweaking in v1- scatter them… so I'm leaving both up for downloading depending on what you want to do)
Here is the demo page (v1)
(fyi – that demo page looks like POO! especially on a Mac… but it's just a proof of concept)
Here is a zip with the code (v1)
Here is the demo page (v2)
Here is a zip with the code (v2)
As I warned in the instructions: I make no guarantees. It's free, okay? Use it. Edit it. I'd love a link back here. But unfortunately I have very little time for support. You're always welcome to post a comment here to see if there's someone out there that can help you. (*please note: if there are already comments here – PLEASE READ THEM before posting your comment – the problem may already have been addressed by someone else)
Enjoy!
(P.S. Thanks to Promoguy for his help/inspiration on this)
Worried about people posting malicious code in your comments, but still want the functionality of HTML enabled comments?? You might want to check out the MT Sanitize Plugin. It "allows you to clean HTML and other markup that might exist in an comment entry." It will let you list the acceptable HTML that you allow in your comments, and then it filters out the rest. Smart!
To run MT Plugins, you need to be using MT2.21 or higher.
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.
Read the rest of this entry »