UPDATES EasyBlog 6.0.14 Released! Joomla 5.x and PHP 8.x compatible now!

Helpdesk

Your Time
Our Time
Response Time
24 — 48 hours
We strive to provide the fastest ever response possible. However, we are not super beings.

Allow at least 24 — 48 hours
  Support is offline
It is currently off working hours and most of us aren't around

Rest assured that we will get back to you as soon as the day starts tomorrow!
  Support is offline

Override AdvancedSearch Class file

Peer Nilsson · ·
7:04 PM Tuesday, 08 June 2021
None
Hi together,

we tried several things to override the easysocial Class for the advanced search but nothing succedded.

Please have a look to this example: https://gist.github.com/dongilbert/3237387

Finally we created a plugin with this content:

<?php

// no direct access
defined('_JEXEC') or die;

jimport('joomla.filesystem.file');


if (!JFile::exists($file)) {
return;
}

class PlgSystemAspSocialAdvancedSearch extends JPlugin
{

public function __construct(&$subject, $config)
{
parent::__construct($subject, $config);

$app = JFactory::getApplication();

JLoader::register('EasySocial/SocialAdvancedSearch', JPATH_ROOT.'/plugins/system/aspsocialadvancedsearch/advancedsearch.php', true);

}

}



In the file advancedsearch.php we copied the content from /administrator/components/com_easysocial/includs/advancedsearch/advancedsearch.php

The main goal is to modify some things in the advancedsearch, especially the results of the search, because the search didn`t connect pages over the related pages field. And also to add a new type of option into the advanced search. We`ve found a workaround in the template but it isn`t the best way so far.
Could you please give us a tip what is wrong. We need to override functions for results and also override whole classes of easysocial to get our work done (We do NOT need Template Overrides!)

Thanks in advance
The replies under this section are restricted to logged in users or users with an active subscription with us