diff options
Diffstat (limited to 'resources/views/modules')
10 files changed, 123 insertions, 0 deletions
diff --git a/resources/views/modules/bing-webmaster-tools/form.phtml b/resources/views/modules/bing-webmaster-tools/form.phtml new file mode 100644 index 0000000000..8b41a3eb91 --- /dev/null +++ b/resources/views/modules/bing-webmaster-tools/form.phtml @@ -0,0 +1,15 @@ +<?php use Fisharebest\Webtrees\I18N; ?> + +<div class="row form-group"> + <label for="BING_WEBMASTER_ID" class="col-sm-3 col-form-label"> + <?= I18N::translate('Site verification code') ?> + </label> + + <div class="col-sm-9"> + <input type="text" class="form-control" id="BING_WEBMASTER_ID" name="BING_WEBMASTER_ID" value="<?= e($BING_WEBMASTER_ID ?? '') ?>" maxlength="255" pattern="[0-9a-zA-Z+=/_:.!-]*"> + </div> +</div> + +<p> + <?= I18N::translate('Site verification codes do not work when webtrees is installed in a subfolder.') ?> +</p> diff --git a/resources/views/modules/bing-webmaster-tools/snippet.phtml b/resources/views/modules/bing-webmaster-tools/snippet.phtml new file mode 100644 index 0000000000..f78fb17c81 --- /dev/null +++ b/resources/views/modules/bing-webmaster-tools/snippet.phtml @@ -0,0 +1 @@ +<meta name="msvalidate.01" content="<?= e($BING_WEBMASTER_ID ?? '') ?>"> diff --git a/resources/views/modules/google-analytics/form.phtml b/resources/views/modules/google-analytics/form.phtml new file mode 100644 index 0000000000..a441cfcd31 --- /dev/null +++ b/resources/views/modules/google-analytics/form.phtml @@ -0,0 +1,15 @@ +<?php use Fisharebest\Webtrees\I18N; ?> + +<div class="row form-group"> + <label for="GOOGLE_ANALYTICS_ID" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Site identification code') ?> + <span class="sr-only">Google Analytics</span> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="GOOGLE_ANALYTICS_ID" name="GOOGLE_ANALYTICS_ID" value="<?= e($GOOGLE_ANALYTICS_ID ?? '') ?>" placeholder="UA-12345-6" maxlength="255" pattern="UA-[0-9]+-[0-9]+"> + </div> +</div> + +<p> + <?= I18N::translate('Tracking and analytics are not added to the control panel.') ?> +</p> diff --git a/resources/views/modules/google-analytics/snippet.phtml b/resources/views/modules/google-analytics/snippet.phtml new file mode 100644 index 0000000000..e55b77b528 --- /dev/null +++ b/resources/views/modules/google-analytics/snippet.phtml @@ -0,0 +1,7 @@ +<script async src="https://www.google-analytics.com/analytics.js"></script> +<script> + window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)}; + ga.l=+new Date; + ga("create", "<?= e($GOOGLE_ANALYTICS_ID ?? '') ?>", "auto"); + ga("send", "pageview", <?= json_encode($dimensions) ?>); +</script> diff --git a/resources/views/modules/google-webmaster-tools/form.phtml b/resources/views/modules/google-webmaster-tools/form.phtml new file mode 100644 index 0000000000..ba9baa8cca --- /dev/null +++ b/resources/views/modules/google-webmaster-tools/form.phtml @@ -0,0 +1,15 @@ +<?php use Fisharebest\Webtrees\I18N; ?> + +<div class="row form-group"> + <label for="GOOGLE_WEBMASTER_ID" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Site verification code') ?> + <span class="sr-only">Google Webmaster Tools</span> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="GOOGLE_WEBMASTER_ID" name="GOOGLE_WEBMASTER_ID" value="<?= e($GOOGLE_WEBMASTER_ID ?? '') ?>" maxlength="255" pattern="[0-9a-zA-Z+=/_:.!-]*"> + </div> +</div> + +<p> + <?= I18N::translate('Site verification codes do not work when webtrees is installed in a subfolder.') ?> +</p> diff --git a/resources/views/modules/google-webmaster-tools/snippet.phtml b/resources/views/modules/google-webmaster-tools/snippet.phtml new file mode 100644 index 0000000000..8728d9ada4 --- /dev/null +++ b/resources/views/modules/google-webmaster-tools/snippet.phtml @@ -0,0 +1 @@ +<meta name="google-site-verification" content="<?= e($GOOGLE_WEBMASTER_ID ?? '') ?>"> diff --git a/resources/views/modules/matomo-analytics/form.phtml b/resources/views/modules/matomo-analytics/form.phtml new file mode 100644 index 0000000000..8fce201551 --- /dev/null +++ b/resources/views/modules/matomo-analytics/form.phtml @@ -0,0 +1,24 @@ +<?php use Fisharebest\Webtrees\I18N; ?> + +<div class="row form-group"> + <label for="PIWIK_SITE_ID" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Site identification code') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="PIWIK_SITE_ID" name="PIWIK_SITE_ID" value="<?= e($PIWIK_SITE_ID ?? '') ?>" maxlength="255" pattern="[0-9]+"> + </div> +</div> + +<!-- PIWIK_URL --> +<div class="row form-group"> + <label for="PIWIK_URL" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('URL') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="PIWIK_URL" name="PIWIK_URL" value="<?= e($PIWIK_URL ?? '') ?>" placeholder="//example.com/piwik/" maxlength="255"> + </div> +</div> + +<p> + <?= I18N::translate('Tracking and analytics are not added to the control panel.') ?> +</p> diff --git a/resources/views/modules/matomo-analytics/snippet.phtml b/resources/views/modules/matomo-analytics/snippet.phtml new file mode 100644 index 0000000000..c81a17f402 --- /dev/null +++ b/resources/views/modules/matomo-analytics/snippet.phtml @@ -0,0 +1,12 @@ +<script type="text/javascript"> + var _paq = window._paq || []; + _paq.push(['trackPageView']); + _paq.push(['enableLinkTracking']); + (function() { + var u=<?= json_encode($PIWIK_URL ?? '') ?>; + _paq.push(['setTrackerUrl', u+'piwik.php']); + _paq.push(['setSiteId', <?= json_encode($PIWIK_SITE_ID ?? '') ?>]); + var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; + g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s); + })(); +</script> diff --git a/resources/views/modules/statcounter/form.phtml b/resources/views/modules/statcounter/form.phtml new file mode 100644 index 0000000000..3a64308348 --- /dev/null +++ b/resources/views/modules/statcounter/form.phtml @@ -0,0 +1,24 @@ +<?php use Fisharebest\Webtrees\I18N; ?> + +<div class="row form-group"> + <label for="STATCOUNTER_PROJECT_ID" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Site identification code') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="STATCOUNTER_PROJECT_ID" name="STATCOUNTER_PROJECT_ID" value="<?= e($STATCOUNTER_PROJECT_ID ?? '') ?>" maxlength="255" pattern="[0-9]+"> + </div> +</div> + +<!-- STATCOUNTER_SECURITY_ID --> +<div class="row form-group"> + <label for="STATCOUNTER_SECURITY_ID" class="col-sm-3 col-form-label"> + <?= /* I18N: A configuration setting */ I18N::translate('Security code') ?> + </label> + <div class="col-sm-9"> + <input type="text" class="form-control" id="STATCOUNTER_SECURITY_ID" name="STATCOUNTER_SECURITY_ID" value="<?= e($STATCOUNTER_SECURITY_ID ?? '') ?>" maxlength="255" pattern="[0-9a-zA-Z]+"> + </div> +</div> + +<p> + <?= I18N::translate('Tracking and analytics are not added to the control panel.') ?> +</p> diff --git a/resources/views/modules/statcounter/snippet.phtml b/resources/views/modules/statcounter/snippet.phtml new file mode 100644 index 0000000000..13dfa49009 --- /dev/null +++ b/resources/views/modules/statcounter/snippet.phtml @@ -0,0 +1,9 @@ +<script> + var sc_project=<?= json_encode((int) ($STATCOUNTER_PROJECT_ID ?? '')) ?>; + var sc_invisible=1; + var sc_security=<?= json_encode($STATCOUNTER_SECURITY_ID ?? '') ?>; + var sc_https=1; + var scJsHost = (("https:" == document.location.protocol) ? "https://secure." : "http://www."); + document.write("<sc"+"ript type='text/javascript' async src='" + scJsHost + "statcounter.com/counter/counter_xhtml.js'></"+"script>"); +</script> + |
