Commit: e81b33969fc772e163926b90d836bf1b50edb29c Author: Hannes Magnusson <[email protected]> Fri, 13 Dec 2013 00:45:23 -0800 Parents: 3cddd7475863f70f2db6caab3070b4130f9e20ad Branches: master
Link: http://git.php.net/?p=web/shared.git;a=commitdiff;h=e81b33969fc772e163926b90d836bf1b50edb29c Log: Improve search box & <head> Optional hidden field for search box. Optional extra "random stuff" into the <head>. Changed paths: M templates/header.inc Diff: diff --git a/templates/header.inc b/templates/header.inc index 2cae622..43b4ba3 100644 --- a/templates/header.inc +++ b/templates/header.inc @@ -7,6 +7,7 @@ * $TITLE = "Awesome Website"; // Page title * $SUBDOMAIN = "people"; // Subdomain/Project * $LINKS = array( + * $HEAD_RAND = ""; // Random extra values needed for in <head> * array("href" => "/link.php", "text" => "Link text") * ); // Menu menu links * $CSS = array("//example.com/external.css", "/shared/styles/local.js"); @@ -15,6 +16,7 @@ * "action" => "/search.php", * "placeholder" => "Placeholder text", * "name" => "input-name", + * "hidden" => array(array("name" => "hidden-input-name", "value" => "hidden-input-value")), * ); // Search box, if any */ ?> @@ -34,6 +36,7 @@ <link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,400italic,600italic|Source+Code+Pro&subset=latin,latin-ext" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="//php.net/favicon.ico"> + <?=$HEAD_RAND?> </head> <body id="<?=$SUBDOMAIN?>"> @@ -53,6 +56,9 @@ <div class="secondscreen"> <form method="<?=$SEARCH["method"]?>" action="<?=$SEARCH["action"]?>"> <input type="search" placeholder="<?=$SEARCH["placeholder"]?>" name="<?=$SEARCH["name"]?>" class="search"> +<?php if(isset($SEARCH["hidden"])) foreach((array)$SEARCH["hidden"] as $entry): ?> + <input type="hidden" name="<?=$entry["name"]?>" value="<?=$entry["value"]?>"> +<?php endforeach ?> </form> </div> <?php endif ?> -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
