示例#1
0
 public function doctype()
 {
     $main = new qa_caching_main();
     if ($main->now_caching()) {
         if (isset($this->content['notices'])) {
             unset($this->content['notices']);
         }
     }
     qa_html_theme_base::doctype();
 }
function qa_cookie_get($ignorcache = false)
{
    if ($ignorcache) {
        return qa_cookie_get_base();
    } else {
        if (qa_caching_main::now_caching()) {
            return null;
        }
        return qa_cookie_get_base();
    }
}
function qa_cookie_get($ignorcache = false)
{
    if ($ignorcache) {
        return qa_cookie_get_base();
    } else {
        $main = new qa_caching_main();
        if ($main->now_caching()) {
            return null;
        }
        return qa_cookie_get_base();
    }
}
 public function head_script()
 {
     qa_html_theme_base::head_script();
     if (qa_caching_main::now_caching()) {
         //$this->output('<script src="'.qa_path('qa-plugin/q2a-caching/js/qa-caching.js', null, null, QA_URL_FORMAT_NEAT).'"></script>');
         //$this->output('<script src="'.qa_path('qa-plugin/q2a-caching/js/qa-caching.min.js', null, null, QA_URL_FORMAT_NEAT).'"></script>');
         // Output as inline script
         $this->output('<script type="text/javascript">');
         $scripts = file_get_contents(QA_PLUGIN_DIR . 'q2a-caching/js/qa-caching.js');
         if (!empty($scripts)) {
             $scripts = explode("\n", $scripts);
             foreach ($scripts as $script) {
                 if (!empty($script)) {
                     $this->output_raw($script);
                 }
             }
         }
         $this->output('</script>');
     }
 }