';
$html .= ($isBeta) ? ' ' : '';
return $html;
}
public static function backendUpdateWarning() {
$minSubVersion = self::getParamFromXMLFile('vfsubminversion', JPATH_ADMINISTRATOR . '/manifests/packages/pkg_vfbase.xml');
$subVersion = AefHelper::getVersion();
return (!empty($subVersion) && !empty($minSubVersion) && (version_compare($subVersion, $minSubVersion, 'lt'))) ? '' . $customtext. '
';
}
}
if (self::customTextBottom == $position) {
if (($field->customtext != '') && (((isset($field->customtextposition)) && ($field->customtextposition == 2)) || !(isset($field->customtextposition)))) {
PluginHelper::importPlugin('content');
$customtext = HTMLHelper::_('content.prepare', $field->customtext);
return '' . $customtext. '
';
}
}
}
public static function fixLinksInMail($text) {
$urlPattern = '/^(http|https|ftp|mailto|tel)\:.*$/i';
$aPattern = '/<[ ]*a[^>]+href=[("\')]([^("\')]*)/';
$imgPattern = '/<[ ]*img[^>]+src=[("\')]([^("\')]*)/';
if (preg_match_all($aPattern, $text, $hrefs)) {
$unique_urls = array_unique($hrefs[1]);
foreach ($unique_urls as $href) {
if (empty($href)) {
continue;
}
if (!(preg_match($urlPattern, $href) == 1)) {
//we deal with an intern Url without Root path
$link = Uri::base() . $href;
$newText = preg_replace('\'' . preg_quote($href) . '\'', $link, $text);
$text = $newText;
}
}
}
if (preg_match_all($imgPattern, $text, $srcs)) {
$unique_image = array_unique($srcs[1]);
foreach ($unique_image as $src) {
if (file_exists($src)) {
//we deal with a local img
if (!(preg_match('\'' . preg_quote(Uri::base()) . '\'', $src) == 1)) {
//we deal with an intern Url without base Uri
$link = Uri::base() . $src;
$newText = preg_replace('\'' . preg_quote($src) . '\'', $link, $text);
$text = $newText;
}
}
}
}
return $text;
}
// ToDo parameter $tip, jsFunction no longer needed
// this is a copy of HTMLHelper::_(gird.sort...
// necessary to use our own function because we cannot change the icon prefix in Joomla! grid.sort function into visicon
// and to allow multiple sort forms on one page (since Visforms 3.7.1)
public static function sort($title, $order, $direction = 'asc', $selected = '', $task = null, $new_direction = 'asc', $tip = '', $context = 'adminForm', $unSortable = false) {
$title = Text::_($title);
if (!empty($unSortable)) {
return Text::_($title);
}
$wa = Factory::getApplication()->getDocument()->getWebAssetManager();
$wa->useScript('com_visforms.visformsdata');
$helpText = htmlspecialchars(Text::_('JGLOBAL_CLICK_TO_SORT_THIS_COLUMN') . ': ' . $title, ENT_COMPAT);
HTMLHelper::_('bootstrap.tooltip');
$direction = strtolower($direction);
$icon = array('arrow-up-3', 'arrow-down-3');
$index = (int) ($direction == 'desc');
if ($order != $selected) {
$direction = $new_direction;
}
else {
$direction = ($direction == 'desc') ? 'asc' : 'desc';
}
$html = array();
$html[] = '