Skip to content

Commit

Permalink
made html page-meta configurable; updates #812
Browse files Browse the repository at this point in the history
  • Loading branch information
following5 committed Aug 31, 2015
1 parent 888e81f commit 8420688
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 18 deletions.
6 changes: 6 additions & 0 deletions htdocs/config2/common-settings.inc.php
Expand Up @@ -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';
Expand Down
6 changes: 3 additions & 3 deletions htdocs/doc/sql/static-data/data.sql
Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down
11 changes: 7 additions & 4 deletions htdocs/lang/de/ocstyle/main.tpl.php
Expand Up @@ -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');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $tpl_subtitle; ?>{title}</title>
<meta name="keywords" content="Geocaching, Geocache, Cache, Geocashing, Schnitzeljagd, Schatzsuche, GPS, Openstreetmap, kostenlos, GPX, GPX download, Koordinaten, Hobby, Natur" />
<meta name="description" content="Opencaching.de ist das freie Portal für Geocaching, ein GPS-Schatzsuche-Spiel: Es werden kleine Behälter versteckt, die anhand von GPS-Koordinaten zu finden sind." />
<title><?php echo $tpl_subtitle; ?></title>
<meta name="keywords" content="<?php echo $meta_keywords; ?>" />
<meta name="description" content="<?php echo $meta_description; ?>" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="{lang}" />
Expand Down
1 change: 0 additions & 1 deletion htdocs/lang/de/ocstyle/varset.inc.php
Expand Up @@ -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);
Expand Down
3 changes: 0 additions & 3 deletions htdocs/lib/settings-dev.inc.php
Expand Up @@ -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'];

Expand Down
3 changes: 0 additions & 3 deletions htdocs/lib/settings-dist.inc.php
Expand Up @@ -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'];

Expand Down
1 change: 1 addition & 0 deletions htdocs/lib2/OcSmarty.class.php
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/templates2/ocstyle/childwp.tpl
Expand Up @@ -9,7 +9,7 @@
<input type="hidden" name="deleteid" value="{$deleteid|escape}" />

<div class="content2-pagetitle">
<img src="resource2/{$opt.template.style}/images/description/20x20-compass.png" style="margin-right: 10px;" alt="{t}Child waypoint{/t}" title="{t}Child waypoint{/t}" />
<img src="resource2/{$opt.template.style}/images/description/20x20-compass.png" style="margin-right: 10px;" alt="" title="{t}Child waypoints{/t}" />
{$pagetitle|escape}
</div>

Expand Down
5 changes: 2 additions & 3 deletions htdocs/templates2/ocstyle/sys_main.tpl
Expand Up @@ -16,9 +16,8 @@
{$opt.template.title|escape} - {$opt.page.subtitle1|escape} {$opt.page.subtitle2|escape}
{/if}
</title>
<meta name="keywords" content="Geocaching, Geocache, Cache, Geocashing, Schnitzeljagd, Schatzsuche, GPS, Openstreetmap, kostenlos, GPX, GPX download, Koordinaten, Hobby, Natur" />
{* siehe http://forum.opencaching-network.org/index.php?topic=3065.0 *}
<meta name="description" content="Opencaching.de ist das freie Portal für Geocaching, ein GPS-Schatzsuche-Spiel. Hierbei müssen anhand von GPS-Koordinaten Behälter oder Objekte gefunden werden." />
<meta name="keywords" content="{$opt.page.meta.keywords|escape}" />
<meta name="description" content="{$opt.page.meta.description|escape}" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="{$opt.template.locale}" />
Expand Down

0 comments on commit 8420688

Please sign in to comment.