Latest news
Home » SocialEngine » SocialEngine question and answers

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 = Engine_Api::_()->getDbtable(‘model name’, ‘module name’);
$select = $table->select()->where(“<conditon>=?”, value);
$result = $table->fetchAll($select);

Image Resizing in socialengine

// Resize image (main)
    $mainPath = $path . DIRECTORY_SEPARATOR . $base .'_m.'. $extension;
    $image = Engine_Image::factory();
    $image->open($file)
      ->resize(1024,1024)
      ->write($mainPath)
      ->destroy();

    // Resize image (normal)
    $normalPath = $path . DIRECTORY_SEPARATOR . $base .'_in.'. $extension;
    $image = Engine_Image::factory();
    $image->open($file)
          ->resize(300,300)
      ->write($normalPath)
      ->destroy();
  

Leave a Reply

x

Check Also

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() && ...