Page MenuHomeIn-Portal Phabricator

D260.diff
No OneTemporary

File Metadata

Created
Mon, Jan 6, 8:20 AM

D260.diff

Index: core/admin_templates/categories/categories_edit.tpl
===================================================================
--- core/admin_templates/categories/categories_edit.tpl
+++ core/admin_templates/categories/categories_edit.tpl
@@ -187,6 +187,7 @@
<inp2:m_RenderElement name="inp_edit_date_time" prefix="c" field="CreatedOn" title="la_fld_CreatedOn"/>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="c" field="MetaKeywords" title="la_fld_MetaKeywords" control_options="{min_height: 50}" rows="3" cols="70"/>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="c" field="MetaDescription" title="la_fld_MetaDescription" control_options="{min_height: 50}" rows="4" cols="70"/>
+ <inp2:m_RenderElement name="inp_edit_checkboxes" prefix="c" field="MetaRobotsExclusions" title="la_fld_MetaRobotsExclusions"/>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="c" field="IndexTools" title="la_fld_TrackingCode" control_options="{min_height: 50}"/>
<inp2:m_RenderElement name="subsection" prefix="c" fields="EnablePageCache,OverridePageCacheKey,PageCacheKey,PageExpiration" title="la_section_PageCaching"/>
Index: core/install/install_schema.sql
===================================================================
--- core/install/install_schema.sql
+++ core/install/install_schema.sql
@@ -597,6 +597,7 @@
PromoBlockGroupId int(10) unsigned NOT NULL DEFAULT '0',
RequireSSL tinyint(4) NOT NULL DEFAULT '0',
RequireLogin tinyint(4) NOT NULL DEFAULT '0',
+ MetaRobotsExclusions varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (CategoryId),
UNIQUE KEY ResourceId (ResourceId),
KEY ParentId (ParentId),
Index: core/install/upgrades.sql
===================================================================
--- core/install/upgrades.sql
+++ core/install/upgrades.sql
@@ -3048,3 +3048,5 @@
ADD INDEX (`Status`);
INSERT INTO SystemSettings VALUES(DEFAULT, 'SessionLogRotationInterval', '2629800', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsLogs', 'la_config_SessionLogRotationInterval', 'select', '', '86400=la_opt_OneDay||604800=la_opt_OneWeek||1209600=la_opt_TwoWeeks||2629800=la_opt_OneMonth||7889400=la_opt_ThreeMonths||31557600=la_opt_OneYear||63115200=la_opt_TwoYears||94672800=la_opt_ThreeYears||157788000=la_opt_FiveYears||-1=la_opt_EmailLogKeepForever', 65.05, 0, 1, NULL);
+
+ALTER TABLE Categories ADD MetaRobotsExclusions VARCHAR(255) NOT NULL NOT NULL DEFAULT '';
\ No newline at end of file
Index: core/units/categories/categories_config.php
===================================================================
--- core/units/categories/categories_config.php
+++ core/units/categories/categories_config.php
@@ -428,6 +428,11 @@
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
+ 'MetaRobotsExclusions' => array(
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options' => array('nofollow' => 'NoFollow', 'noindex' => 'NoIndex', 'noarchive' => 'NoArchive', 'noimageindex' => 'NoImageIndex', 'noodp' => 'NoOdp', 'nosnippet' => 'NoSnippet'),
+ 'default' => '',
+ ),
),
'VirtualFields' => Array (
Index: core/units/categories/categories_tag_processor.php
===================================================================
--- core/units/categories/categories_tag_processor.php
+++ core/units/categories/categories_tag_processor.php
@@ -1391,6 +1391,11 @@
$cat_field = 'Description';
break;
+ case 'meta_robotsexclusions':
+ $val = $page->GetDbField('MetaRobotsExclusions');
+
+ return str_replace('|', ', ', trim($val, '|'));
+
case 'tracking':
case 'index_tools':
if (!EDITING_MODE) {
Index: core/units/structure/structure_config.php
===================================================================
--- core/units/structure/structure_config.php
+++ core/units/structure/structure_config.php
@@ -215,7 +215,13 @@
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1
),
- 'DirectLinkAuthKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => '')
+ 'DirectLinkAuthKey' => array('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => ''),
+ 'MetaRobotsExclusions' => array(
+ 'type' => 'string',
+ 'formatter' => 'kOptionsFormatter', 'options' => array('nofollow' => 'NoFollow', 'noindex' => 'NoIndex', 'noarchive' => 'NoArchive', 'noimageindex' => 'NoImageIndex', 'noodp' => 'NoOdp', 'nosnippet' => 'NoSnippet'),
+ 'default' => '',
+ ),
+
),
'VirtualFields' => Array (
Index: themes/default/elements/html_head.elm.tpl
===================================================================
--- themes/default/elements/html_head.elm.tpl
+++ themes/default/elements/html_head.elm.tpl
@@ -8,6 +8,9 @@
<inp2:m_else/>
<meta name="Description" content="<inp2:m_GetConfig name='Category_MetaDesc'/>"/>
</inp2:m_if>
+<inp2:m_if check="st_PageInfo" type="meta_robotsexclusions">
+ <meta name="robots" content="<inp2:st_PageInfo type='meta_robotsexclusions' />"/>
+</inp2:m_if>
<meta name="author" content="<inp2:m_GetConfig name='Site_Name' html_escape='1'/>"/>
<meta http-equiv="content-type" content="text/html; charset=<inp2:m_GetConst name='CHARSET'/>" />

Event Timeline