Difference between revisions of "Website Header"
From apertus wiki
(16 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=About= | =About= | ||
The Apertus Website Header is a toolbar on top of all Apertus websites to make navigating between different systems /CMSs easier. | The Apertus Website Header is a toolbar on top of all Apertus websites to make navigating between different systems/CMSs easier. | ||
It comes in bright or dark design and always uses the inverted design of the current website. | |||
=Notes= | =Notes= | ||
The header is an iframe with 42 pixels height that has to be added to the theme of each respective website/cms. | The header is an iframe with 42 pixels height that has to be added to the theme of each respective website/cms. | ||
==Mediawiki== | ==Mediawiki== | ||
File: | <nowiki> | ||
File: /skins/Vector.php | |||
line 124 after $this->html( 'headelement' ); ?> | line 124 after $this->html( 'headelement' ); ?> | ||
<!--apertus header start--> | <!--apertus header start--> | ||
<iframe width="100%" scrolling="no" height="42" src="http://www.apertus.org/header?page=wiki" frameborder="0"></iframe> | <iframe width="100%" scrolling="no" height="42" src="http://www.apertus.org/header?page=wiki" frameborder="0"></iframe> | ||
<div style="position:relative;"> | <div style="position:relative;"> | ||
<!--apertus header end-- | <!--apertus header end--> | ||
line 247 after <?php $this->printTrail(); ?> | |||
<!--apertus header start--> | <!--apertus header start--> | ||
</div> | </div> | ||
<!--apertus header end--></nowiki> | <!--apertus header end--> | ||
</nowiki> | |||
==Drupal6== | ==Drupal6== | ||
<nowiki> | |||
File: /sites/all/themes/zen/zen/page.tpl.php | |||
line 103 after <body class="<?php print $body_classes; ?>"> | |||
<!--apertus header start--> | |||
<iframe width="100%" scrolling="no" height="42" src="http://www.apertus.org/header?page=website" frameborder="0"></iframe> | |||
<!--apertus header end--> | |||
</nowiki> | |||
==Drupal7== | ==Drupal7== | ||
Copy File: /sites/all/themes/zen/zen/html.tpl.php to own theme | |||
<nowiki> | |||
edit line 101 after <body class="<?php print $classes; ?>" <?php print $attributes;?>> | |||
<!--apertus header start--> | |||
<iframe width="100%" scrolling="no" height="42" src="http://www.apertus.org/header?page=website" frameborder="0"></iframe> | |||
<!--apertus header end--> | |||
</nowiki> | |||
==Wordpress== | ==Wordpress== | ||
<nowiki> | |||
File: /wp-content/themes/twentyeleven/header.php | |||
line 70 after </head> | |||
<!--apertus header start--> | |||
<iframe width="100%" scrolling="no" height="42" src="http://www.apertus.org/header?page=lsmblog" frameborder="0"></iframe> | |||
<!--apertus header end--> | |||
also needed to change themes CSS to | |||
body { | |||
padding:0; | |||
} | |||
</nowiki> | |||
==phpbb== | ==phpbb== | ||
<nowiki> | |||
File: /styles/apertus/template/overall_header.html | |||
line 43 after piwik block | |||
<!--apertus header start--> | |||
<iframe width="100%" scrolling="no" height="42" src="http://www.apertus.org/header?page=forums" frameborder="0"></iframe> | |||
<!--apertus header end--> | |||
</nowiki> | |||
==phabricator== | |||
Paste piwiki tracking code in file src/view/page/PhabricatorBarePageView.php protected function getHead() {: | |||
<pre style="white-space: pre-wrap"> | |||
if ($this->getRequest()) { | |||
$viewer = $this->getRequest()->getViewer(); | |||
if ($viewer) { | |||
$postprocessor_key = $viewer->getUserSetting( | |||
PhabricatorAccessibilitySetting::SETTINGKEY); | |||
if (strlen($postprocessor_key)) { | |||
$response->setPostProcessorKey($postprocessor_key); | |||
} | |||
} | |||
} | |||
$piwik = phutil_safe_html(" | |||
<!-- Piwik --> | |||
<script type=\"text/javascript\"> | |||
var _paq = _paq || []; | |||
_paq.push(['trackPageView']); | |||
_paq.push(['enableLinkTracking']); | |||
(function() { | |||
var u=\"//piwik.produktion.io/\"; | |||
_paq.push(['setTrackerUrl', u+'piwik.php']); | |||
_paq.push(['setSiteId', 3]); | |||
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> | |||
<noscript><p><img src=\"//piwik.produktion.io/piwik.php?idsite=3\" style=\"border:0;\" alt=\"\" /></p></noscript> | |||
<!-- End Piwik Code --> | |||
"); | |||
$developer = PhabricatorEnv::getEnvConfig('phabricator.developer-mode'); | |||
return hsprintf( | |||
'%s%s%s%s%s%s%s%s%s%s', | |||
$viewport_tag, | |||
$mask_icon, | |||
$icon_tag_76, | |||
$icon_tag_120, | |||
$icon_tag_152, | |||
$favicon_tag, | |||
$referrer_tag, | |||
$piwik, | |||
CelerityStaticResourceResponse::renderInlineScript( | |||
$framebust.jsprintf('window.__DEV__=%d;', ($developer ? 1 : 0))), | |||
$response->renderResourcesOfType('css')); | |||
} | |||
}</pre> | |||
[[Category:Project]] | [[Category:Project]] | ||
[[Category:Website]] | [[Category:Website]] |
Latest revision as of 12:21, 23 April 2018
1 About
The Apertus Website Header is a toolbar on top of all Apertus websites to make navigating between different systems/CMSs easier.
It comes in bright or dark design and always uses the inverted design of the current website.
2 Notes
The header is an iframe with 42 pixels height that has to be added to the theme of each respective website/cms.
2.1 Mediawiki
File: /skins/Vector.php line 124 after $this->html( 'headelement' ); ?> <!--apertus header start--> <iframe width="100%" scrolling="no" height="42" src="http://www.apertus.org/header?page=wiki" frameborder="0"></iframe> <div style="position:relative;"> <!--apertus header end--> line 247 after <?php $this->printTrail(); ?> <!--apertus header start--> </div> <!--apertus header end-->
2.2 Drupal6
File: /sites/all/themes/zen/zen/page.tpl.php line 103 after <body class="<?php print $body_classes; ?>"> <!--apertus header start--> <iframe width="100%" scrolling="no" height="42" src="http://www.apertus.org/header?page=website" frameborder="0"></iframe> <!--apertus header end-->
2.3 Drupal7
Copy File: /sites/all/themes/zen/zen/html.tpl.php to own theme
edit line 101 after <body class="<?php print $classes; ?>" <?php print $attributes;?>> <!--apertus header start--> <iframe width="100%" scrolling="no" height="42" src="http://www.apertus.org/header?page=website" frameborder="0"></iframe> <!--apertus header end-->
2.4 Wordpress
File: /wp-content/themes/twentyeleven/header.php line 70 after </head> <!--apertus header start--> <iframe width="100%" scrolling="no" height="42" src="http://www.apertus.org/header?page=lsmblog" frameborder="0"></iframe> <!--apertus header end--> also needed to change themes CSS to body { padding:0; }
2.5 phpbb
File: /styles/apertus/template/overall_header.html line 43 after piwik block <!--apertus header start--> <iframe width="100%" scrolling="no" height="42" src="http://www.apertus.org/header?page=forums" frameborder="0"></iframe> <!--apertus header end-->
2.6 phabricator
Paste piwiki tracking code in file src/view/page/PhabricatorBarePageView.php protected function getHead() {:
if ($this->getRequest()) { $viewer = $this->getRequest()->getViewer(); if ($viewer) { $postprocessor_key = $viewer->getUserSetting( PhabricatorAccessibilitySetting::SETTINGKEY); if (strlen($postprocessor_key)) { $response->setPostProcessorKey($postprocessor_key); } } } $piwik = phutil_safe_html(" <!-- Piwik --> <script type=\"text/javascript\"> var _paq = _paq || []; _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u=\"//piwik.produktion.io/\"; _paq.push(['setTrackerUrl', u+'piwik.php']); _paq.push(['setSiteId', 3]); 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> <noscript><p><img src=\"//piwik.produktion.io/piwik.php?idsite=3\" style=\"border:0;\" alt=\"\" /></p></noscript> <!-- End Piwik Code --> "); $developer = PhabricatorEnv::getEnvConfig('phabricator.developer-mode'); return hsprintf( '%s%s%s%s%s%s%s%s%s%s', $viewport_tag, $mask_icon, $icon_tag_76, $icon_tag_120, $icon_tag_152, $favicon_tag, $referrer_tag, $piwik, CelerityStaticResourceResponse::renderInlineScript( $framebust.jsprintf('window.__DEV__=%d;', ($developer ? 1 : 0))), $response->renderResourcesOfType('css')); } }