"><?php ra_lang('Ask Questions'); ?> </a> <?php echo ra_nav($context->content, 'main-menu nav navbar-nav', true); ?> </div> </div> <?php if (ra_edit_mode() && ra_is_admin()) { include DUDE_THEME_DIR . '/inc/builder_elm.php'; } ?> <section id="main" <?php echo qa_opt('ra_nav_fixed') ? ' class="has-fixed-top"' : ''; ?> > <?php global $ra_error; if (isset($context->content['error']) && strlen($context->content['error']) > 0 || isset($ra_error)) { ?> <div id="ra-alert" class="alert fade in"> <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button> <?php
function sc_ra_ads($name) { if (qw_hook_exist(__FUNCTION__)) { $args = func_get_args(); array_unshift($args, $this); return qw_event_hook(__FUNCTION__, $args, NULL); } $option = ra_opt('ra_qaads'); if (is_array($option)) { if (in_array_r($name, $option)) { foreach ($option as $opt) { if (ra_edit_mode() && $opt['name'] == $name) { $this->output('<div style="height:100px;background:#333;text-align:center;font-size:20px;margin-bottom:20px;">', $opt['name'], '</div>'); } elseif ($opt['name'] == $name) { $this->output(str_replace('\\', '', base64_decode($opt['code']))); } } } else { $this->output('No ads code found with this name'); } } }
<script src="<?php echo DUDE_THEME_URL; ?> /js/dude.js"></script> <script type="text/javascript"> <?php if (ra_is_home()) { echo base64_decode(ra_db_builder('js_home')); } else { echo base64_decode(ra_db_builder('js_' . $context->template)); } ?> </script> <?php if (ra_edit_mode()) { ?> <script src="<?php echo DUDE_THEME_URL; ?> /js/ra_builder.js"></script> <?php } ?> <?php if (strlen(qa_opt('google_analytics'))) { ?> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', '<?php
function ra_layout_cache($page) { $file = DUDE_THEME_DIR . '/cache/' . $page . '.php'; ob_start(); //if in builder mode load from database if (ra_edit_mode() && ra_is_admin()) { if (file_exists($file)) { unlink($file); } return ra_db_builder($page); } // check if the cache file already exists if (file_exists($file)) { include $file; } else { $html = ra_db_builder($page); if (strlen($html)) { $dom = new DOMDocument(); $dom->loadHTML('<?xml encoding="UTF-8">' . $html); $xpath = new DOMXPath($dom); $pDivs = $xpath->query(".//div[@class='config']"); foreach ($pDivs as $div) { $div->parentNode->removeChild($div); } file_put_contents($file, builder_innerHTML($dom->documentElement->firstChild)); include $file; } else { file_put_contents($file, '<h2 style="text-align:center">The layout of this page was not built before, please build the layout using builder.</h2>'); include $file; } } $output = ob_get_clean(); return $output; }