$viewer = Engine_Api::_()->user()->getViewer(); $iCurUser = $viewer->getIdentity(); $oSelect = $this->getAdapter()->select() ->from(‘engine4_job_usersapplied’, array(‘job_id’, ‘COUNT(job_id) as applied_count’)) ->group(‘job_id’) ->where(‘job_user = ?’, $iCurUser); $result = $this->getAdapter()->fetchAll($oSelect);
Category: SocialEngine
SocialEngine tutorials, SocialEngine tips,SocialEngine plugins,SocialEngine modules
SocialEngine question and answers
Where is database config file in socialengine ? applications/settings/database.php Where is the general settings file in socialengine? applications/settings/general.php – maintenance code and site mode (development or production) Where is cache path settings? applications/settings/cache.php How to get Base url in socialengine? echo $this->getView()->baseUrl(); or echo $this–>baseUrl(); How to build a mysql query in social engine? $table =…
php zendframework truncate a string function
The programmers can use this <h4>truncate function in php zend framework</h4> to limit the string length <?php echo $mysmartcode = $this->string()->truncate(‘ i love u’, 5); ?>
Recommendation widget for socialengine
Recommendation widget for socialengine using their own code The basic knowledge of socialengine is required for installing this stuff. first need to inform that, this widget is not developed in a professional manner. steps: 1.Take the user module path: application->modules->user 2.Then reach the widgets folder in user module and create widget files a.controller file b.tpl…
Send emails in socialengine
Steps for send e-mails in socialengine: 1.Add the mailtemplate to socialengine database Eg: INSERT INTO `engine4_core_mailtemplates` (`mailtemplate_id`, `type`, `module`, `vars`) VALUES (NULL, ‘event_deleted’, ‘event’, ‘[eventname],[host],[email]’); Default socialengine sendsystem to send mails PHP zend socialengine code: $aEmailTo=array(); $db = $event->getTable()->getAdapter(); $db->beginTransaction(); $select = $event->membership()->getMembersObjectSelect(); $aMembers = $db->fetchAll($select); foreach($aMembers as $aMember) { $aEmailTo[] = $aMember[’email’]; } //event…