core module changes

seojoseph

Member
Most of the plugins we have is just a copy of XF core modules but with some modifications. so if the core module changes or gets deprecated, it needs to be redone.

Do you have any examples of how to override core functionality in a plugin so these XF updates are less of a hassle.
 
Who are the developers of these add-ons?

They should be extending the code correctly to avoid that.
 
It depends on what you are attempting to do. At its most basic form, the class proxy system is required. Other than that, it is dependent on how and what you want to do.
 
Here is one example where we had to hack the XF core. I don't know if there is a better solution.

XenForo_Link::buildPublicLink()

Why: applies full path to link generation from XF

In top of function, find:
Code:
$link = self::_buildLink('public', $type, $data, $extraParams, $prefix);

Append:
Code:
$link = self::_buildLink('public', $type, $data, $extraParams, $prefix);

//added full url prefix to link when inside laravel
if(TKF_FrontController::$usingController === true) {
$link = XenForo_Application::get('options')->boardUrl.'/'.$link;
}
 
Are you using XenForo_Link::buildPublicLink() without having associated PrefixHandlers?
 
Back
Top Bottom