26 $this->header[
'doctype-def']=
'<!DOCTYPE html>';
27 $this->header[
'html-def']=
'<html><head>';
28 $this->body=
'</head>';
36 header(
"Cache-Control: no-store, no-cache, must-revalidate");
37 header(
"Cache-Control: post-check=0, pre-check=0",
false);
38 header(
"Last-Modified: " . gmdate(
"D, d M Y H:i:s") .
" GMT");
39 $this->header[
'cache-control-def'] =
'<meta http-equiv="cache-control" content="no-cache">';
40 $this->header[
'expires-def'] =
'<meta http-equiv="expires" content="-1">';
41 $this->header[
'pragma-def'] =
'<meta http-equiv="pragma" content="no-cache">';
49 $this->header[
'keywords-def'] =
'<meta name="keywords" content="'.$kw.
'" />';
58 $this->header[
'charset-def'] =
'<meta charset="'.$ec.
'" />';
66 $this->header[
'responsive-def'] =
'<meta name="viewport" content="width=device-width, initial-scale=1">';
77 $t = substr($t,0,66).
'...';
79 $this->header[
'title-def'] =
'<title>'.$t.
'</title>';
80 $this->oginfo[
'title'] = $t;
91 $data = substr($data,0,155).
'...';
93 $this->header[
'description-def'] =
'<meta name="description" content="'.$data.
'">';
94 $this->oginfo[
'description'] = $data;
102 $this->header[
'robots-def'] =
'<meta name="ROBOTS" content="NOODP"><meta name="Slurp" content="NOYDIR">';
111 $this->header[
'owner-def'] =
'<meta name="author" content="'.$author.
'">';
119 $this->header[
'generator-def'] =
'<meta name="generator" content="OpenSencillo Framework (www.opensencillo.com)">';
128 $this->header[
'custom'][] = $code;
136 public function script($code)
138 $this->
custom(
'<script type="text/javascript" src="'.$code.
'"></script>');
145 public function css($link)
147 $this->
custom(
'<link rel="stylesheet" href="'.$link.
'">');
165 $this->seo = $this->header[
'doctype-def'].PHP_EOL;
166 $this->seo .= (isset($this->header[
'html-def-snippet'])?$this->header[
'html-def-snippet']:$this->header[
'html-def']).PHP_EOL;
167 $this->seo .= $this->header[
'charset-def'].PHP_EOL;
168 $this->seo .= $this->header[
'responsive-def'].PHP_EOL;
169 $this->seo .= $this->header[
'title-def'].PHP_EOL;
170 $this->seo .= $this->header[
'description-def'].PHP_EOL;
173 unset($this->header[
'html-def']);
174 unset($this->header[
'html-def-snippet']);
175 unset($this->header[
'doctype-def']);
176 unset($this->header[
'charset-def']);
177 unset($this->header[
'responsive-def']);
178 unset($this->header[
'title-def']);
179 unset($this->header[
'description-def']);
181 foreach($this->header as $key => $val)
185 $this->seo .= $val.PHP_EOL;
186 $this->info[
'head'][] = $key;
189 foreach($this->header[
'custom'] as $key => $val)
191 $this->seo .= $val.PHP_EOL;
192 $this->info[
'head'][] = $key;
195 $this->seo .= $this->body;
204 public function lang($lang)
206 unset($this->header[
'html-def']);
207 $this->header[
'html-def']=
'<html lang="'.$lang.
'"><head>';
215 $this->header[
'jquery-js']=
'<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>';
216 $this->header[
'jqueryui-js']=
'<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>';
233 $this->
custom(
'<meta property="og:url" content="'.$arr[
'url'].
'" />');
234 $this->
custom(
'<meta property="og:type" content="'.$arr[
'type'].
'" />');
235 $this->
custom(
'<meta property="og:title" content="'.$this->oginfo[
'title'].
'" />');
236 $this->
custom(
'<meta property="og:description" content="'.$this->oginfo[
'description'].
'" />');
237 $this->
custom(
'<meta property="og:image" content="'.$arr[
'image'].
'" />');
241 $this->header[
'html-def-snippet'] =
'<html itemscope itemtype="http://schema.org/Other"><head>';
243 $this->
custom(
'<meta itemprop="name" content="'.$this->oginfo[
'title'].
'">');
244 $this->
custom(
'<meta itemprop="description" content="'.$this->oginfo[
'description'].
'">');
245 $this->
custom(
'<meta itemprop="image" content="'.$arr[
'image'].
'">');
254 $this->header[
'bootstrap-css']=
'<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">';
255 $this->header[
'jquery-js']=
'<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>';
256 $this->header[
'bootstrap-js']=
'<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>';