Jump to content

Quick 30 min. job - willing to pay


....

Recommended Posts

Hello all,

 

On Jreviews 2.6. I am in the need of a piece of code for the jomsocial.php activity stream integration, i can't get it to work. I will sent you your desired fee through Paypal for submitting the right answer.

 

Basicly i want the Jomsocial activity stream to fire at all circumstances EXCEPT when the frontend user is posting from inside a particular "listing_type_id" with ID 7

 

(The $listing_type_id is available on the listingpage when i run a "<? echo prx($listing);?>" => listing_type_id is set to 8)

 

When i set the following in the file:

public_html/components/com_jreviews/jreviews/cms_compat/jomsocial.php

 

switch($model->name)

{

  case 'Reviews':

        return;

        $this->_plgListingAfterSave($model);

        break; 

 

  case 'Listing':

        $this->_plgListingAfterSave($model);

        break;

}

 

Then no Review activity is added into the stream. But i want only one listing_type to be ignored. So i tried (with some different string settings):

 

switch($model->name)
{
  case 'Reviews':
if ($Listing->listing_type_id == 8) {
       return;
} else {
        $this->_plgListingAfterSave($model);
}
    break;

  case 'Listing':
         $this->_plgListingAfterSave($model);
         break;
}

 

All cases the above example does not add the activity into Jomsocial, even not when posting from a listing_type_id is different (let's say '7' )

Somebody any clue how to set this variable here?

 

Thanks

Link to comment
×
×
  • Create New...