Jump to content
Alejandro

EasySocial - Messages to listing owner within listing detail page

Recommended Posts

The method below no longer works with recent versions of EasySocial. For an improved and updated solution, please refer to the new method using JReviews 3 filters which is provided in the documentation https://docs.jreviews.com/?title=JReviews:Developers_Filters#Add_EasySocial_Message_Button

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Based on a previous post in this forum by Mark @ stackideas all you need to do is add this to your theme file:

<?php
require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php');

$userId = $listing['User']['user_id'];
$document 	= JFactory::getDocument();

if ($document->getType() == 'html') {
      $doc 		= Foundry::document();
      $doc->init();
      $page 		= Foundry::page();
      $page->processScripts();
}
?>
Message Author
 

 

You may even try the same thing in the PHP output format of a banner field like this:

 

require_once(JPATH_ADMINISTRATOR . '/components/com_easysocial/includes/foundry.php');

$userId = $entry['User']['user_id'];
$document 	= JFactory::getDocument();

if ($document->getType() == 'html') {
      $doc 		= Foundry::document();
      $doc->init();
      $page 		= Foundry::page();
      $page->processScripts();
}

return 'Message Author';
 
Edited by Alejandro
Updated with new JReviews 3 filter method

Share this post


Link to post

Yeah... but i need to listings_blogview... can you help me please?

 

Maybe you tried the code in the listings_blogview in the incorrect place. If there is a chance for the code to work there, it must be inside the foreach($listings AS $listing) loop.

 

For example, try to add the code below the custom fields code:

<?php echo $CustomFields->displayAll($listing,'list');?>

Share this post


Link to post

i hv try this added to detail ( see pic)

and result is i see code frontent (see pic 2)

is this whole code or it breaks something

sil2.png

sil.png

Share this post


Link to post

You need PHP tags for PHP code. Otherwise it's processed as text and shown as text.

<?php

//php code here

?>

If the code is outdated, please get in touch with Stackideas so they can provide you with the updated code and you can share it here.

Share this post


Link to post
On 10/4/2018 at 4:49 PM, Alejandro said:

You need PHP tags for PHP code. Otherwise it's processed as text and shown as text.


<?php

//php code here

?>

If the code is outdated, please get in touch with Stackideas so they can provide you with the updated code and you can share it here.

i thought files was outdated but foundry.php is in admin directory ...

now when i add at same area as pic above , i see only blank page

also i try to add after </div> also blank page

Share this post


Link to post
  1. Did you try the code I gave you in your other post from the Filters article in the documentation?
  2. Did you confirm the code is up to date with Stackideas?
  3. Did you add the opening php tag before the "require" line?

To view errors instead of blank pages:

  • Enable "developer" error reporting in Joomla config
  • Enable debug mode in Joomla config
  • Enable debug in JReviews when you are making changes to theme files

Share this post


Link to post
On 7/7/2014 at 3:32 PM, Alejandro said:
5 hours ago, Alejandro said:
  1. Did you try the code I gave you in your other post from the Filters article in the documentation?
  2. Did you confirm the code is up to date with Stackideas?
  3. Did you add the opening php tag before the "require" line?

To view errors instead of blank pages:

  • Enable "developer" error reporting in Joomla config
  • Enable debug mode in Joomla config
  • Enable debug in JReviews when you are making changes to theme files

 

i cant confirm because of expired subscription about 2-3 years so not updated maybe this is the problem ; outdated codes

i used code in Filter article , i used foundry overide in theme ;

i see button Contact... and is clickable but its not working nothing happens , if there is nothing u can do , i will be happy to hear from other users above or others that can succesfully use this methode and wil be happy which version of jreviews and easysocial is working with this

i also have try php output can see button also nothing happens

Share this post


Link to post
On 10/6/2018 at 2:43 PM, Alejandro said:

I updated the filter code in the documentation for this example. I don't know if it will work with your old version of ES, but it definitely works with the latest one. For anything else related to this you need to use EasySocial support.

https://docs.jreviews.com/?title=JReviews:Developers_Filters#Add_EasySocial_Message_Button

2018-10-06_08-41-00.jpeg

 

thank you for your time , this works perfectly

Share this post


Link to post

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Please refer to our Privacy Policy.