Jump to content
Larry Ullman's Book Forums

nkhanna24

Members
  • Content Count

    14
  • Joined

  • Last visited

Community Reputation

0 Neutral

About nkhanna24

  • Rank
    Newbie
  1. Hey guys I am using imperavi-redactor-widget and i am having problem with toolbar Yii::import('ext.imperavi-redactor-widget.ImperaviRedactorWidget'); $this->widget('ImperaviRedactorWidget', array( // you can either use it for model attribute 'model' => $model, 'attribute' => 'description', // or just for input field 'name' => 'description', // some options, see http://imperavi.com/redactor/docs/ 'options' => array( 'lang' => 'en', //'toolbar' =>'' , 'iframe' => true, 'buttons'=>array( 'formatting', '|', 'bold', 'italic', 'deleted', '|',
  2. i have checked and i am sure(100%) when i call addActivityextend() from controller $this->isNewRecord returns true and $this->addActivity() line works In adActivity() $subscribers = $this->getSubscribers(); this line works(it returns an array) After that i dont know why table does not update??
  3. no,this is not the case $this->isNewRecord is returning true and it calls the function....
  4. hi all i Have a model question.php it has a method public function addActivity() { $subscribers = $this->getSubscribers(); foreach($subscribers as $id) { $n = new Activity(); $n->parentType = Activity::model()->parents['Question']; $n->parentId = $this->id; $n->userId = $id; $n->sourceId = Yii::app()->user->id; $n->activity
  5. earlier facebook login connect was working fine on my php website but when facebook updated its sdk,its not working.. it simply opens facebook. so what changes has to be done to make it work?
  6. yes actually that is the case.......
  7. there is no error as such.....when i click on button,it takes to the facebook page and this is url https://www.facebook.com/dialog/oauth?client_id=112891755455541&redirect_uri=http%3A%2F%2Flocalhost%2Fsite%2Ffblogin&state=0bfbe3f220a29d0a67e20e3d346c3efd&req_perms=email%2Cpublish_stream%2Cmanage_pages&return_url=http%3A%2F%2Flocalhost%2Fsite%2Ffblogin it displays error line ,so dont know what to do??
  8. public function actionFblogin() { $facebook = new Facebook(Yii::app()->params['fb']['config']); //$session = $facebook->getSession(); $user = $facebook->getUser(); $me = null; // Session based API call. if ($user) { $fb_uid = $facebook->getUser(); if (Yii::app()->user->id) { $user = User::model()->find('fb_uid=?', array($fb_uid)); if ($user === NULL) { Yii::app()->user->setState('fb_uid', $fb_uid);
  9. okay....it is a question post if i click button1 actionask() is called and question is posted..... there are diff institutes so if i click on button2 it should post in all institutes.....for which i have made a different action actionaskall() in same . so how do i call 2nd action when 2 button is clicked...?
  10. hi all i have a form and two submit buttons.(submit and submit to all) so i have to call two different actions depending on which button is clicked.two actions are in same controller. how can i achieve that? thanks in advance
  11. thankss....got it what i was looking for
  12. hi all I am having this difficulty with this button <div class="row buttons"> <?= CHtml::submitButton('Submit to all', array('class' => 'button-send-v2', 'value' => '','name'=>'all')); ?> <span class="go-back"> <span class="gray-text"> or </span> <?= CHtml::link('Cancel', $this->createAbsoluteUrl('forum/index'), array('class' => 'go-back')); ?> </span> </div> how do i hide this button depending on the user id(Yii::app()->user->id) or at admin login?
  13. hi all how can you add 2 condition in defaultscope() method in model i have this 'condition' => "question.instituteId = " . Yii::app()->params['institute']['id'], i have to add question.instituteId =1, as well. thanks
  14. Hi I am new in yii framework. I came across this code. $criteria=new CDbCriteria(); if(isset($_GET['tag'])) $criteria->addSearchCondition('question.tags',$_GET['tag']); $param = Yii::app()->request->getParam('param'); $dataProvider=new CActiveDataProvider(Question::model()->recent()->with('user')->with('answers')); $this->render('index',array('dataProvider'=>$dataProvider, 'param'=>$param, 'tags'=>$tags, 'usertype'=>$usertype)); can anyone explain what getparam('param') and $this->render() do? and where this 'param' variable coming from ? tha
×
×
  • Create New...