Tilt viewer by simple viewer

The guys behind simpleviewer have had a huge success with the first version of their flash base image  viewer. The new tilt viewer is really a good one as it renders the feeling that the image can be explorer from all sides within the most appropriate angle. Another freebie from the same guys  reproduce the idea of postcards.

JqGalleryAdmin : php / mysql / jquery gallery drag & drop admin

screenshotweb

Whoever has had the opportunity to work with silverstripeundesrtands  how the drag and drop features can enhance productivity. Modules in Silverstriupe CMS are great but are wholly integrated within the full framework and cannot work without the huge memory and disk overhead that this framework comes with.  I decided to develop my own independent image gallery admin module, using php / mysql / jquery technologies from the examples below.

The idea is to develop a full featured image gallery with backend features, like the one we have for eyelash gallery, product developped by me a few years ago.

This post provides version 0.1  of JQGallery, an administration module for image gallery management. It has been tested on Firefox /Chrome and will not work with IE6. Please note that it is not secure, not to be used as such in a production environment yet.

Let me know if you find bugs. A demo is available here (upload / delete are disabled)

Installation is quite easy :

  1. check that your server matches the following requirements : php 5 / mysql 5
  2. download : jqGalleryAdminDemo (6)
  3. unzip to a folder within htdocs
  4. configure mysql access  in db_mysql.inc.php with database details (server / database / user / password)
  5. manually create the table : load the sql setup file from includes/setup.sql in your database, using phpMyAdmin
  6. check that the apache has read/ write privileges  on the uploads folder
  7. and off you go
  8. come back to use with bug reports and enhancement requests

code samples used to develop JQGalleryAdmin :

jquery goodies

Tip : convert mac fonts to TTF

Handling mac to ttf conversino is a simple task but necessary when working with designers. CrossFont v5.4, developped by actute systesm INC in ILLINOIS (USA) does a nice job converting any mac format even when it’s been transferred to a PC via zip files.

Tomatocart rebuilds oscommerce

tomatocart

There are many discussions on whether oscommerce is dead or not. From an industry where every six months new products come online with ever more exciting new features, the longevity of Oscommerce, the first opensource e commerce application, is a good example of a bad designed  application theat does the job well. Os commerce evolution has stopped in 2005, when the first preview of the MS3 version - not yet released as of today - went public. What struck me with tomatocart is the backend interface, based on ext js desktop layout with charts by piwik / openchart flash . More info on http://www.tomatocart.com/

Opensource Time Tracking application

I ust went for a few minutes of time tracking and found that Kimai is really a neat and well designed PHP/ Mysql
/ Jquery opensource application. Designed for multi users, it implements a very  simple one click time tracking  interface : select the project / customer you’re working on, click on play, and there you are,  time starts running. close your browser or leave it open, you can come back to the application to stop the counter and your work is tracked in database records that permits all kinds of reports and statistics. Even though the application works well for those who plan to work full time on a single project / task for a few hours  (implying a start  moment and a end moment), it also works well   to handle end of the day assessments by simply writing tasks and times.  Very good job. What could I improve on this ? tags handling as in wordpress !! (telephone, writing, programming…). And instead of a fixed client / project / task hierarchy, probably easier to understand for most users, I would rather have gone for unlimited sub levelled hierarchy of tasks..

kimai08

Form builders : getting hot

A few months ago I published a quick comparison of 3 opensource cmses that come with a form builder. At the time the form builder feature was quite new and innovative, it now comes as a standard feature in a lot of web publishing solutions. I have reviewed a few hosted form makers, such as

They all have very nice interfaces including data gathering and statistics but the one I loved best was MachForm that is also distributed as a standalone application fro a very reasonable price. It uses Jquery as the main javascript library and lets the user build forms using drag and drop. One good idea is the composite field that lets the user add adresse field in one click. The screenshot below displays my own translation of the admin interface to french.

formmaker

Magento : display product image on invoice + shipping PDF

Magento’s wiki has a few articles on the subject of Magento’s PDF generation, which is not very efficient in its default version : one of the main critics I’ve seen is the size of the generated PDF, which can fly to more than 1MB, where a simple font replacement can bring the weight to less than a few KBs ! The subject of the article below is to illustrate how to display images on each line of the generated invoice and shipping PDF.
The product line display occurs in specific PHP classes within  the app/code/core/Mage/sales/Model/order/pdf folder

there is one folder for shipment, one for invoice, and one for credit. The product display occurs in the DEfault file where the Mage_Sales_Model_Order_Pdf_Items_Abstract is defined. What I did was simply instanciate a product object using the id from order / items, and get the image file using the following code in the draw function :

  1. //<display image>
  2. $id = Mage::getModel(‘catalog/product’)->getIdBySku($this->getSku($item));
  3. $product=  Mage::getModel(‘catalog/product’)->load($id);
  4. $imageUrl = $product->getSmallImageUrl();
  5. $imageFile=  str_replace(Mage::getBaseUrl(‘media’),"media/",$imageUrl);
  6. // $page->drawText($imageFile , 65, $pdf->y-$shift{1}, ‘UTF-8′);
  7. $imageWidth = 100; $imageHeight = 50;
  8. $image = Zend_Pdf_Image::imageWithPath($imageFile,$imageWidth,$imageHeight);
  9. $y=$pdf->y - $imageHeight /3;
  10. $page->drawImage($image, 35,$y, 35+ $imageWidth / 2, $y + $imageHeight/2);
  11. //</display image>

Magento one page checkout : display shopping cart details in sidebar

magentoonepagecheckoutorder

There are a lot of discussions going on about Magento’s one page checkout procedure : it is supposed to enhance customer payment experience by probviding ajax based single page order progress. But there are alos some discussions in the forum on how to enhance this process which is quite unusual and might discourage some customers. In a previous post I reviewed the code that produces sidebar shopping cart in default pages with right margin. The solution below explains how to add a full shopping cart display for the customer’s that trying to complete an order.

Read the rest of this entry »

Silverstripe CRUD / DATA management

With new versions coming up regularly, Silverstripe proves to be one of the best and usable Content Management System, including full website page content management fetaures and full relational database content management. Like most opensoruce projects, one big asset missing is a documentation, we hope this is getting better especially with the release of the Silverstripe book english translation, to be published in august. Finding one’s way in the plethora of modules and code hacks available for Silverstripe is a rough job, but it pays. Data management in silverstripe  is actually, in my opinion, one of the most integrated and flexible solutions available out there. Another good source of information for developers can be found at the newly built ssbits website that develops hacks and tricks.

In detail

Two different options exist in Silverstripe for data management

  • DataObjectManager  is a plugin developed by Uncle Cheese, also known as Aaron Carlino. His dataObjectManager allows the building of data management interafaces within page types, with many features including HTML field, file upload. A good example of the dataobjectmanager is the image_gallery module that improves the standard lightbox gallery that we used in Silverstripe. 
  • ModelAdmin is the new scaffolder for Silverstripe : it allows the building of data mangement systems within the Silverstripe admin. The documentation is a bit sparse but there’s a public presentation that explains it quite extensively.