phpWebSite Manual
phpWebSite Manual

phpWebSite Resources

Mods

3rd Party Mods

Who's Online
There are currently, 5 guest(s) and 0 member(s) that are online.
You are an Anonymous user.
You can register for free by clicking here
No Members are currently logged in.

Interview with Eloi George, third party module developer

Interview with Eloi George, third party module developer







Eloi George, developer of phpWebSite Article Manager and other third party hacks.
Eloi George
by Andrew Patterson
15 January 2005


Tell us about yourself and how you came to be involved with phpWebSite?

I was born & raised (mostly) in St. Thomas, Virgin Islands. Studied Business and Computer Science at University of Maryland at College Park and moved back home after graduation. I own by George! Appraisal Services, Beatrice George Real Estate and by George! Technologies. I'm also CFO of Albea Development Corporation. Yes, I know -- more than 2 jobs. I'm a stereotypical West Indian!

Hobbies? It's all a hobby. I believe in the saying that if you love what you do, you'll never work a day in your life! My wife Rosetta and I also work next to each other, so I get to play with my 8 month-old daughter Ford all day.

I became aware of phpWebsite back in mid-2002 when one of my wife's sites (www.vbride.com) grew to the point that she needed to have contributing writers. By the time I finished researching 0.8.1 came out and that was my first installation.


Do you make your living building and supporting phpWebSite sites or this is more of a hobby for you?

Part of a living. I'm currently a web hosting reseller and in conjunction with by George! Advertising & Printing (my wife's business). We design and maintain some of the sites under service contracts. I'll be expanding this business later this year.


You are probably best known for your Article Manager contribution. What motivated you to do develop that module?

When we first started using phpWS, I had the same newbie question about which to use; Announce or PageMaster. I settled on Pagemaster but wanted a couple of Announce's features in it, so I posted a Feature Request. After a while and some thought I realized that bugging Matt & Adam for features that probably only I needed would take their time away from the vastly more important (and difficult) task of creating what I think is the greatest CMS ever. So I learned PHP & started writing my first hack. A few months went by as I added more features and optimized the code until I realized that it didn't look like PageMaster anymore! So I rebuilt whatever code was left to my own specs and called it Article Manager.


Have you developed other third party mods? If so, tell us about those.

I've done a few other mods like a "Who's On" module, an insurance policy management module and a classified listings module (replaced by phpwsListngs). My company slogan is "Not just programs -- Solutions!". Therefore I try to make existing products work before venturing into new territory. I think of myself more as a mechanic than a coder. Most of my time is spent modifiying code. I've created a couple core features, a core class and I've contributed a lot of code towards making phpwsBB work more like phpBB and InvisionBoard.

Oh yes, about 2 years ago I also developed a version of Article Manager that works with a user permissioning system managed through FatCat.

In development now are a kind of sub-blogging module, some calculating survey modules and a job-tracking module.


You have also done some hacks that you have published on your site, www.bygeorgeware.com. Can you tell us about some of those?

Sure! The SuperHack contains the code for 3 core-level hacks -- the Mod-Rewrite (short URL) hack, Immediate Login Hack, and Javascript/Flash Hack.

The Mod-Rewrite (short URL) hack makes phpWS URLs look like static files, so that links like "www.mysite.com/index.php?module=article&view=31" are replaced by shorter ones like "www.mysite.com/article31.html". It also convinces the search engines that they're not indexing dynamic pages. Your webserver has to be able to use .htaccess files for this to work.

The Immediate Login Hack adds a new user login option that lets the new users choose their own password and automatically logs them in. This option also allows you to set a default page to send users to after signing up. With this feature the possibilities are endless! You can send them to a form to fill out, a welcome page or even an announcement entry form. This hack is now part of the 0.10.0 core, so its not included in the 0.10.0 Superhack.

The Javascript/Flash Hack creates a second tier of allowed HTML tags, so that you can specify that only certain users can use, say, the IMG tag. Deities are now all-powerful. They can use any tag they want. The hack also modifies the text parser so that Flash and Javascript executable scripts can be typed in along with the content.


