OpenSource Task list managers

home-portal-web

A typical workgroup and/or CRM applications comes with  full featured applications : sugarcrm, tine2.0 come with much more than contact management, task tracking, customer relation ship, and are conceived to integrate third party developments (plugins). But if you only need to track work to do, might have a look at simpler web based php applications :

  • myTinyTodo is so small and simple – yet ajax powered-  you’d love it at first sight
  • TaskFreak is the free version of a much more advanced applicatin, can be enough for a lot of small freelance  projects.
  • PlanCake is a nice hosted  job tracking application that can also be downloaded and installed on your server. Nice for testing before adopting.
  • todoyu (picture above) is the most advanced of our selection, with advanced features : manage multiple projects with team members but also clients online, overview your customer’s data, assign tasks to team member and external staff, share files within your work group, schedule events in a shared calendar, check and meet the deadlines

Magento configurable products : display images of sub product

In a previous article, I explored a technique that displays the first image of a sub product when selected in Magento’s configurable product page. This time we go one step further by changing the set of thubmnails to display all images associated with the selected sub / simple product. this tutorial requires completion of the the previous one  including the magento wiki ‘Change Product Image on View Page to Associated Product’s Image’ before you go ahead :

  1. in your media.phtml file, the big images are loaded via html. the image id is a collection of images from which only the first one is displayed initially, the other are waiting for the thumbail to be clicked. Simply add here the images collection from associated products,  each image being allocated a css ID built from product id and the increment
            <?//<associated product all images>
                if ($_product->getTypeId() == "configurable") {
            $associated_products = $_product->loadByAttribute('sku', $_product->getSku())->getTypeInstance()->getUsedProducts();
              foreach ($associated_products as $assoc)
                {
                $assocProduct =Mage::getModel('catalog/product')->load($assoc->getId());
                 $i=0; 
    
                 if (count($assocProduct->getMediaGalleryImages()) > 0) {
                       foreach ($assocProduct->getMediaGalleryImages() as $_image)
                        {
                         $imageFile=str_replace(Mage::getBaseUrl('media'),"",$_image->url);
                         $imageId=$assoc->getId() . "_" . $i++;?>
                          <div onclick="showZoom('<?=$imageFile?>')" class="jqzoom">
                  <img style="z-index:-1;display:none" id="image<?php echo $imageId; ?>"
                  width="340px"
                  height="250px"
                  src="<?php echo $this->helper('catalog/image')->init($assocProduct, 'thumbnail2', $_image->getFile())->resize(350, 250); ?>"
                  alt="<?php echo $this->htmlEscape($assocProduct->getName()) ?>"
                    jqimg="<?php echo $_image->url; ?>"></div>
                <?php
                         }
                    }
                }
                } //</associated product all images>
            ?>
  2. in the same file, below, the images thumbnails are displayed in unordered lists. What you need to do here to create one unordered list per associated product, with a display none styling  :
                <?//<associated product all images>
                if ($_product->getTypeId() == "configurable") {
            $associated_products = $_product->loadByAttribute('sku', $_product->getSku())->getTypeInstance()->getUsedProducts();
              foreach ($associated_products as $assoc)
                {
                $assocProduct =Mage::getModel('catalog/product')->load($assoc->getId());
                $i=0;
                 if (count($assocProduct->getMediaGalleryImages()) > 0) { ?><ul id="teckLoom<?=$assoc->getId()?>" style="z-index:-1;display:none">   <?
                       foreach ($assocProduct->getMediaGalleryImages() as $_image)
                        {
                         $imageFile=str_replace(Mage::getBaseUrl('media'),"",$_image->url);
                         $imageId=$assoc->getId() . "_" . $i++;?>
                         <li>
                <a href="#" onclick="jSelectImage('<?=$imageId ?>'); return false;">
                <img src="<?php echo $this->helper('catalog/image')->init($assocProduct, 'thumbnail', $_image->getFile())->resize(70); ?>" alt="<?php echo $this->htmlEscape($_image->getLabel()) ?>" title="<?php echo $this->htmlEscape($_image->getLabel()) ?>" />
            </a>         </li>
    
                <?php
                         }      ?></ul> <?
                    }
                }  }
                  //</associated product all images>   ?>
  3. use the select color  function from our previous article to display the associated image set when an option is selected via image click :
    function selectColor(idAttribute, idProduct)
    {
    jQuery('#attribute76').val(idAttribute);
    spConfig.reloadPrice();
    displayProductConfigImage(idProduct);
    jQuery(".more-views ul").hide();
    jQuery(".more-views ul#teckLoom" + idProduct).show();
    }
  4. add the following code to js/varien/product.js to let the effect work when an option is selected in the dropdown menu :
    var productNo = intersect(selectedAssocProducts) || selectedAssocProducts[attributeId][0];
    //alert(jQuery("#image0").attr('src'));
    //$('image').attr("src", assocIMG[productNo]);
    displayProductConfigImage(productNo);
    jQuery(".more-views ul").hide();
    jQuery(".more-views ul#teckLoom" + productNo).show();
  5. Have a look at the result on ruedesiam’s lovely designed multi color loom furniture : try  the chaise giulietta

