From 8420688d47406c66cc0ee22d0be332136292c358 Mon Sep 17 00:00:00 2001 From: following Date: Mon, 31 Aug 2015 18:24:33 +0200 Subject: [PATCH] made html page-meta configurable; updates #812 --- htdocs/config2/common-settings.inc.php | 6 ++++++ htdocs/doc/sql/static-data/data.sql | 6 +++--- htdocs/lang/de/ocstyle/main.tpl.php | 11 +++++++---- htdocs/lang/de/ocstyle/varset.inc.php | 1 - htdocs/lib/settings-dev.inc.php | 3 --- htdocs/lib/settings-dist.inc.php | 3 --- htdocs/lib2/OcSmarty.class.php | 1 + htdocs/templates2/ocstyle/childwp.tpl | 2 +- htdocs/templates2/ocstyle/sys_main.tpl | 5 ++--- 9 files changed, 20 insertions(+), 18 deletions(-) diff --git a/htdocs/config2/common-settings.inc.php b/htdocs/config2/common-settings.inc.php index a610c48d2..be329651b 100644 --- a/htdocs/config2/common-settings.inc.php +++ b/htdocs/config2/common-settings.inc.php @@ -8,6 +8,12 @@ * See also locale.inc.php, which is included in both lib1 and lib2. ***************************************************************************/ + // page meta + // see http://forum.opencaching-network.org/index.php?topic=3065.0 + // and http://forum.opencaching-network.org/index.php?topic=3065.0 + $opt['page']['meta']['keywords'] = 'Geocaching, Geocache, Cache, Schatzsuche, GPS, kostenlos, GPX, Koordinaten, Hobby, Natur'; // 5-10 keywords are recommended + $opt['page']['meta']['description'] = 'Opencaching.de ist das freie Portal für Geocaching, ein Schatzsuche-Spiel. Mittels GPS-Koordinaten sind Behälter oder Objekte zu finden.'; + // page title $opt['page']['title'] = 'OPENCACHING'; $opt['page']['subtitle1'] = 'Geocaching with Opencaching'; diff --git a/htdocs/doc/sql/static-data/data.sql b/htdocs/doc/sql/static-data/data.sql index 64152c871..1e60f45ec 100644 --- a/htdocs/doc/sql/static-data/data.sql +++ b/htdocs/doc/sql/static-data/data.sql @@ -2273,7 +2273,7 @@ INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1771', 'Text Do INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1772', 'Text Download (all)', '2011-07-10 18:02:33'); INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1773', 'Text Import', '2011-07-10 18:02:33'); INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1774', 'Text file containing the translations:', '2011-07-10 18:02:33'); -INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1775', 'Child waypoint', '2011-07-10 18:02:37'); +INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1775', 'Child waypoints', '2011-07-10 18:02:37'); INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1776', 'Waypoint type:', '2011-07-10 18:02:37'); INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1777', 'Please select type', '2011-07-10 18:02:37'); INSERT INTO `sys_trans` (`id`, `text`, `last_modified`) VALUES ('1778', 'Coordinate:', '2011-07-10 18:02:37'); @@ -8322,7 +8322,7 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1772', 'EN', 'Text download (all)', '2012-08-24 17:35:49'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1773', 'EN', 'Text import', '2012-08-24 17:35:49'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1774', 'EN', 'Text file containing the translations:', '2012-08-24 17:35:49'); -INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1775', 'EN', 'Child waypoint', '2012-08-24 17:35:49'); +INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1775', 'EN', 'Child waypoints', '2012-08-24 17:35:49'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1776', 'EN', 'Waypoint type:', '2012-08-24 17:35:49'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1777', 'EN', 'Please select type', '2012-08-24 17:35:49'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1778', 'EN', 'Coordinate:', '2012-08-24 17:35:49'); @@ -11580,7 +11580,7 @@ INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUE INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1772', 'FR', 'Télécharger de texte (tous)', '2015-08-25 01:29:00'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1773', 'FR', 'Importation de texte', '2015-08-25 01:29:00'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1774', 'FR', 'fichier de texte contient les traductions\ :', '2015-08-25 01:29:00'); -INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1775', 'FR', 'Child waypoint', '2015-08-25 01:29:00'); +INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1775', 'FR', 'Waypoints supplémentaires', '2015-08-25 01:29:00'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1776', 'FR', 'Type de waypoint\ :', '2015-08-25 01:29:00'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1777', 'FR', 'Sélectionner le type s\'il vous plaît', '2015-08-25 01:29:00'); INSERT INTO `sys_trans_text` (`trans_id`, `lang`, `text`, `last_modified`) VALUES ('1778', 'FR', 'Coordonner\ :', '2015-08-25 01:29:00'); diff --git a/htdocs/lang/de/ocstyle/main.tpl.php b/htdocs/lang/de/ocstyle/main.tpl.php index f8af2eaf9..89a83123a 100644 --- a/htdocs/lang/de/ocstyle/main.tpl.php +++ b/htdocs/lang/de/ocstyle/main.tpl.php @@ -48,14 +48,17 @@ functionsbox available function on this site } if ($tplname != 'start') - $tpl_subtitle .= htmlspecialchars($mnu_selmenuitem['title'] . ' - ', ENT_COMPAT, 'UTF-8'); + $tpl_subtitle .= htmlspecialchars($mnu_selmenuitem['title'], ENT_COMPAT, 'UTF-8'); + $tpl_subtitle .= ' - ' . htmlspecialchars($opt['locale'][$locale]['page']['subtitle1'], ENT_COMPAT, 'UTF-8'); + $meta_keywords = htmlspecialchars($opt['page']['meta']['keywords'], ENT_COMPAT, 'UTF-8'); + $meta_description = htmlspecialchars($opt['page']['meta']['description'], ENT_COMPAT, 'UTF-8'); ?> - <?php echo $tpl_subtitle; ?>{title} - - + <?php echo $tpl_subtitle; ?> + + diff --git a/htdocs/lang/de/ocstyle/varset.inc.php b/htdocs/lang/de/ocstyle/varset.inc.php index 94e8a0853..aea6ed44a 100644 --- a/htdocs/lang/de/ocstyle/varset.inc.php +++ b/htdocs/lang/de/ocstyle/varset.inc.php @@ -17,7 +17,6 @@ //set all main template replacement to default values - tpl_set_var('title', htmlspecialchars($pagetitle, ENT_COMPAT, 'UTF-8')); tpl_set_var('htmlheaders', ''); tpl_set_var('lang', $lang); tpl_set_var('style', $style); diff --git a/htdocs/lib/settings-dev.inc.php b/htdocs/lib/settings-dev.inc.php index 3f844b706..8ab94791e 100644 --- a/htdocs/lib/settings-dev.inc.php +++ b/htdocs/lib/settings-dev.inc.php @@ -33,9 +33,6 @@ // include common settings of lib1 and lib2 require_once($rootpath . 'config2/common-settings.inc.php'); - //pagetitle - $pagetitle = 'local.opencaching.de'; - //id of the node $oc_nodeid = $opt['logic']['node']['id']; diff --git a/htdocs/lib/settings-dist.inc.php b/htdocs/lib/settings-dist.inc.php index f6cf3aa9a..4089cbf10 100644 --- a/htdocs/lib/settings-dist.inc.php +++ b/htdocs/lib/settings-dist.inc.php @@ -31,9 +31,6 @@ // include common settings of lib1 and lib2 require_once($rootpath . 'config2/common-settings.inc.php'); - //pagetitle - if (!isset($pagetitle)) $pagetitle = 'www.opencaching.de'; - //id of the node $oc_nodeid = $opt['logic']['node']['id']; diff --git a/htdocs/lib2/OcSmarty.class.php b/htdocs/lib2/OcSmarty.class.php index 724efa8d5..b5e32cf4b 100644 --- a/htdocs/lib2/OcSmarty.class.php +++ b/htdocs/lib2/OcSmarty.class.php @@ -178,6 +178,7 @@ function display($dummy1=null, $dummy2=null, $dummy3=null) $optn['page']['showsocialmedia'] = $opt['page']['showsocialmedia']; $optn['page']['main_country'] = $opt['page']['main_country']; $optn['page']['main_locale'] = $opt['page']['main_locale']; + $optn['page']['meta'] = $opt['page']['meta']; $optn['template']['title'] = $this->title; $optn['template']['caching'] = $this->caching; $optn['template']['popup'] = $this->popup; diff --git a/htdocs/templates2/ocstyle/childwp.tpl b/htdocs/templates2/ocstyle/childwp.tpl index deea8978c..445d20c56 100644 --- a/htdocs/templates2/ocstyle/childwp.tpl +++ b/htdocs/templates2/ocstyle/childwp.tpl @@ -9,7 +9,7 @@
- {t}Child waypoint{/t} + {$pagetitle|escape}
diff --git a/htdocs/templates2/ocstyle/sys_main.tpl b/htdocs/templates2/ocstyle/sys_main.tpl index 5b3e4d95a..feb89c911 100644 --- a/htdocs/templates2/ocstyle/sys_main.tpl +++ b/htdocs/templates2/ocstyle/sys_main.tpl @@ -16,9 +16,8 @@ {$opt.template.title|escape} - {$opt.page.subtitle1|escape} {$opt.page.subtitle2|escape} {/if} - - {* siehe http://forum.opencaching-network.org/index.php?topic=3065.0 *} - + +