We've done similar things on this site in terms of allowing Deities to enter php or javascript code in content fields. But I still wonder about potential security issues. Are you not worried about permitting scripts in database content?

Well, PHP code definitely shouldn't ever be entered as content, because if someone with script-writing authorization wanted to, they could do anyhing to your server. If you happen to be on a shared hosting service, they could access and control all other accounts on the same network as well! If that happened, you'd be hit with lawsuits so fast it would make your head spin. Just write a module. With the Notes and Skeleton modules available to use as a base, there's no reason you couldn't spit out a very basic module in a few hours. Once you've learned how to write them, of course.

Javascript however, is a different animal. It executes on the client, which minimizes the risk to the server. As long as the user minimizes their risk from Javascript exploits by keeping current on security patches, they're cool as well. There's also more demand for entering JavaScript as content for popups, banners, counters, richmedia, buttons, floating rubber duckies -- stuff like that. So in terms of time management efficiency, Javascript (and Flash) becomes a necessary risk.


Where do you keep the latest releases of Article Manager? Is bygeorgeware.com the site you would refer people to for support? Or do you rely on forums here and elsewhere? What about the phpWebSite Community Development Project (a.k.a. -comm)?

bygeorgeware.com is primarily where I distribute Hacks. Module releases can be found there, but they should really be downloaded from the phpWebsite Community on SourceForge. I rely on the various forums for support because I think that all modules' support should be centralized. I'm kind of okay with 3 different support sites. What I don't like is that 2 of them aren't even running phpWS!


If I understand correctly you have licenced Article Manager differently than the GNU license under which phpWebSite is published. What are your reasons for that?

It's an experiment. I'm trying to figure out how you can make money from Open Source. You can either use the module as-is, or you can buy a license to get rid of the displayed copyright. It's only $25 per site. If they don't want to pay, it's no problem. I still benefit from the link popularity.

The funny thing is that I never modified the LGPL license. The regular license says that if the software displays a copyright, any modified package you make must display that same copyright. Because every so often I'd hear an armchair lawyer spout BS about how the GNU licenses are unenforceable, I just decided to emphasise the part of it that meant the most to me. This excerpt from the license explains it better than I could.
EXPLANATION OF LICENSE (PREAMBLE):

I just wanted to take a second to explain my interpretation of the terms of this license so that there'll be no misunderstandings later on.

I'm new to this whole freeware thing. Frankly, I don't get how programmers can make money doing this. However, I'm willing to give it a shot. What I've done is inserted a copyright display of links that will show on every non-homepage generated by this module. I've made it really small so that noone but web spiders will really notice and use it.

Now that I've told you where to look, you can't stop staring at it, can you?

This mark must always display so that it can perform its function. Since this module is released under the LGPL, you can change the code if you want, but this mark must still display in the same manner. If you want to change or remove the identification string, contact me and I will sell you a copy of this module under a different license.

These terms are covered in the license, but I understand that some folks choose to interpret the passage differently. For those people, let me make this clearer. Everything I just said is part of and supercedes the rest of the license terms specifed below. I'm not a lawyer, so if you feel that this invalidates the GNU license, then consider the above terms as constituting the entire license.


Article Manager is featire rich and I use it as the primary module on one of my sites, but to be honest with you I've had reservations about using it because there are some things that are done differently from the modules delivered with the phpWebSite package, licensing being just one. By default php files are set to read only which makes upgrades difficult. The coding style is not the same. In one instance I made a change to addPageTitle() in Layout that affected all modules except Article Manager. There I had to make the same change in five or six places. I worry that Article Manager will fall behind as phpWebSite evolves. What would you say to these comments?

Falling behind? (Laughs) A lot of the problems that Article Manager has faced is because it's constantly pushing the limits of phpWS! I usually use the module as "proof-of-concept" of things that phpWS should do or do better. Core module-level features like re-ordering objects, displaying a printable version with a site header & footer, and modifying webpage titles and other metatags on-the-fly all started out as Article Manager code.

Of course, trying to innovate while staying compatible with a wonderfully evolving system does cause problems. The pagetitle-generation code that you had to change was from back when the Layout module refused to let modules touch the webpage metatags. I didn't know about Layout::addPageTitle() until you mentioned it. Rest assured it will be changed in the next version.

