Get core settings value in social engine Engine_Api::_()->getApi(‘settings’, ‘core’)->getFlatSetting(‘core_general.uniistatsmail’, array(”));
Author: smarttips
jQuery email validate function
jQuery email validate function function validEmail(emailText){ var pattern = /^([w-.]+@([w-]+.)+[w-]{2,4})?$/; if (pattern.test(emailText)) { return true; } else { return false; } }
Socialengine/zend simple Update Query
Update query using Socialengine or zendframework. Engine_Db_Table::getDefaultAdapter()->update(‘engine4_activity_actions’, array(‘like_count’=>sizeof($oLikes)) , array(‘action_id = ?’=>$iId) );
Fancybox intilialization and content loading from a URL
<script type=”text/javascript”> jQuery(‘document’).ready(function() { jQuery(‘#delete’).click(function(e) { e.preventDefault(); var selected_ids = new Array(); jQuery(“input:checkbox:checked”).each(function(){ selected_ids.push(jQuery(this).val()); }); if (selected_ids.length > 0){ var oDeleteUrl = ‘<?php echo $this->baseUrl();?>/messages/delete/message_ids/’+selected_ids+’/place/inbox’; jQuery(“#delete”).fancybox({ ‘type’: ‘ajax’, ‘href’ : oDeleteUrl }); } }); }); </script>