<?php /* don't allow this page to be requested directly from browser */ if (!defined('QA_VERSION')) { header('Location: /'); exit; } /* Head of the template */ $current_cat = ra_get_cat_desc(qa_request(2)); ?> <!DOCTYPE html> <html lang="<?php echo qa_opt('site_language'); ?> "> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <?php if (is_array($current_cat)) { ?> <meta name="description" content="<?php echo substr($current_cat['content'], 0, 25); ?> "> <meta name="keywords" content="<?php echo $current_cat['title']; ?> "> <?php }
function sc_ra_cat_description() { if (qw_hook_exist(__FUNCTION__)) { $args = func_get_args(); array_unshift($args, $this); return qw_event_hook(__FUNCTION__, $args, NULL); } $req = qa_request(2); if (strlen($req)) { $cat = ra_get_cat_desc($req); $this->output('<div class="cat-description"><h2>' . $cat['title'] . '</h2>'); $this->output('<div class="cat-content">' . $cat['content'] . '</div></div>'); } }