Carrington for Wordpress makes CMS easier

Sounds too good to be true : the Carrington wordpress theme framework, developped by Colorado based CrowdFavorite, implements what we’ve all been waiting  for :  AJAX/ drag & drop  wysiywg page structure management. It builds on the existing core WordPress theme structure and functionality and uses core WordPress theme functions for easy adoption by experienced theme authors.

Announcement : http://crowdfavorite.com/wordpress/carrington/

Magento : find out which xml fails

If you’ve been working with Magento extensions or layout, you might have encountered the frustration of trying to find out which XML generates the following error, potentially harming the whole magento installation :

Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 61: parser error : StartTag: invalid element name  in C:\aa_work\RueDeSiam\www\lib\Varien\Simplexml\Config.php on line 502

#0 C:\aa_work\RueDeSiam\www\lib\Varien\Simplexml\Config.php(502): mageCoreErrorHandler(2, 'simplexml_load_...', 'C:\aa_work\RueD...', 502, Array)
#1 C:\aa_work\RueDeSiam\www\lib\Varien\Simplexml\Config.php(489): Varien_Simplexml_Config->loadString('?????? ...', 'Mage_Core_Model...')
#2 C:\aa_work\RueDeSiam\www\app\code\core\Mage\Adminhtml\Model\Config.php(102): Varien_Simplexml_Config->loadFile('?????? ...', 'Mage_Core_Model...')
#3 C:\aa_work\RueDeSiam\www\app\code\core\Mage\Adminhtml\Model\Config.php(63): Mage_Adminhtml_Model_Config->_initSectionsAndTabs('C:\aa_work\RueD...')
#4 C:\aa_work\RueDeSiam\www\app\code\core\Mage\Adminhtml\controllers\System\ConfigController.php(70): Mage_Adminhtml_Model_Config->getSections()
#5 C:\aa_work\RueDeSiam\www\app\code\core\Mage\Core\Controller\Varien\Action.php(367): Mage_Adminhtml_System_ConfigController->editAction(NULL)
#6 C:\aa_work\RueDeSiam\www\app\code\core\Mage\Core\Controller\Varien\Router\Admin.php(143): Mage_Core_Controller_Varien_Action->dispatch()
#7 C:\aa_work\RueDeSiam\www\app\code\core\Mage\Core\Controller\Varien\Front.php(158): Mage_Core_Controller_Varien_Router_Admin->match('edit')
#8 C:\aa_work\RueDeSiam\www\app\Mage.php(457): Mage_Core_Controller_Varien_Front->dispatch(Object(Mage_Core_Controller_Request_Http))
#9 C:\aa_work\RueDeSiam\www\index.php(66): Mage::run()
#10 {main}

