Posted in April 2013

jquery plugin to prevent double submission of button

// jQuery plugin to prevent double submission of forms jQuery.fn.preventDoubleSubmission = function() { $(this).bind(‘submit’,function(e){ var $form = $(this); if ($‘submitted’) === true) { // Previously submitted – don’t submit again e.preventDefault(); } else { // Mark it so that the next submit can be ignored $‘submitted’, true); } }); // Keep chainability return this; }; … Continue reading

chain of stuff

web_store->apps/store/modules/default ->apps/store/modules/deal->forward([module],[action])>indexGridSuccess.php defines several slots()->component(deal, homeGrid)->_homeGrid.php can be a deal or a place. ->goBackendBasePluginDeal. -> components.php -> executeHomeGrid(). Product can be a Deal or a Place

Goal this week

Write down the features to add for my website. Look for hosting. Play with plugin architecture. Write down the DB relationship. Go swimming on Tuesday, Thursday.

God s place

Need to be with God and Christian people. Tonight i felt so encouraged going to church. Came back feeling really relaxed and ready to face Monday. My mind changed. From worry and upset to positive and relaxed. It’s so good to be in the house of God.


One can override the myUser class in the frontend/lib directory. One can put new functions like getViewedHistory(), setViewedHistory() there. To get a table info, use DoctrineCore::getTable() Once get the table, use ->createQuery() Basics of getting history – getAttribute(), setAttribute(). In the template use $sf_user-> to call the methods. in apps/backend/config/security.yml, default: is_secure change to true. … Continue reading

Dev diary

Went to work usual time. But am quite exhausted so finds it hard to focus. Took a few minutes to gather my thoughts and get started. Found the place where John described- but not sure how and where to do this? Finds it hard to think because am unfamiliar. Started writing anyway. Also figured out … Continue reading

Symfony partial

Include partial in the same module, can skip module name. Because it can be included by other modules, partials requires all params to pass to it.


Component- for example, having a news component that depends on user preferences which can be included in several pages. Action.class.php—- component.class.php SfAction- sfComponent ExecuteMyAction- executeMyXxx MyActionSuccess.php- _myxxx.php

Symfony view more

Helpers. If you override a helper file make sure you override all as there is no inheritance. Symfony uses the decorator pattern to form the page. Layout.php has a sf_data to hold the template data. To include code fragments, use partial to include simple HTML, component to include some logic, and slot to replace stuff … Continue reading