This file contains hidden or 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
| <?php | |
| // ... | |
| $this->Auth->allow('*'); | |
| } // beforefilter | |
| ?> |
This file contains hidden or 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
| <?php | |
| // Define medidas | |
| $medida = array( | |
| 'largura' => '100', | |
| 'altura' => '100', | |
| ); | |
| // Abre a imagem original | |
| $img = imageCreateFromPng('imagem.png'); | |
| // Mantem definições de transparencia |
This file contains hidden or 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
| <?php | |
| // Abre imagem 1 | |
| $img1 = imageCreateFromPng('imagem1.png'); | |
| // Mantem definições de transparencia | |
| imageAlphaBlending($img1, true); | |
| imageSaveAlpha($img1, true); | |
| // Abre imagem 2 | |
| $img2 = imageCreateFromPng('imagem2.png'); | |
| // Mantem definições de transparencia |
This file contains hidden or 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
| <?php | |
| // Define medidas | |
| $medida = array( | |
| 'largura' => '200', | |
| 'altura' => '200', | |
| ); | |
| // Cria a imagem temporaria | |
| $imgTemp = imagecreatetruecolor( $medida['largura'], $medida['altura'] ); | |
| // Define a cor transparente e pintamos toda a imagem |
This file contains hidden or 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
| $(document).ready(function(){ | |
| $('p').css('color','#ff0000'); | |
| }); |
This file contains hidden or 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
| window.addEvent('domready',function(event) { | |
| $('p').setStyle('border','1px solid #ff0000'); | |
| }); |
This file contains hidden or 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
| <!-- Carrega jQuery primeiro --> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> | |
| <!-- Carrega as extensões jQuery --> | |
| <!-- ... --> | |
| <!-- Instancia jQuery na variável $j --> | |
| <script type="text/javascript"> | |
| var $j = jQuery.noConflict(); | |
| </script> |
This file contains hidden or 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
| <!-- Carrega jQuery primeiro --> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script> | |
| <!-- Não instancia jQuery --> | |
| <script type="text/javascript"> | |
| jQuery.noConflict(); | |
| </script> | |
| <!-- Carrega as extensões jQuery --> | |
| <!-- ... --> |
This file contains hidden or 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
| <?php | |
| if( function_exists( 'add_theme_support' ) ) { | |
| // Adiciona suporte a Post Formats | |
| add_theme_support( 'post-formats', array( 'aside', 'gallery', 'link', 'image', 'quote', 'status', 'video', 'audio', 'chat' ) ); | |
| if( function_exists( 'add_post_type_support' ) ) { | |
| // Atribui Post Formats aos Posts | |
| add_post_type_support( 'post', 'post-formats' ); | |
| } |
This file contains hidden or 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
| <?php | |
| // Atribui Post Formats as Páginas | |
| add_post_type_support( 'page', 'post-formats' ); | |
| // Cria Custom Post Type e atribui Post Formats | |
| register_post_type('portfolio', array( 'supports' => array('title', 'editor', 'author', 'post-formats') )); | |
| ?> |