function tpl_menu() { global $MENU; echo "<a class=\"responsive-button\" href=\"#menu-container\">≡</a>"; echo "<nav id=\"menu-container\" role=\"menu-container\">\n"; echo "<div id=\"logo\"><a href=\"#\"><img src=\"" . get_template_url() . "img/logo.png\"></a></div>\n"; foreach ($MENU->getSections() as $section) { echo "\t<div class=\"menu-section\" onclick=\"\$(this).find('.menu').slideToggle()\">\n"; echo "\t\t<div class=\"menu-section-title\">"; \pi18n($section->getName(), $section->getNameDomain()); echo "</div>\n"; echo "\t\t<ul class=\"menu\">\n"; foreach ($section->getEntries() as $entry) { echo "\t\t\t<li>"; if ($entry->getImg() !== NULL && $entry->getImg() != "") { $img = get_template_url() . "img/" . $entry->getImg(); } else { $img = get_template_url() . "img/menu_default.png"; } $style = "style=\"background-image:url('{$img}');\""; switch ($entry->getType()) { case MenuEntry::ACTION: $url = get_url_action($entry->getAction()); break; case MenuEntry::REPORT: $url = get_report_url($entry->getNameDomain(), $entry->getAction(), 'display'); break; } echo "<a {$style} href=\"" . $url . "\">" . __($entry->getName(), $entry->getNameDomain()) . "</a></li>\n"; } echo "\t\t</ul>\n"; echo "\t</div>\n"; } echo "</nav>"; }
<?php /** 404.php * * The template for displaying 404 pages (Not Found). * * @author Konstantin Obenland * @package The Bootstrap * @since 1.0.0 - 07.02.2012 */ get_header(); ?> <div class="philanthropistWrapper"> <div class="container"> <div class="notFoundErrorWrap"> <img src="<?php echo get_template_url(); ?> /img/404NotFound.png" alt="404 Not Found"> <h1 class="entry-title textCenter">Page not found :(</h1> <a href="/"><< Back to Home</a> </div> </div> </div> <?php get_footer(); /* End of file 404.php */ /* Location: ./wp-content/themes/the-bootstrap/404.php */
</div> </form> <?php $q = $_GET['q']; $newsList = !empty($q) ? $wpdb->get_results("SELECT * FROM wp_posts where post_title LIKE '%" . $q . "%' and post_type='vinny_news' and post_status='publish'") : ""; ?> <ul class="vinnyNewsList"> <?php if (!empty($newsList)) { foreach ($newsList as $news) { ?> <li> <div class="lessNewsBlock"> <?php echo has_post_thumbnail($news->ID) ? get_the_post_thumbnail($news->ID, "thumbnail") : '<img src="' . get_template_url() . '/img/vinny-news.jpg" alt="News">'; ?> <h4 class="heading"><?php echo $news->post_title; ?> </h4> <span class="by"> - <?php echo date("M d", strtotime($news->post_date)); ?> by <?php echo the_author_meta('display_name', $news->post_author); ?> </span> <p><?php echo stringTruncate(strip_tags($news->post_content), 400, "#"); ?>
// along with Pastèque. If not, see <http://www.gnu.org/licenses/>. function showPopup(content) { var popup = '<div id="popup-container"><div id="popup">' + content + '<p id="popup-close"><a class="btn" onclick="javascript:closePopup();return false;"><?php echo \i18n("Close"); ?> </a></div></div>'; $("body").append(popup); } function closePopup() { $("#popup-container").remove(); } function showAbout() { showPopup('<p><img id="about-icon" src="<?php echo get_template_url() . "img/icon.png"; ?> " /> Pastèque <?php echo \i18n("Version.Codename"); ?> <?php echo PT::VERSION; ?> </p>'); } <?php $dateFormat = i18n("date"); $jsDateFormat = str_replace(array("%Y", "%m", "%d"), array("yyyy", "mm", "dd"), $dateFormat); ?> $(function() {
function tpl_menu() { global $MENU; echo "<nav class=\"navbar navbar-fixed-top navbar-inverse\">\n"; echo "\t<div class=\"container-fluid\">\n"; echo "\t\t<div class=\"navbar-header\">\n"; echo "\t\t\t<button type=\"button\" class=\"navbar-toggle collapsed\"" . " data-toggle=\"collapse\" data-target=\"#main-menu\"" . " aria-expanded=\"false\">\n"; echo "\t\t\t<span class=\"sr-only\">Toggle menu</span>\n"; echo "\t\t\t<span class=\"icon-bar\"></span>\n"; echo "\t\t\t<span class=\"icon-bar\"></span>\n"; echo "\t\t\t<span class=\"icon-bar\"></span>\n"; echo "\t\t\t</button>\n"; echo "\t\t\t<a class=\"navbar-brand\" href=\"?p=home\">\n"; echo "\t\t\t\t<img alt=\"Logo Pastèque\" class=\"img-responsive img-thumbnail\" src=\"" . get_template_url() . "img/logo.png\">\n"; echo "\t\t\t</a>\n"; echo "\t\t</div>\n"; echo "\t\t<div class=\"collapse navbar-collapse\" id=\"main-menu\">\n"; echo "\t\t\t<ul class=\"nav navbar-nav\">\n"; foreach ($MENU->getSections() as $section) { echo "\t\t\t\t<li class=\"dropdown\">\n"; echo "\t\t\t\t\t<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"" . " role=\"button\" aria-haspopup=\"true\" aria-extended=\"false\">"; \pi18n($section->getName(), $section->getNameDomain()); echo "\t\t\t\t\t</a>\n"; echo "\t\t\t\t<ul class=\"dropdown-menu\">\n"; foreach ($section->getEntries() as $entry) { if ($entry->getImg() !== NULL && $entry->getImg() != "") { $img = get_template_url() . "img/" . $entry->getImg(); } else { $img = get_template_url() . "img/menu_default.png"; } $style = "background-image:url('{$img}'); background-repeat: no-repeat; background-position: 2px 50%; padding-left: 25px;"; switch ($entry->getType()) { case MenuEntry::ACTION: $url = get_url_action($entry->getAction()); break; case MenuEntry::REPORT: $url = get_report_url($entry->getNameDomain(), $entry->getAction(), 'display'); break; } echo "\t\t\t\t\t<li><a style=\"" . $style . "\" href=\"" . $url . "\">" . __($entry->getName(), $entry->getNameDomain()) . "</a></li>\n"; } echo "\t\t\t\t\t</ul>\n"; echo "\t\t\t\t</li>\n"; } echo "\t\t\t</ul>\n"; echo "\t\t</div>\n"; echo "\t</div>\n"; echo "</nav>"; }
function admin_css() { echo '<link rel="stylesheet" type="text/css" href="' . get_template_url() . '/css/admin_custom.css">'; }
function template_url() { echo get_template_url(); }