Until the new core is finished, I don't think there are that many more features that Article Manager needs. The only upcoming feature in development now is Multi-Language capability. User permissioning will come back in with the new core. Revision history will probably need to be changed slightly to work with the promised workflow system. As far as blog-related features go I'm just waiting for the Atom API and Rck's Trackback module to be finalized.

Your readonly php files are probably because of the program I use to create the gzipped files. I've been changing compression programs every time someone reports a problem with file extraction. However, they're always Windows programs. I'll probably have to try packaging the release files remotely on a Linux box.

I'm not sure what you mean by coding style. Do you mean the way the code is laid out, the way the classes/methods interact or my flagrant use of includes? (grin)

Certainly the "flagrant" use of includes is something that is unique to your code. Even if the addPageTitle function in Layout was not available, having to change the same code in 5 or 6 places shows a tendency for expediency as opposed to rigor. In A_update I notice that you set update_date to publication_date. That changes the meaning of update_date which is used throughout phpWebSite, so that bothered me. Perhaps I should have referred to a different "development style" instead of "coding style" in my previous question.

The includes are there to keep the code size (and server memory requirements) down. There's no reason to load code for a function that you 're not going to use. The function code that is still included in the main class file are those that are used most often. That way you can optimize the speed at which most requests are executed.

Interesting that you should bring up the "expediency vs. rigor" thing. There's a gray area where you make the decision to offload code into a function. If you have a lot of duplicate code, it's best to turn it into a function for reuseability and readability. That's the reason for the Core classes. However, if the "duplicate" code is too dissimilar, it's best to leave it like it is, because by the time you're finished with your new function with all its "if" statements to satisfy every concievable purpose, the code ends up taking twice as long to run! So now "expediency vs. rigor" is equivalent to "speed vs. reuseability". In the case of these 6 one-liners, a small amount of speed would be lost because the function has to be called, parameters passed, the same one line of code run, and then (probably) garbage collection as the function exits. That's not really why they're still separate one-liners, though. I just never considered changing it. (big grin)

It took me a while to decide on the best action to take on that A_update.php code segment. The updated date is never lower than the publication date. In news agencies, an article's change of status from "unpublished" to "published" counts as an update, because an editor would approve things to go out on a daily basis. In addition, the "Also on this site" listings on the homepage are listed by update_date, so if the article was last updated way before the publication date, it could theoretically never show up on the homepage as a new article.


How do you stay involved? What participation do you have with the phpWebSite community?

I try to stay connected as much as I can. I monitor the SourceForge forums by email and I participate in the forums here and on phpwsforums from time to time. Although I greatly enjoy being on the #phpwebsite IRC channel, I'm usually out of my office. That's why I *really* love your IRC logs! (smile)

Editor's note: it was Eloi who came into the #phpwebsite IRC channel one day asking if the discussions were logged anywhere. That triggered publication of the IRC logs on this site.


I have seen comments or questions in the forums like "How do I get started building my own module?" What advice would you offer a newbie in response to this question?

Stay away from the Item & Manager classes for now! (laughs). I mean it -- it might limit you and slow down your module in the long run. List is truly cool though. Don't try to re-invent the wheel. Learn the Core functions. Ask questions -- we're all willing to help. Search the forums because your answers are usually already there.

Remember that you're developing a web application that will be used by lots of people every second. Focus on speed -- speed of loading and executing code and data. Try to minimize the number of database queries. Use single-quotes instead of double-quotes whenever possible.


Is there anything else you would like to comment on?

Hi mom!


Thanks Eloi ... all the best to you, Rosetta and young Ford!


Created on 01/09/2005 08:49 AM by andrewp
Updated on 01/20/2005 08:25 PM by andrewp
 Printable Version

Comments - Please Log In to make a comment
The comments are owned by the poster. We are not responsible for its content.
Really, Andrew...
Posted on: 01/15/2005 09:56 PM   By: Anonymous
This may be the best interview yet -- I like the details on coding methodologies as well.

