Al-Azhar

Archive for the ‘PHP’ Category

Web-based WYSIWYG Form designer

Monday, April 14th, 2008

A few days ago I decided to suppress my “conservative” stance towards massive Javascript usage and started working on a WYSIWYG editor for HTML Forms, The application resembles drag-and-drop GUI editors, I’ve spent lot of time in building the codebase to make it as Object oriented as possible.

The codebase is simply composed of two parts, Core and pluginis “Elements”

Each draggable element is handled by a 2 files

  • A javascript file that does the rendering and the event handling “Events are triggered by the core and passed down to each individual element”.
  • A php file that defines what properties the element has, these information are used by the core to generate property page, this file is just meant to hold configuration parameters, no actual coding involved.

Adding a new element would just require writing two files and the core handles the rest.

I’m using Prototype, script.aculo.us and Webtoolkit context menu, No true AJAX has been used so far, everything is done on the client side.

Now the question is , what does the end user see?

  • Drag and drop environment
  • Context menu for each element
  • Properties for each element
  • Simple keyboard interaction “Selected element can be deleted by pressing the (del) button (except textfield and textarea)”

I’ve tested this on FF2 and IE6.

What I really need to implement right now is the “Resize” function

Why don’t you check A demo of the code in action

I plan to turn this into a Joomla! forms component soon Insh’Allah.

Update: My Proposal to Google Summer of Code has been accepted and I’ll be working on implementing this form editor as a Joomla! 1.5 component, You can find more information about my progress on my GSoC blog

It is finally here , Joomla! 1.5

Tuesday, January 22nd, 2008

The long waited Joomla! 1.5 has finally hit stable status

Arabic , PDF And Joomla!

Saturday, May 5th, 2007

Update August 2nd, 2007: I will be releasing this hack in the following few days Insha’Allah.

Update September 4th, 2007: I’ve released the code on SourceForge you can access it by checking out the CVS there.
The project url: http://sourceforge.net/projects/arabic-tcpdf

CVS Checkout command

cvs -z3 -d:pserver:anonymous@arabic-tcpdf.cvs.sourceforge.net:/cvsroot/arabic-tcpdf co -P artcpdf

It is a known fact that Joomla! 1.0.x can export content into pdf format, however, this feature doesn’t seem to be working well when used to export Arabic content to pdf format, either windows-1256 or UTF-8 encoded.

To address this issue, The guys at the Joomla! core has moved to TCPDF library to export pdf files, this library has support for images and more importantly UTF-8 which means it can -theoritaclly speaking- be used to handle pretty much ANY langauge, This is true for many Left-To-Right languages, however, For a Right-To-Left language like Arabic the situation is quite different I’ll try to brief the problem here.
(more…)

Get Firefox! Valid xHTML 1.1 Valid CSS tracker