Posts

Showing posts from August, 2011

[Zend] 'Plugin by name 'JQuery' was not found in the registry

Got this error while trying around with Zend. Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'JQuery' was not found in the registry; used paths:Zend_View_Helper_: Zend/View/Helper/:/public_html/staging/app/views/helpers/:/public_html/staging/app/modules/default/views/helpers/' in /public_html/staging/lib/Zend/Loader/PluginLoader.php:412 Stack trace: #0 /public_html/staging/lib/Zend/View/Abstract.php(1174): Zend_Loader_PluginLoader->load('JQuery') #1 /public_html/staging/lib/Zend/View/Abstract.php(610): Zend_View_Abstract->_getPlugin('helper', 'jQuery') #2 /public_html/staging/lib/Zend/View/Abstract.php(336): Zend_View_Abstract->getHelper('jQuery') #3 /public_html/staging/app/modules/default/layouts/public.phtml(19): Zend_View_Abstract->__call('jQuery', Array) #4 in/public_html/staging/lib/Zend/Loader/PluginLoader.php on line 412 Googled around

[Eclipse] Zend PDT installation error

Got this error while trying to install Zend PDT plugin for Eclipse: An error occurred while collecting items to be installed session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). No repository found containing: osgi.bundle,org.zend.php.debug.debugger,5.3.18.v20110322 No repository found containing: osgi.bundle,org.zend.php.debug.debugger.win32.x86,5.3.18.v20110322 No repository found containing: org.eclipse.update.feature,org.zend.php.debug_feature,5.3.18.v20110322 Googled around and found the workaround to solve this. Apparently, we just need to get the features jar, the plugin jar and the platform specific plugin. And all these are available on Zend download sites. Missing files - Feature Download org.zend.php.debug_feature_<required-version> from  http://downloads.zend.com/pdt/features/ Unzip the feature jar into "/features" folder of eclipse folder. Missing files - Plugins Downl

The Manual Way to Hide / Remove reCaptcha Audio

Image
Was trying to disable the audio option for reCaptcha, but couldn't find the official way to do so. So in the end, I used the old-school javascript + CSS method to hide the buttons. Hiding the buttons Add this code snipped anywhere after the reCaptcha code. <script type="text/javascript"> jQuery(document).ready(function(){ document.getElementById('recaptcha_switch_audio_btn').style.display="none"; document.getElementById('recaptcha_reload_btn').style.display="none"; document.getElementById('recaptcha_whatsthis_btn').style.display="none"; }); </script> Filling ackground color Now  we have a empty space in the column where the buttons are. So just use CSS to replace the color. #recaptcha_table tr {background:#dfdfdf;} There you go, a reCaptcha with no audio option. :)

[Tutorial] Getting Started Zend Framework 1.11

Note: This guide is still at the initial writups. This tutorial is intended to guide beginners through the basic steps to setup a database driven website (without using Zend_tools command). Prerequisites : Zend Framework 1.11.10+ Full PHP 5.3+ (Optional)  Zend Eclipse Plugin / Zend Studio  (30-days trial)   The tutorial is divided into the following sub-sections :  1. Download and Zend Framework setup. 2. Modularize directory structure 3. Database(s) setup 4. Account component 5. Helpers Optional 1. Setting up Subversion SVN References: [1]  http://akrabat.com/zend-framework-tutorial/ [2]  http://framework.zend.com/manual/en/zend.controller.modular.html [3]  http://www.zfforums.com/zend-framework-general-discussions-1/resources-developers-37/setup-multi-modules-zend-framework-v1-9-13-steps-3737.html []  http://framework.zend.com/manual/en/project-structure.project.html []  http://zfsite.andreinikolov.com/2008/05/part-2-setting-up-the-project-and-a

Fat-Free Framework

There are many frameworks out there that help to speed up web development. However, many frameworks has grown too complex and fat because there are too many unused classes and functions in it. Heres a good write-up on the comparison between various PHP framework, and the memory that they used. http://www.laurencegellert.com/2011/06/memory-usage-in-php-frameworks/ Came across this particular framework, called Fat-Free Framework . http://fatfree.sourceforge.net It is interesting because its designed ground up for PHP5.3,  in-built ORM DB support, (i.e. SQL) in-built NoSQL support, (i.e. MongoDB ) super small footprint,  Will do a write-up again after hands-on with this new framework.

[Magento] Create Contact Form with Dynamic Recipient

There are many ways of creating contact forms to email to multiple recipient. I'm going to describe a way that uses Javascript a the frontend to change the target recipient. Advantage of this method: Easy to add in new emails in the future. Disadvantage of this method: For those who are particularly concern email privacy, you might not want to use this method. You can modify the email checking to the backend (controller) instead. Okay enough talking, lets get started. Step 1: Set up HTML form fields I'm going to use an example of drop down select to change the email. Of course, this is fairly easy to modify with other forms as well. Open up app/design/frontend/default/<theme>/template/contacts/contacts.phtml Insert the following snippets anywhere between the <form>...</form> tag. <select name="interest" id="interest" title="<?php echo Mage::helper('contacts')->__('Please select department t

[Magento] Default Search / Mini Search returns 0 results

Was debugging this weird problem with a client's Magento 1.5.1.0 site. The Mini Search (and the default search - http://example.com/catalogsearch/result/?q=searchTerm) is not returning the correct result. Surprisingly the advanced search is working fine. After trying out all sort of methods, finding and editing the .phtml, .xml files. I found out that its one of the core files that causes this issue. Solution Open up app/code/core/Mage/CatalogSearch/Block/Result.php Uncomment line 149 and 150 //        $this->getListBlock() //           ->setCollection($this->_getProductCollection()); Then change line 172 $this->_productCollection = $this->getListBlock()->getLoadedProductCollection(); to $this->_productCollection = Mage::getSingleton('catalogsearch/layer')->getProductCollection(); That solves the search problem. :)

Acajoom Installation Error Fix

Image
Was upgrading Acajoom GPL 3.2.7  to Acajoom 5.2.0  and encountered the following errors. JInstaller::install: SQL Error. DB function failed with error number 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 35 SQL=CREATE TABLE IF NOT EXISTS `z1ck_acajoom_lists` ( `id` int(10) NOT NULL auto_increment, `list_name` varchar(101) NOT NULL default '', `list_desc` text NOT NULL, `list_type` tinyint(2) NOT NULL default '0', `sendername` varchar(64) NOT NULL default '', `senderemail` varchar(64) NOT NULL default '', `bounceadres` varchar(64) NOT NULL default '', `layout` text NOT NULL, `template` int(9) NOT NULL default '0', `subscribemessage` text NOT NULL, `unsubscribemessage` text NOT NULL, `unsubscribesend` tinyint(1) NOT NULL default '1', `auto_add` tinyint(1) NOT NULL default '0', `user_choose` tinyin