Eloi's Article Manager has long been my favorite mod.

Bobby
gzip/tar
Posted on: 01/17/2005 09:50 PM   By: singletrack
Eloi - to solve your release problems, install http://www.cygwin.com/ and use the same GNU gzip and tar programs Linux/Mac users use if you're on Windows.
So much
Posted on: 01/19/2005 09:07 AM   By: Anonymous
This interview shows me again: We got sooo much in common, Eloi ;-) I like Article Manager and the Super Hack a lot and tell everyone to use them. But I don't need to tell you that. // rck
Item/Manager
Posted on: 01/23/2005 08:42 PM   By: Anonymous
Very good interview. I wanted to comment on the Item/Manager discussion. While I agree that Item/Manager has problems currently, I think anyone new to developing for phpWebSite should use this. Why? How else are you going to figure out the weaknesses in Item/Manager so you can push changes back into phpws?

For example, take a look at phpwsRSSFeeds. I started out using Manager/List/Item. I started running into problems at the point when I wanted to add additional functionality not available in Manager and List. I created copies of Manager and List to account for functionality not available in the core classes. Changes I can now submit for inclusion in future releases. Because of the similarity to the core classes, anybody *should* be able to easily hack the functionality. (couple things will be confusing)

If anybody is interested in the Manager change. I changed the functionality to manage an item class instead of the current functionality which assumes there will be only one item. This is what allowed easy inclusion of the multi-view and aggregation item classes. Thus the name RSSObjManager :)

Steven indicated that he's now doing things similarly. They used a similar method for the big internal project last year. I fully expect these capabilities in 1.0.

Wendall

Wendall

Re: Item/Manager
Posted on: 01/28/2005 05:41 PM   By: Anonymous
I was wondering if it would be possible to extend article manager a bit. There is a pagemaster hack here that restricts editing of pagemaster pages to groups. Could this be extended to article manager. My site will have 100+ user contributing content, but they will be in groups. Also It would be great if the approval were also restricted to articles or pagemaster pages responsible to that group.

Any thoughts?
Edited By: andrewp On: 01/28/2005 06:24 PM
Article Manager
Posted on: 02/07/2005 11:41 AM   By: Anonymous
1. Please update code so I don't have to hack it to install it under 10.x.

2. Add a menu hook directly to the Approval Mod for convenience - and show some kind of indicator showing unapproved articles. (yes I know it emails you)

3. Fix broken listing system - try n use it like a user would and you'll see what I mean. Fix it so that when I want to "see the friggin articles" it pulls up a nice list of the artiles instead of having to wade thru a bunch of sub links like the link manager does.

Re: Article Manager
Posted on: 02/07/2005 11:58 AM   By: Anonymous
Upgraded code base from 9.3.4 to 10.x
_X_ phpwebsite still shows 9.3.4 code / version number
_X_ copied article mod into mods section of code tree
_X_ set perms on files & images dirs to httpd.httpd
_X_ Installed article manager 3.0 from boost
_X_ Create new article
_X_ Save section
_X_ List articles - Nothing found in article listing
_X_ went into approval module - nothing found

Please advise
Re:User Manager
Posted on: 02/07/2005 12:02 PM   By: Anonymous
What is the point of all of the little checkable boxes in the various modules for the users?

To see wht I mean, go into Adinistration, User Manager, and then edit a user.

It seems to imply some sort of granular control over the user's ability to get into things, but none of it has any effect.

Is this an unfinished section of the cms ?
Would like to actually use this feature...
Re: Re:User Manager
Posted on: 09/20/2005 11:34 PM   By: Anonymous
Sounds like Eloi is not in favor of the post-processing hack in phatform? I've been using it lately to replace hard-to-maintain "hacks", but was also worrying about security. I wonder if there is anything that can be done to improve security around that, and/or a way to make a more generic "extension" mechanism (I don't always want a form) that is also secure.
The irc logs are great.
Posted on: 09/30/2005 02:00 AM   By: Anonymous
The irc logs are great, but I can't seem to find out what server they are from?!?


Sponsored by Patterson Research
Founded by Robert Kennedy
Powered by phpWebSite