proposal, Services_Blogs

From: Date: Sun, 26 Nov 2006 15:51:43 +0000
Subject: proposal, Services_Blogs
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-45022@lists.php.net to get a copy of this message
Hi everyone, my name is Till, I am Berlin-based (Germany) and here is my proposal for what I call "Services_Blogs". :-) I talked to a couple people on #pear@efnet before and from the feedback I felt this would be a good addition to the PEAR repository. *What is the objective of my class?* The objective is to offer a unified API to create a post on a blog and to support all the different blogs out there. To make posting a bit easier, the class also supports getting a user's blogs - for example if he fills multiple. An example for a complete posting process (if no data is cached locally in the app) would be a two stepper. Step #1 would be to get the user's blogs and step #2 be choosing one from the list and then submitting the post. *What type of blogs are supported?* Currently, the class supports Movable Type, blogger.com, Wordpress, Lifejournal, Blogspiriti, Drupal's Blog module, Dotclear, Friendster and Typepad. I'll be working on others as I run into them. ;-) *Structure* The class has a hub, which is used on initialize it. The containers for the different "types" (of blogs) are then checked (and included) and the object is created. Ideally I would install the hub through PEAR and then one would need to install the containers for the different blogs - just like MDB2 works for different databases. *Why have so many different containers?* Well, from my experience blogs can be a bit flakey (read tricky) even if they actually use the same API (e.g. MetaWeblog). Most have their distinct quirks which is why I decided to break them up into containers. In order to not dupe code in the containers, the hub class provides all methods so just the workflow of how to get there (= how to get your post on your blog) is done in the container for the blog type. This release can be considered at least a bit "hacky" since e.g. it die()'s if it doesn't find an extension it wants to use (e.g. I am using iconv to probably UTF-8 encode). I'll work on that and see what other packages use in those cases and probably add some dependencies to other PEAR packages. So even though I know about those, I am of course very open to every suggestion anyone might have. *The goodies!* Talk is cheap - so here we go. This is a test page which enables you to post a test to your blog (I hope): http://dev.lagged.de/Services_Blogs/test.php (No, I do not log anything done on there.) If you want to get the code, grab it here: http://dev.lagged.de/Services_Blogs/2006-11-22.Services_Blogs.tar.gz To move forward, I hereby request an account (login: till), so I can move my proposal to PEAR's website. If anyone has any objections, please let me know. Otherwise I will fill in the form tomorrow on the website. :-) Best regards, -- Till Klampaeckel e: mailto:klimpong@gmail.com p: +491704018676 l: http://beta.plazes.com/whereis/till Want to know what's up in Berlin? - http://berlin.metblogs.com

« previous php.pear.dev (#45022) next »