Another plugin... maybe nothing new.

Creating and modifying plugins.
Post Reply
Trixtan

Another plugin... maybe nothing new.

Post by Trixtan » Thu May 05, 2005 1:08 pm

Alright, I am going to explain the plugins I am building in these days.
I want a custom architecture to manage MMS in my blog. I have searched for almost-ready solutions, (like the possibility of interfacing my blog with the moblog of my mobile-phone company) but nothing I have found satisfies me.
Here the idea to build up a php script family to manage mms. In according to the fact that I have choosen Serendipity as blog backbone, I have thought to build these scripts as plugins. Furthermore, the work in this case is simpler because the presence of the great plugin_api.

Now I will describe the architecture of the plugins as I have concerned it (and sorry for my terrible english).
Everything is e-mail based. You know you can send an MMS to a cell-phone or to an e-mail address. My solution need a dedicated email-address.
There is the first module, the core, whose job is to download emails, parse them, save email data in a special database table and images in a special image folder, and nothing else.
This module is an event plugin called serendipity_event_moblog_core.php, and I have alredy built it. It works.
Once informations are in the DB and images are in the folder, I can do what I want. I am building up now other two sidebar plugins (which are dependant to the core). The first one simply show in the sidebar tla last mms, the other creates a special category called "Moblog", and generate an entry for each MMS stored in the DB, allowing you to see all the MMS received.
These last plugins works in a very simple manner... they only get information from the database and they don't know how these information s are obtained.
Here is the schema:Image

The modules work asyncronously.
What do you think???
I think this is not a new idea. I have started this to learn, and because I love hard-customized solutions.
Thanks for the attention!!!! Best regards.

Trix

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Another plugin... maybe nothing new.

Post by garvinhicking » Thu May 05, 2005 3:40 pm

Hi Trixtan!

Did you look at the popfetcher plugin? It also has basic MMS parsing facilities. Maybe it would be easier to hook your plugin into that module?

The popfetcher plugin could be patched so that it executes a new "popfetcher_message" hook with the full MMS data and then you could make your own plugin do some special parsing tricks on that email. Like extracing the list of images and putting it into a special table to be read.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

Trixtan

Post by Trixtan » Thu May 05, 2005 7:02 pm

Hi!

Actually the problem of fetch-and-store MMS is alredy done, the core plugin is already working on my system.
What is missing are the other two parts!
Anyway I didn't know a plugin like the one you have told me exists, I will download it to study, and maybe correct something in mine one.

By now I am facing the problem of image-sizing. I have to find a commo maximum-size for the thumbnail image shown in the sidebar. Do you think that 140 px will be a good compromise?
Thanks.

Trix

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking » Thu May 05, 2005 8:57 pm

Okay, have a look at the plugin :)

About imagesizing, I would suggest you to make the width configurable inside the configuration of that plugin so that each user can choose his own width. The serendipity thumbnail generation also uses user-specifiable values :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

Trixtan

Works!!!

Post by Trixtan » Thu May 05, 2005 11:59 pm

Yeah... the second part of my job is almost finished.

I have created a sidebar plugin to show in the blog home page the last sent MMS. It is still in debugging phase, and for now it handles only jpeg mms, but tomorrow it will be arranged.

Now I have to create last part, the plugin that create a cathegory and show all the mms sent (formatting them like normal entries).
My last plugin is working in my blog: http://blog.enbi.it.
Thanks for the attention!!!

Good night.

Trix

Post Reply