Пример #1
1
 /**
  * Prepare the comments object for the photo item
  *
  * @since	1.2
  * @access	public
  * @param	string
  * @return
  */
 public function comments()
 {
     // Get the verb to use.
     $verb = $this->getPhotoVerb();
     // The context should always be photos
     $context = SOCIAL_TYPE_PHOTO;
     // The object id should always be the photo id
     $id = $this->data->id;
     $streamId = $this->getPhotoStreamId($id, $verb, false);
     if ($verb == 'upload') {
         // we now this photo is uploaded via stream's story form.
         $model = FD::model('Stream');
         $aggregated = $model->isAggregated($this->data->id, 'photos');
         if ($aggregated) {
             $streamId = '0';
         }
     }
     // Get the permalink to the photo
     $permalink = $this->data->getPermalink(false, true);
     return FD::comments($id, $context, $verb, $this->type, array('url' => $permalink), $streamId);
 }
Пример #2
0
 /**
  * Prepare the comments object for the photo item
  *
  * @since	1.2
  * @access	public
  * @param	string
  * @return
  */
 public function comments()
 {
     // Get the verb to use.
     $verb = $this->getPhotoVerb();
     // The context should always be photos
     $context = SOCIAL_TYPE_PHOTO;
     // The object id should always be the photo id
     $id = $this->data->id;
     // stream id
     $streamId = $this->getPhotoStreamId($id, $verb, false);
     // Get the permalink to the photo
     $permalink = $this->data->getPermalink(false, true);
     return FD::comments($id, $context, $verb, $this->type, array('url' => $permalink), $streamId);
 }