mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Kill the beta warning on all pages
This commit is contained in:
@@ -93,15 +93,6 @@ if (isset($shortname) && $shortname) {
|
||||
|
||||
|
||||
|
||||
<?php if (!isset($_COOKIE['BetaWarning']) || $_COOKIE['BetaWarning'] == TRUE): ?>
|
||||
<div id="head-beta-warning">
|
||||
<p id="beta-warning">
|
||||
<span class="blurb">Welcome to the php.net beta site. If you want to revert back, <a href="?setbeta=0">click here</a></span>
|
||||
<a href="#" id="beta-warning-close">X</a>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if (!empty($config['intro'])):?>
|
||||
<div id="intro">
|
||||
<div class="container">
|
||||
|
||||
@@ -226,13 +226,6 @@ function site_header($title = '', $config = array())
|
||||
</head>
|
||||
<body{$onload}>
|
||||
|
||||
<div id="head-beta-warning">
|
||||
<a id="beta-warning" href="?setbeta=1&beta=1">
|
||||
<span class="dismiss">dismiss</span>
|
||||
<span class="blurb">Step into the future! Click here to switch to the beta php.net site</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div id="headnav">
|
||||
<a href="/" rel="home"><img src="{$_SERVER['STATIC_ROOT']}/images/php.gif"
|
||||
alt="PHP" width="120" height="67" id="phplogo" /></a>
|
||||
@@ -362,39 +355,6 @@ function site_footer($config = array())
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function($) {
|
||||
function showBetaWarning() {
|
||||
return document.cookie.indexOf("BetaWarning=") == -1;
|
||||
}
|
||||
|
||||
// ----- BETA WARNING CODE -----
|
||||
var headBetaWarning = $('#head-beta-warning');
|
||||
|
||||
// Wire up the beta warning.
|
||||
headBetaWarning.find('.dismiss').click(function(e) {
|
||||
e.preventDefault();
|
||||
$('body').css('margin-top', 0);
|
||||
headBetaWarning.slideUp("fast");
|
||||
|
||||
// Hide it for a month by default.
|
||||
var expiry = new Date();
|
||||
expiry.setTime(expiry.getTime() + (30 * 24 * 60 * 60 * 1000));
|
||||
|
||||
document.cookie = "BetaWarning=off; expires=" + expiry.toGMTString() + "; path=/";
|
||||
});
|
||||
|
||||
if (showBetaWarning()) {
|
||||
headBetaWarning.show();
|
||||
$('body').css('margin-top', '25px');
|
||||
$('#beta-warning').slideDown(300, function() {
|
||||
$(this).find('.blurb').fadeIn('slow');
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<!--[if IE 6]>
|
||||
<script type="text/javascript">
|
||||
var IE6UPDATE_OPTIONS = {
|
||||
|
||||
@@ -69,16 +69,6 @@ include $_SERVER['DOCUMENT_ROOT'] . '/include/last_updated.inc';
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// SETBETA Setting for temporary banners
|
||||
if(isset($_GET['setbeta']) && !headers_sent()) {
|
||||
myphpnet_setbeta( (bool) $_GET['setbeta']);
|
||||
myphpnet_save();
|
||||
list($path, $query) = explode('?', $_SERVER['REQUEST_URI'], 2);
|
||||
mirror_redirect($path);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
// Load in the user preferences
|
||||
function myphpnet_load()
|
||||
{
|
||||
|
||||
11
js/common.js
11
js/common.js
@@ -17,17 +17,6 @@ $(document).ready(function() {
|
||||
// Ugh, cookie handling.
|
||||
var cookies = document.cookie.split(";");
|
||||
|
||||
// Wire up the beta warning.
|
||||
$("#beta-warning-close").click(function(event) {
|
||||
event.preventDefault();
|
||||
$('#head-beta-warning').slideUp("fast", function(){$(this).remove()});
|
||||
|
||||
// Hide it for a month by default.
|
||||
var expiry = new Date();
|
||||
expiry.setTime(expiry.getTime() + (30 * 24 * 60 * 60 * 1000));
|
||||
|
||||
document.cookie = "BetaWarning=off; expires=" + expiry.toGMTString() + "; path=/";
|
||||
});
|
||||
|
||||
var $docs = $('.docs');
|
||||
var $refsect1 = $docs.find('.refentry .refsect1');
|
||||
|
||||
@@ -1169,53 +1169,6 @@ div.soft-deprecation-notice blockquote.sidebar {
|
||||
|
||||
/* Temporary BETA notice */
|
||||
|
||||
#beta-warning-close {
|
||||
background-color: #99C;
|
||||
}
|
||||
|
||||
#head-beta-warning {
|
||||
background-color: #333;
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
#beta-warning {
|
||||
margin: 0 auto;
|
||||
padding: 0.3em;
|
||||
width: 65%;
|
||||
display: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#head-beta-warning .dismiss {
|
||||
font-size: 0.8em;
|
||||
color: #9999CC;
|
||||
}
|
||||
|
||||
#beta-warning .blurb {
|
||||
font-size: 1.1em;
|
||||
line-height: 1.0em;
|
||||
vertical-align: middle;
|
||||
color: #EEE;
|
||||
display: none;
|
||||
margin-left: 12px;
|
||||
}
|
||||
|
||||
#beta-warning .blurb:hover {
|
||||
color: #9999CC;
|
||||
}
|
||||
|
||||
#beta-warning .blurb a {
|
||||
color: #99C;
|
||||
}
|
||||
|
||||
#beta-warning .blurb strong {
|
||||
color: #99C;
|
||||
}
|
||||
|
||||
section.version {
|
||||
border-top: 1px solid #000;
|
||||
|
||||
@@ -2023,27 +2023,6 @@ pre.info {
|
||||
font: normal 14px / 1.46 "Source Code Pro", monospace;
|
||||
}
|
||||
|
||||
#head-beta-warning {
|
||||
padding:.25em 0;
|
||||
min-height:1.5em;
|
||||
border-bottom:.125em solid}
|
||||
|
||||
#beta-warning {
|
||||
margin: 0 auto;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#beta-warning-close {
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
margin: 0 0 0 .25em;
|
||||
width: 1.2em;
|
||||
height: 1.2em;
|
||||
line-height:1.2em;
|
||||
padding: 0 0.375em;
|
||||
text-align: center;
|
||||
border:0;
|
||||
}
|
||||
|
||||
|
||||
body {
|
||||
|
||||
@@ -195,28 +195,6 @@ div.warning:before {
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ Beta Warning */
|
||||
#head-beta-warning {
|
||||
border-color: #696;
|
||||
background-color: #9c9;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
#beta-warning .blurb a,
|
||||
#beta-warning .blurb strong {
|
||||
color: #fff;
|
||||
border-color:#fff;
|
||||
}
|
||||
|
||||
#beta-warning-close {
|
||||
background-color: #696;
|
||||
color: #fff;
|
||||
-moz-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
/* {{{ User notes */
|
||||
#usernotes h3.title {
|
||||
border-color:#669;
|
||||
|
||||
Reference in New Issue
Block a user