Home » SocialEngine


Socialengine video uploading source code

 public function jquerycreateVideo($params, $file, $values)   {     if( $file instanceof Storage_Model_File ) {       $params[‘file_id’] = $file->getIdentity();     } else {        // create video item       $video = Engine_Api::_()->getDbtable(‘videos’, ‘video’)->createRow();       $file_ext = $file[‘extension’];       $video->code = $file_ext;       $video->type = 3;       ...

Read More »

How to change the redirection page after login in socialengine

socialengine is a zendframework based project helps the developers to build their own custom social network website. socialengine following the MVC structure. The login action is in user/controllers/AuthController.php Here we specify the redirection URL return $this->_helper->redirector->gotoRoute(array(“action”  =>  ‘home’) ,  “user_general” ,  true);  change the user router according to your need.

Read More »

Pass custom error message to zend/socialengine form from controller

$this->view->form = $form = new User_Form_Admin_Universities_Createdomain(); $this->view->university_id = $iId = $this->_getParam(‘id’, null); $form->populate(array(‘university_id’=>$iId)); if($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost()) ) { $iExists = $oUniversitydomains->ifExistsDomain(‘domain’, $aData[‘domain’], $aData[‘university_id’]); if($iExists > 0) { $message = ‘Domain Name Already Registered’;              $form->getElement(‘domain’)->addError($message);              return; } }

Read More »

select query cannot join with another table zend framework

$select = $table->select() ->setIntegrityCheck(false) ->from($tableName) ->joinRight($subtableName, ‘`’.$subtableName.’`.`user_id` = `’.$tableName.’`.`user_id`’,array(‘resource_approved’,’user_approved’)) ->where(‘`’.$subtableName.’`.`resource_id` = ?’, $resource->getIdentity()); Give the following sql statement for avoid  “select query cannot join with another table zend framework”  mysql error. setIntegrityCheck(false)  

Read More »

session in socialengine

socialengine basically using zendframework for development. Zendframework methods can see all through the socialengine code. Session is  an important functionality in programming. For achieving the session in socialengine use the following code $session = new Zend_Session_Namespace(‘invite’); $session->invite_code = $this->_getParam(‘code’); $session->invite_email = $this->_getParam(’email’);

Read More »

Pass custom error messages to form in socialengine / zend framework

if( !$form->isValid($this->getRequest()->getPost()) ) { return; } // Process $values = $form->getValues(); if( ($CouponCode = $form->getElement(‘coupon_code’)) && isset($values[‘coupon_code’])) { $iCouponExist = $table->checkCouponExist($values[‘coupon_code’]); if($iCouponExist == 1) { return $CouponCode->addError(‘This Coupon Code is not available, please use another one.’); } }

Read More »