diff --git a/e107_admin/cpage.php b/e107_admin/cpage.php index 5ad20a376..ab4daf2a6 100644 --- a/e107_admin/cpage.php +++ b/e107_admin/cpage.php @@ -599,7 +599,7 @@ class page_admin_ui extends e_admin_ui 'page_comment_flag' => array('title'=> LAN_COMMENTS, 'tab' => 1, 'type' => 'boolean', 'data'=>'int', 'width' => '5%', 'thclass' => 'center', 'class' => 'center' ), 'page_password' => array('title'=> LAN_PASSWORD, 'tab' => 1, 'type' => 'text', 'data'=>'str', 'width' => 'auto', 'writeParms'=>array('password'=>1, 'nomask'=>1, 'size' => 40, 'class' => 'tbox e-password', 'generate' => 1, 'strength' => 1, 'required'=>0)), 'page_sef' => array('title'=> LAN_SEFURL, 'tab' => 1, 'type' => 'text', 'batch'=>true, 'data'=>'str', 'inline'=>true, 'width' => 'auto', 'writeParms'=>'size=xxlarge&sef=page_title'), - 'page_metakeys' => array('title'=> LAN_KEYWORDS, 'tab' => 1, 'type' => 'tags', 'data'=>'str', 'width' => 'auto'), + 'page_metakeys' => array('title'=> LAN_KEYWORDS, 'tab' => 1, 'type' => 'tags', 'data'=>'str', 'width' => 'auto', 'inline'=>true), 'page_metadscr' => array('title'=> CUSLAN_11, 'tab' => 1, 'type' => 'textarea', 'data'=>'str', 'help'=>CUSLAN_82, 'width' => 'auto', 'writeParms'=>array('size'=>'xxlarge', 'rows'=>2, 'maxlength'=>155)), 'page_metaimage' => array('title'=> CUSLAN_81, 'nolist'=>false, 'tab' => 1, 'type' => 'image', 'help'=> CUSLAN_82, 'width' => '110px', 'thclass' => 'center', 'class' => "center", 'nosort' => false, 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','writeParms'=>'media=page^&video=1', 'readonly'=>false), diff --git a/e107_admin/links.php b/e107_admin/links.php index 96b5149e4..a4671145f 100644 --- a/e107_admin/links.php +++ b/e107_admin/links.php @@ -83,6 +83,8 @@ class links_admin_ui extends e_admin_ui 'link_description' => array('title'=> LAN_DESCRIPTION, 'type' => 'textarea', 'width' => 'auto'), // 'method'=>'tinymce_plugins', ? 'link_order' => array('title'=> LAN_ORDER, 'type' => 'number', 'width' => 'auto', 'nolist'=>false, 'inline' => true), 'link_open' => array('title'=> LCLAN_19, 'type' => 'dropdown', 'inline'=>true, 'width' => 'auto', 'batch'=>true, 'filter'=>true, 'thclass' => 'left first', 'writeParms'=>array('size'=>'xlarge')), + 'link_rel' => array('title'=> LINKLAN_11, 'type' => 'tags', 'inline'=>true, 'width' => 'auto', 'batch'=>false, 'filter'=>false, 'thclass' => 'left', 'help'=>LINKLAN_12, 'writeParms'=>array('placeholder'=>'eg.nofollow,noreferrer','size'=>'xlarge')), + 'link_function' => array('title'=> LCLAN_105, 'type' => 'method', 'data'=>'str', 'width' => 'auto', 'thclass' => 'left first'), 'link_owner' => array('title'=> LCLAN_106, 'type' => 'hidden', 'filter'=>true, 'data'=>'str'), 'options' => array('title'=> LAN_OPTIONS, 'type' => null, 'forced'=>TRUE, 'width' => '10%', 'thclass' => 'center last', 'class'=>'center','readParms'=>'sort=1') // quick workaround diff --git a/e107_core/shortcodes/batch/navigation_shortcodes.php b/e107_core/shortcodes/batch/navigation_shortcodes.php index eb376fb7a..fbe588bd1 100644 --- a/e107_core/shortcodes/batch/navigation_shortcodes.php +++ b/e107_core/shortcodes/batch/navigation_shortcodes.php @@ -151,7 +151,7 @@ require_once(__DIR__.'/navigation_shortcodes_legacy.php'); if(strpos($url, "{") !== false) { - $url = $tp->parseTemplate($url, true); // BC Fix shortcode in URL support - dynamic urls for multilanguage. + $url = $tp->parseTemplate($url); // BC Fix shortcode in URL support - dynamic urls for multilanguage. } return $url; @@ -193,6 +193,7 @@ require_once(__DIR__.'/navigation_shortcodes_legacy.php'); } /** + * Optional link attributes. onclick, rel etc. * @param null $parm * @example {NAV_LINK_OPEN} * @return string @@ -206,12 +207,13 @@ require_once(__DIR__.'/navigation_shortcodes_legacy.php'); ### TODO - JS modal (i.e. bootstrap) $text = ''; + $rel = ''; switch($type) { case 1: $text = ' target="_blank"'; - $text .= (strpos($this->var['link_url'], 'http') !== false) ? ' rel="noopener noreferrer"' : ''; + $rel = (strpos($this->var['link_url'], 'http') !== false) ? 'noopener noreferrer' : ''; break; case 4: @@ -223,10 +225,22 @@ require_once(__DIR__.'/navigation_shortcodes_legacy.php'); break; } + if(!empty($this->var['link_rel'])) + { + $rel = str_replace(',', ' ', $this->var['link_rel']); + } + + if(!empty($rel)) + { + $text .= " rel='".$rel."'"; + } + return $text; } + + /** * Return the link icon of the current link * @example {NAV_LINK_ICON} diff --git a/e107_core/sql/core_sql.php b/e107_core/sql/core_sql.php index cfb483cd3..3699208d7 100755 --- a/e107_core/sql/core_sql.php +++ b/e107_core/sql/core_sql.php @@ -221,6 +221,7 @@ CREATE TABLE links ( link_order int(10) unsigned NOT NULL default '0', link_parent int(10) unsigned NOT NULL default '0', link_open tinyint(1) unsigned NOT NULL default '0', + link_rel varchar(200) NOT NULL default '', link_class varchar(255) NOT NULL default '0', link_function varchar(100) NOT NULL default '', link_sefurl varchar(255) NOT NULL, diff --git a/e107_languages/English/admin/lan_links.php b/e107_languages/English/admin/lan_links.php index 55e78eb68..c7e4d03a3 100644 --- a/e107_languages/English/admin/lan_links.php +++ b/e107_languages/English/admin/lan_links.php @@ -86,6 +86,9 @@ define("LINKLAN_8", "News Categories"); define("LINKLAN_9", "Download Categories"); define("LINKLAN_10", "Theme Shortcodes"); +define("LINKLAN_11", "Relationship"); +define("LINKLAN_12", "Optional 'rel' attribute. Comma separated."); + // define("LINKLAN_10", "Create Sublink"); // define('LINKLAN_11', 'Nothing changed - not updated'); diff --git a/e107_themes/bootstrap3/admin_style.css b/e107_themes/bootstrap3/admin_style.css index c15997a2b..32326ecec 100644 --- a/e107_themes/bootstrap3/admin_style.css +++ b/e107_themes/bootstrap3/admin_style.css @@ -1533,7 +1533,7 @@ li.rssRow > div { color: #ffffff; }*/ -.selectize-input { width: 530px; max-width: 90%; } +.selectize-input { width: 530px; max-width: 100%; } /*