Archive for the 'scripts' Category

Friday
25 Jun 2004
5:26 pm

Blog Exerpt

When I used Movable Type for my blog, I had made a template that just included information from my most recent post. I then included the resulting static page on the front page of my main website.

I was updating that site today … I replaced the Guestbook I had there with the ShoutOut script that I wrote. I realized that I still had the exerpt from my MT blog on my main page. I wanted to replace this with the most recent post from this blog (since I’m no longer updating the other one). A plugin wouldn’t work … I’m not putting this on a page inside of my WP install. So … I wrote a script that I put in the root directory of my WP install. I then called that from my front page, and wallah … there it was. It was easy to do, but took a bit of tweaking to get the number of comments to show up correctly. You can see how it looks here.

Anyways, I thought I would put the code here in case anyone else wanted to do the same thing. I’m not sure if they do. Or if there’s something already written for WP that does this (I didn’t search for it ‘cuz I wanted to write it myself ‘cuz I knew I could … G-grin ).

If you would like this code, you can get it here (upload it to your main WP install directory). You’ll need to fill in a couple of variables (the URL to your WP install, the server path to your WP install, and the number of characters from the post that you want to display). They’re at the top of the script and are commented with instructions. To use the script on your outside website, use a simple include …

<?php include '/path/to/wp/install/wp-exerpt.php'; ?>

Simple as that. If you end up using this, let me know. Once again, I’m curious to see if anyone wants this functionality other than me. Maybe it’s just ‘cuz I’ve got so many subdomains (I believe I’ve got 8 subdomains in addition to my main domain). And as I’ve said with my plugins … if you do use this and run into any problems, please let me know so I can troubleshoot.

Mood: lonelylonely
Posted under scripts | 4 Comments (4) ... RSS
Thursday
24 Jun 2004
1:03 pm

Is there enough interest?

Recently, I wrote my own guestbook script. I was unhappy with the one I was using, and I couldn’t find one I liked. So I decided to write my own so it would do what I wanted it to. It’s just a basic guestbook script, but it serves its purpose. Also, it was a good learning experience for me. I delved deeper into php … into more ‘object oriented’ programming. I created a ‘functions’ file and a ‘language’ file.

I have had a couple people as me if I was gonna make it available for download. Well, that depends. I did code it with that in mind. But I’m only going to release it if there’s intrest in it.

You can find the demo (basic) setup here.

You can find a customized install of it here.

There is an administrative backend for the script. You can edit and/or delete entries, ban IP addresses, update config settings, and update the admin password. I don’t have a demo for the backend at this time. I may do that in the future if people are interested in downloaded the script but wanna see the admin backend first.

So … if you think you might be interested, check out the links above to see the script in action. Then come back here and take part in the poll. If there is enough interest, I’ll release the script for download (for free of course).

Mood: blahblah
Posted under scripts | Comments Off