Archive for the ‘PHP’ Category

Moblogging script SIMSI

Thursday, August 30th, 2007

The Simsi is a moblog script written in PHP and developed by Marc Rohlfing at www.rowlff.de/simsi/

It came in handy for me when I was completing a master’s thesis at DCU. For part of our project we needed to parse incoming email and MMS mobile phone messages and extract the contents and attachments. This user generated content we received from the 3G mobiles phones (sponsored by 3Ireland, thanks!) would subsequently create a presentation. a dynamic story board of user experience of you will. The SIMSI moblog code helped us to understand how to achieve this collection part of the project.

While working with the script I added support for 3GPP mobile video and fixed some email date formatting issue.

Unfortunately I did not hear back from Marc Rohlfing , the original author of the script when I tried to contact him via email. Recently the link to http://www.rowlff.de/simsi went dead.

So I’m putting this up here as there may be others out may benefit from it as we did.

Short description

It’s a blog script an you can update by sending email/MMS messages from your phone(or not) to your email address.

Long Description

You send email/MMS messages containing text/images/video from your phone to a designated email address.

The moblog script will open that mailbox, extract the messages and save the attachments. The messages and attachments save saved into an xml file and a webpages containing the messages is presented in the browser.

Install

Extract and copy the directory containing the script to your webserver.
Download

Configure

In the index.php set following:

$MAIL_SERVER = “mail_server_here”;
$MAIL_USERNAME = “your_email_username”;
$MAIL_PASSWORD = “your_email_password”;

That’s it.

Now send a MMS to the email address. And browse to the location of the index.php

Happy moblogging!!

Create bunches, batches or a multiple of users and blogs in Movable Type 3.3x with this Add-On

Wednesday, August 29th, 2007

Note: This version has not been tested extensively. Use at your own risk. Tested on Movable Type 3.34 and 3.35. Does not work properly with Movable Type 4.

Scenario

I needed to set up 30+ users and blogs in Movable Type. I was faced with the prospect with spending all day doing this manually though the Movable Type interface. I would need to create the blog, then create the user than assign the user to that blog. Clicking and filling in several forms per user/blog. I would then need to repeat this 30 + times.

Instead I wanted to automate the creation of the bunches, batches or a multiple users and blogs in one go through PHP scripts. This is the result.

Conclusion

So if you have a group of user and blogs you would like to create in Movable Type 3.34 or 3.35 you can use this set of script to speed up the process. You can create up to 5 users/blogs per go in the current version of this script.

Backup

This is a mandatory step as the script inserts directly into the Movable Type database.
Back up your MySQL database. See here for instructions.
Back up you Movable Type files in the cgi-bin directory just in case.
Back up your Movable Type blog directories.

Install

Download files
Copy the MTBatchBlog directory to your web server.

Configure

Edit the config.php.

$dbhost = “localhost”;
$dbuser = “enter_your_mt_database_username”;
$dbpassword = “enter_your_database_password”;
$db = “Enter_name_of_your_mt_database”;
$sysadminemail = “enter_your_email_address”;

How to use

Go to http://your_url/MTBatchBlog/index.php
Log in with the username and password you put into the config.php
Next fill out the forms for each user/blog pair. It needs the same info as you would normally input when creating users and blogs through the normal Movable Type interface.

Warning

This set of scripts is provided as is. Use at your own risk. It has worked fine for me though.
I recommend you remove the MTBatchBlog directory from your web server when finished.

Good luck

Any comments, question or suggestions email me
If people would like to see additional features and support for newer versions of Movable Type please email me.

eTicketStats add on soon to be included in the Opensource eTicket Help Desk system

Friday, July 27th, 2007

I’m happy to report that the add-on I wrote for the opensource eTicket Helpdesk system is soon be included in the main distribution.

The eTicketStats add-on provides info and graphs and charts of the number of tickets submitted/closed per month, per week, tickets per category, ticket response/closing time etc.

Create a Staff Directory webpage using PHP and LDAP

Wednesday, July 25th, 2007

Here’s the scenario:

We use LDAP to store the information on staff such as names, usernames, email addresses, telephone numbers, photos, passwords etc.

We want a webpage the displays up to date details off all the staff in our organisation. We would like to dynamically extract the information about the staff from our existing LDAP database and present it as a webpage on our intranet.

1. Download the scripts I’ve written here and extract them to a directory on your Intranet server or somewhere suitable.

EG. http://intranet/StaffDirectory/

2. Configure the script.

Enter you LDAP hostname and distinguished name.
Users have previously created using the inetOrgPerson LDAP object Class. This gives us attributes to use such as displayName, mail, telephoneNumber and jpegPhoto.

We enter the LDAP atrributes we wish to extract into the $params array below.

$ip = “your_ldap_hostname”;
$dn = “dc=example,dc=org”;
$params = array( “displayName”, “mail”, “telephoneNumber”, “jpegPhoto”);

3. Browse to http://intranet/StaffDirectory/index.php to view all the the details of you staff members.