the problem with this kind of error is that it doesn’t tell you which file is causing the error. To find out, work with your local installation

  • set the developer mode in index.php : Mage::setIsDeveloperMode(true);
  • open the app/code/core/Mage/Adminhtml/Model/Config.php and let the _initSectionsAndTabs tell you which xml is being loaded in the modules loop, just after $configFile is defined : echo $configFile;
  • the last file that pops before the error is thrown out is likely to cause the breakout !!

wp super cache and WP3.0 menus

For those who are running small servers and wish to accelerate their worpdress installation, we recommend the installation of eaccelerator but also the wp-super-cache plugin. There is just a small hack for wordpress 3.0 menu users : the cache should be totally refreshed when a menu is modified, and this is performed via the wp_update_nav_menu action, instantiated in the wp-cache-phase2.php / wp_cache_phase2 function

add_action("wp_update_nav_menu" , 'wp_cache_clear_cache' );

Read the rest of this entry »

PHP development framework comparison : symfony, Zend Framework, Code Igniter

Before starting development on a new project, I need to investigate 3 popular PHP development frameworks. I would say if you need to choose, stick to the one you know already. I you don’t know a framework already then you’re in trouble and you need advice. Here a few things I would look for.

Beyond the code and standarts : what’s available

MVC is a nice idea but it’s only an idea and even if it’s useful to structure the code the power of frameworks are in their community.

  • Look for application samples.
    • Zend framework used to have a good application sample, distributed free as DodoApp. Unfortunately it’s not available any more but other applications are out there to get you started if you need code samples, check out our article. In general I have been looking a lot and it’s hard to find a starter application for Zend Framework
    • Symfony has a lot of opensource applications, the list is here
    • Code Igniter is simpler to learn apparently but you’ll find it hard to find good sample applications .We ‘ve listed two of them in a previous article
  • Look for available code snippets
    • Zend framework code snippets can be found all over the web but you have to know the framework really well to integrate them in your application
    • Code igniter snippets are displayed on the forum but not categorized
    • symfony snippets are organized and tagged in the plugin repository, easily available from Symfony’s official web site,  and I have to say that’s a real sign of good community work

The conclusion is make your life and your own choice. I was using Zend framework but a few minutes investigation convince me I should look into symfony.

Magento Configurable products : change product image on thumbnail option

This article describes a  color chooser for magento product page, a technique that automatically use product attributes from a Magento admin to display color thumbnails that

  • allows end user to choose color option by clicking on thumbnail
  • change product image to associated product image

the technique above is inspired from Magento Wiki page that describes the javascript that catches the Options price select event to modifyu the product image. We’ve changed a few things though

  1. Read the rest of this entry »

Publish wordpress posts to social networks

Header_Share

Worpdress is great for quick publishing and a variety of plugins are available that let users publish to various platforms. The image above, extracted from the gigya website, illustrates the versatily of social networks. Gigya itself provides a plugin for Wordpress. The technique is commonly described as cross posting, meaning one post on wordpress notifyes various social networks. Cross post plugins include:

  • WordBook : cross-post your blog posts to your Facebook Wall.
  • Same for wordbooker
  • Wordpress to myspace publishes  posts to myspace
  • Ping FM is a free  service that publishes posts to social networks. Wordpress has a few plugins that integrate with ping.fm, check this out

Statistics are an important part of social networking : no point developping web presence without knowing where you go

  • Facebook Share Stats : provides charts and numbers  on your posts shared on Facebook, with statistics and charts about the number of “like“, comments and clicks received.

Interesting links

Allow users to submit posts with wordpress

Besides the famous CFORMS plugins, opther plugins exist that forward user input directly to posts

  • TDO Mini Forms : comes with a lot of options that specify who can publish what and how new posts are moderated
  • FV Community News

Jquery wysiwyg editing

image.axd

Out of smart combination of powerful jquery plugins and functions comes the Minibar, contextual editing menu that pops up in windows Office 2007 fashion. The demo provided works with standard textarea editor but we’d like to see it implemented within tinymce or fckeditor, for instance : no doubt this is coming in the next few hours !!