-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configurei o template para as pginas do blog, e configurei os presets…
… do CSS
- Loading branch information
1 parent
947397d
commit 69fabe3
Showing
871 changed files
with
137,506 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,233 @@ | ||
<?php | ||
|
||
// Sanity check, install should only be checked from index.php | ||
defined('SYSPATH') or exit('Install tests must be loaded from within index.php!'); | ||
|
||
if (version_compare(PHP_VERSION, '5.3', '<')) | ||
{ | ||
// Clear out the cache to prevent errors. This typically happens on Windows/FastCGI. | ||
clearstatcache(); | ||
} | ||
else | ||
{ | ||
// Clearing the realpath() cache is only possible PHP 5.3+ | ||
clearstatcache(TRUE); | ||
} | ||
|
||
?> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
|
||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | ||
<head> | ||
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<title>Kohana Installation</title> | ||
|
||
<style type="text/css"> | ||
body { width: 42em; margin: 0 auto; font-family: sans-serif; background: #fff; font-size: 1em; } | ||
h1 { letter-spacing: -0.04em; } | ||
h1 + p { margin: 0 0 2em; color: #333; font-size: 90%; font-style: italic; } | ||
code { font-family: monaco, monospace; } | ||
table { border-collapse: collapse; width: 100%; } | ||
table th, | ||
table td { padding: 0.4em; text-align: left; vertical-align: top; } | ||
table th { width: 12em; font-weight: normal; } | ||
table tr:nth-child(odd) { background: #eee; } | ||
table td.pass { color: #191; } | ||
table td.fail { color: #911; } | ||
#results { padding: 0.8em; color: #fff; font-size: 1.5em; } | ||
#results.pass { background: #191; } | ||
#results.fail { background: #911; } | ||
</style> | ||
|
||
</head> | ||
<body> | ||
|
||
<h1>Environment Tests</h1> | ||
|
||
<p> | ||
The following tests have been run to determine if <a href="http://kohanaframework.org/">Kohana</a> will work in your environment. | ||
If any of the tests have failed, consult the <a href="http://kohanaframework.org/guide/about.install">documentation</a> | ||
for more information on how to correct the problem. | ||
</p> | ||
|
||
<?php $failed = FALSE ?> | ||
|
||
<table cellspacing="0"> | ||
<tr> | ||
<th>PHP Version</th> | ||
<?php if (version_compare(PHP_VERSION, '5.2.3', '>=')): ?> | ||
<td class="pass"><?php echo PHP_VERSION ?></td> | ||
<?php else: $failed = TRUE ?> | ||
<td class="fail">Kohana requires PHP 5.2.3 or newer, this version is <?php echo PHP_VERSION ?>.</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>System Directory</th> | ||
<?php if (is_dir(SYSPATH) AND is_file(SYSPATH.'classes/kohana'.EXT)): ?> | ||
<td class="pass"><?php echo SYSPATH ?></td> | ||
<?php else: $failed = TRUE ?> | ||
<td class="fail">The configured <code>system</code> directory does not exist or does not contain required files.</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>Application Directory</th> | ||
<?php if (is_dir(APPPATH) AND is_file(APPPATH.'bootstrap'.EXT)): ?> | ||
<td class="pass"><?php echo APPPATH ?></td> | ||
<?php else: $failed = TRUE ?> | ||
<td class="fail">The configured <code>application</code> directory does not exist or does not contain required files.</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>Cache Directory</th> | ||
<?php if (is_dir(APPPATH) AND is_dir(APPPATH.'cache') AND is_writable(APPPATH.'cache')): ?> | ||
<td class="pass"><?php echo APPPATH.'cache/' ?></td> | ||
<?php else: $failed = TRUE ?> | ||
<td class="fail">The <code><?php echo APPPATH.'cache/' ?></code> directory is not writable.</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>Logs Directory</th> | ||
<?php if (is_dir(APPPATH) AND is_dir(APPPATH.'logs') AND is_writable(APPPATH.'logs')): ?> | ||
<td class="pass"><?php echo APPPATH.'logs/' ?></td> | ||
<?php else: $failed = TRUE ?> | ||
<td class="fail">The <code><?php echo APPPATH.'logs/' ?></code> directory is not writable.</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>PCRE UTF-8</th> | ||
<?php if ( ! @preg_match('/^.$/u', 'ñ')): $failed = TRUE ?> | ||
<td class="fail"><a href="http://php.net/pcre">PCRE</a> has not been compiled with UTF-8 support.</td> | ||
<?php elseif ( ! @preg_match('/^\pL$/u', 'ñ')): $failed = TRUE ?> | ||
<td class="fail"><a href="http://php.net/pcre">PCRE</a> has not been compiled with Unicode property support.</td> | ||
<?php else: ?> | ||
<td class="pass">Pass</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>SPL Enabled</th> | ||
<?php if (function_exists('spl_autoload_register')): ?> | ||
<td class="pass">Pass</td> | ||
<?php else: $failed = TRUE ?> | ||
<td class="fail">PHP <a href="http://www.php.net/spl">SPL</a> is either not loaded or not compiled in.</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>Reflection Enabled</th> | ||
<?php if (class_exists('ReflectionClass')): ?> | ||
<td class="pass">Pass</td> | ||
<?php else: $failed = TRUE ?> | ||
<td class="fail">PHP <a href="http://www.php.net/reflection">reflection</a> is either not loaded or not compiled in.</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>Filters Enabled</th> | ||
<?php if (function_exists('filter_list')): ?> | ||
<td class="pass">Pass</td> | ||
<?php else: $failed = TRUE ?> | ||
<td class="fail">The <a href="http://www.php.net/filter">filter</a> extension is either not loaded or not compiled in.</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>Iconv Extension Loaded</th> | ||
<?php if (extension_loaded('iconv')): ?> | ||
<td class="pass">Pass</td> | ||
<?php else: $failed = TRUE ?> | ||
<td class="fail">The <a href="http://php.net/iconv">iconv</a> extension is not loaded.</td> | ||
<?php endif ?> | ||
</tr> | ||
<?php if (extension_loaded('mbstring')): ?> | ||
<tr> | ||
<th>Mbstring Not Overloaded</th> | ||
<?php if (ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING): $failed = TRUE ?> | ||
<td class="fail">The <a href="http://php.net/mbstring">mbstring</a> extension is overloading PHP's native string functions.</td> | ||
<?php else: ?> | ||
<td class="pass">Pass</td> | ||
<?php endif ?> | ||
</tr> | ||
<?php endif ?> | ||
<tr> | ||
<th>Character Type (CTYPE) Extension</th> | ||
<?php if ( ! function_exists('ctype_digit')): $failed = TRUE ?> | ||
<td class="fail">The <a href="http://php.net/ctype">ctype</a> extension is not enabled.</td> | ||
<?php else: ?> | ||
<td class="pass">Pass</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>URI Determination</th> | ||
<?php if (isset($_SERVER['REQUEST_URI']) OR isset($_SERVER['PHP_SELF']) OR isset($_SERVER['PATH_INFO'])): ?> | ||
<td class="pass">Pass</td> | ||
<?php else: $failed = TRUE ?> | ||
<td class="fail">Neither <code>$_SERVER['REQUEST_URI']</code>, <code>$_SERVER['PHP_SELF']</code>, or <code>$_SERVER['PATH_INFO']</code> is available.</td> | ||
<?php endif ?> | ||
</tr> | ||
</table> | ||
|
||
<?php if ($failed === TRUE): ?> | ||
<p id="results" class="fail">✘ Kohana may not work correctly with your environment.</p> | ||
<?php else: ?> | ||
<p id="results" class="pass">✔ Your environment passed all requirements.<br /> | ||
Remove or rename the <code>install<?php echo EXT ?></code> file now.</p> | ||
<?php endif ?> | ||
|
||
<h1>Optional Tests</h1> | ||
|
||
<p> | ||
The following extensions are not required to run the Kohana core, but if enabled can provide access to additional classes. | ||
</p> | ||
|
||
<table cellspacing="0"> | ||
<tr> | ||
<th>PECL HTTP Enabled</th> | ||
<?php if (extension_loaded('http')): ?> | ||
<td class="pass">Pass</td> | ||
<?php else: ?> | ||
<td class="fail">Kohana can use the <a href="http://php.net/http">http</a> extension for the Request_Client_External class.</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>cURL Enabled</th> | ||
<?php if (extension_loaded('curl')): ?> | ||
<td class="pass">Pass</td> | ||
<?php else: ?> | ||
<td class="fail">Kohana can use the <a href="http://php.net/curl">cURL</a> extension for the Request_Client_External class.</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>mcrypt Enabled</th> | ||
<?php if (extension_loaded('mcrypt')): ?> | ||
<td class="pass">Pass</td> | ||
<?php else: ?> | ||
<td class="fail">Kohana requires <a href="http://php.net/mcrypt">mcrypt</a> for the Encrypt class.</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>GD Enabled</th> | ||
<?php if (function_exists('gd_info')): ?> | ||
<td class="pass">Pass</td> | ||
<?php else: ?> | ||
<td class="fail">Kohana requires <a href="http://php.net/gd">GD</a> v2 for the Image class.</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>MySQL Enabled</th> | ||
<?php if (function_exists('mysql_connect')): ?> | ||
<td class="pass">Pass</td> | ||
<?php else: ?> | ||
<td class="fail">Kohana can use the <a href="http://php.net/mysql">MySQL</a> extension to support MySQL databases.</td> | ||
<?php endif ?> | ||
</tr> | ||
<tr> | ||
<th>PDO Enabled</th> | ||
<?php if (class_exists('PDO')): ?> | ||
<td class="pass">Pass</td> | ||
<?php else: ?> | ||
<td class="fail">Kohana can use <a href="http://php.net/pdo">PDO</a> to support additional databases.</td> | ||
<?php endif ?> | ||
</tr> | ||
</table> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php defined('SYSPATH') or die('No direct script access'); | ||
|
||
abstract class Controller_ApplicationBlog extends Controller_Template{ | ||
|
||
public $template = 'site/template_blog'; | ||
|
||
public function before(){ | ||
|
||
$icon = URL::base() . 'media/images/favicon_blog.png'; | ||
|
||
parent::before(); | ||
View::set_global('site_name', 'Blog com Kohana 3.2'); | ||
View::set_global('description', 'Exemplo de blog usando framework kohana'); | ||
View::set_global('X_UA_Compatible', 'IE=edge,chrome=1'); | ||
View::set_global('viewport', 'width=device-width,initial-scale=1'); | ||
View::set_global('author', 'Fabian Carlos'); | ||
View::set_global('reply_to', '[email protected]'); | ||
View::set_global('shortcut_icon', $icon); | ||
|
||
$this->template->content = ''; | ||
$this->template->styles = array( | ||
'style' | ||
); | ||
$this->template->scripts = array( | ||
'general' | ||
); | ||
|
||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php defined('SYSPATH') or die('No direct script access.'); | ||
|
||
class Controller_Home extends Controller_ApplicationBlog { | ||
|
||
public function action_index(){ | ||
|
||
$hello = 'hello xomano!!!'; | ||
|
||
$content = View::factory('site/home/index') | ||
->bind('hello', $hello); | ||
|
||
|
||
$this->template->content = $content; | ||
} | ||
|
||
} // End Welcome |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?php defined('SYSPATH') or die('No direct script access.'); ?> | ||
|
||
2012-05-07 20:42:35 --- ERROR: ErrorException [ 4 ]: syntax error, unexpected T_VARIABLE ~ APPPATH\classes\controller\welcome.php [ 9 ] | ||
2012-05-07 20:42:35 --- STRACE: ErrorException [ 4 ]: syntax error, unexpected T_VARIABLE ~ APPPATH\classes\controller\welcome.php [ 9 ] | ||
-- | ||
#0 [internal function]: Kohana_Core::shutdown_handler() | ||
#1 {main} | ||
2012-05-07 20:42:58 --- ERROR: View_Exception [ 0 ]: The requested view site/home/index could not be found ~ SYSPATH\classes\kohana\view.php [ 252 ] | ||
2012-05-07 20:42:58 --- STRACE: View_Exception [ 0 ]: The requested view site/home/index could not be found ~ SYSPATH\classes\kohana\view.php [ 252 ] | ||
-- | ||
#0 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\view.php(137): Kohana_View->set_filename('site/home/index') | ||
#1 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\view.php(30): Kohana_View->__construct('site/home/index', NULL) | ||
#2 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\application\classes\controller\welcome.php(9): Kohana_View::factory('site/home/index') | ||
#3 [internal function]: Controller_Welcome->action_index() | ||
#4 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\request\client\internal.php(118): ReflectionMethod->invoke(Object(Controller_Welcome)) | ||
#5 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\request\client.php(64): Kohana_Request_Client_Internal->execute_request(Object(Request)) | ||
#6 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\request.php(1138): Kohana_Request_Client->execute(Object(Request)) | ||
#7 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\index.php(109): Kohana_Request->execute() | ||
#8 {main} | ||
2012-05-07 20:43:12 --- ERROR: View_Exception [ 0 ]: The requested view site/home/index could not be found ~ SYSPATH\classes\kohana\view.php [ 252 ] | ||
2012-05-07 20:43:12 --- STRACE: View_Exception [ 0 ]: The requested view site/home/index could not be found ~ SYSPATH\classes\kohana\view.php [ 252 ] | ||
-- | ||
#0 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\view.php(137): Kohana_View->set_filename('site/home/index') | ||
#1 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\view.php(30): Kohana_View->__construct('site/home/index', NULL) | ||
#2 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\application\classes\controller\welcome.php(9): Kohana_View::factory('site/home/index') | ||
#3 [internal function]: Controller_Welcome->action_index() | ||
#4 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\request\client\internal.php(118): ReflectionMethod->invoke(Object(Controller_Welcome)) | ||
#5 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\request\client.php(64): Kohana_Request_Client_Internal->execute_request(Object(Request)) | ||
#6 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\request.php(1138): Kohana_Request_Client->execute(Object(Request)) | ||
#7 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\index.php(109): Kohana_Request->execute() | ||
#8 {main} | ||
2012-05-07 20:52:35 --- ERROR: HTTP_Exception_404 [ 404 ]: The requested URL / was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 87 ] | ||
2012-05-07 20:52:35 --- STRACE: HTTP_Exception_404 [ 404 ]: The requested URL / was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 87 ] | ||
-- | ||
#0 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\request\client.php(64): Kohana_Request_Client_Internal->execute_request(Object(Request)) | ||
#1 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\request.php(1138): Kohana_Request_Client->execute(Object(Request)) | ||
#2 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\index.php(109): Kohana_Request->execute() | ||
#3 {main} | ||
2012-05-07 20:53:34 --- ERROR: HTTP_Exception_404 [ 404 ]: The requested URL / was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 87 ] | ||
2012-05-07 20:53:34 --- STRACE: HTTP_Exception_404 [ 404 ]: The requested URL / was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 87 ] | ||
-- | ||
#0 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\request\client.php(64): Kohana_Request_Client_Internal->execute_request(Object(Request)) | ||
#1 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\request.php(1138): Kohana_Request_Client->execute(Object(Request)) | ||
#2 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\index.php(109): Kohana_Request->execute() | ||
#3 {main} | ||
2012-05-07 20:53:54 --- ERROR: HTTP_Exception_404 [ 404 ]: The requested URL / was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 87 ] | ||
2012-05-07 20:53:54 --- STRACE: HTTP_Exception_404 [ 404 ]: The requested URL / was not found on this server. ~ SYSPATH\classes\kohana\request\client\internal.php [ 87 ] | ||
-- | ||
#0 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\request\client.php(64): Kohana_Request_Client_Internal->execute_request(Object(Request)) | ||
#1 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\system\classes\kohana\request.php(1138): Kohana_Request_Client->execute(Object(Request)) | ||
#2 C:\Program Files\VertrigoServ\www\kohana_3.2_blog\index.php(109): Kohana_Request->execute() | ||
#3 {main} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
|
||
<h2><?php echo $hello ?></h2> | ||
|
Oops, something went wrong.