Social Media e Wordpress O poder dos Themes e Plugins PHP
By José Fernando S. Carvalho
Social Midia ao redor
APPLE
FIAT
DELL
MINISTÉRIO DA CULTURA
BLOGS, FORUNS, LISTAS DE DISCUSSÃO
E O NOSSO PHP
BLZ, MAS O QUE É SOCIAL MEDIA?
ECONOMIA DE QUE?
WEB 2.0 E SUAS TOOLS
OS MOCINHOS
OS BANDIDOS
•E. DOAÇÃO É FANTASIA?!?!?
- Usenet 80Mil em 2001- Wordpress com mais de 4milhões em 2009
•MOTIVAÇÕES
- Redução no custo de produção e disseminação - Reciprocidade- Prestígio - Incentivo Social e moral
A MAIOR MOTIVAÇÃO- Baixo custo de produção = PHP
CARACTERÍSTICAS-Descentralização de conteúdo-Extrema facilidade de uso-Interatividade-Uso intensivo de agregadores de conteúdo e Tags
BRINDEZIN!!!!!
WORDPRESS É UMA MÃE
- UM GROUPWARE- TODO EM PHP- ARQUITETURA MODULAR- CONTÉM TODO O CONCEITO DA WEB COLABORATIVA- FLEXÍVEL- SUPORTE ATIVO- MAIS DE 4MILHÕES DE USUÁRIOS- GERENCIADOR DE PORTAIS
PILHA DE TECNOLOGIA WP
ARQUITETURA WP
THEMES AND PLUGINS
THEMESResponsável pelo primeiro
impacto da solução colaborativa
• Criando um Theme no WP
1- Criar uma pasta com o nome do theme
2- Criar os seguintes arquivos dentro da pasta
• index.php e single.php
• sidebar.php
• footer.php
• header.php
• folhadeestilo.css e screenshot.png
TEIATI
• Primeiras linhas folhadeestilo.css1. /*
2. Theme Name: Teiati
3. Theme URI: http://www.teiati.com.br
4. Description: Theme direcionado para Portais baseados no Wordpress
5.
6. Author: Fernando Carvalho
7. Author URI: http://www.fish.jpa.com.br
8. Version: 1.0
9. */
• Arquivo header.php<html>
<head>
<title><?php bloginfo('name'); ?></title>
<meta http-equiv="content-type" content="<?php bloginfo('html_type'); ?>; <?php bloginfo('charset'); ?>" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" media="all" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="text/xml" title="RSS .92" href="<?php bloginfo('rss_url'); ?>" />
<?php wp_head(); ?>
</head>
<body>
• Arquivo footer.php
<div class=“rodape”>
<!-- ALGUM CONTEÚDO NO RODAPÉ-->
</div>
<?php wp_footer(); ?>
</body>
</html>
• Arquivo Index.php<?php
get_header();
if (have_posts()) : while (have_posts()) : the_post();
echo "<h2>".the_title()."</h2>";
the_content("<p>",$content,"</p>");
endwhile;
else :
echo "não ha posts";
endif;
get_footer();
?>
O LOOP
• Arquivo single.php
<?php
get_header();
if (have_posts()) : the_post();
echo "<h2>".the_title()."</h2>";
the_content("<p>",$content,"</p>");
else :
echo "não ha posts";
endif;
get_sidebar();
get_footer();
?>
• Arquivo sidebar.php
<?php
//NUVEM DE TAGS
wp_tag_cloud('smallest=8&largest=16&number=30&orderby=name');
//CATEGORIAS
wp_list_categories('depth=1&orderby=id&title_li=');
?>
PARABÉNS SEU THEME JA ESTÁ ROLANDO
PLUGINS
• CRIANDO PLUGINS
1- Criar uma pasta com o nome do Plugin
2- Dentro da pasta criar um arquivo com o nome do Plugin e outro README:
- email-teiati.php
- Readme.txt
• Primeiras linhas arquivo email-teiati.php1. <?php
2. /*
3. Plugin Name: Email-TeiaTi
4. Plugin URI: http://fish.jpa.com.br
5. Description: Alerta o grupo para novas atualizacoes
6. Version: 1.0
7. Author: Fernando Carvalho - Fish
8. Author URI: http://fish.jpa.com.br
9. */
• Lógica no email-teiati.php
add_action('publish_post', 'email_teiati');
function email_teiati($post_ID){
$Name = "TEIA TI";
$emailTeia = “[email protected]";
$lista = "[email protected]";
$cabecalho .= "From: ". $Name . " <" . $emailTeia . ">\r\n";
$body = "Pessoal, inseriram uma nova entrada no TEIA, deem um pulo para saber se o conteudo lhes interessa.”;
$Titulo = "Novo Post no Teia";
mail($lista, $Titulo, $body, $cabecalho);
return $post_ID;
}
?>
• Arquivo readme.txt=== Plugin Name ===
Colaborador: Fish
Link para doações: http://fish.jpa.com.br/
Tags: post, autor
Requer wp : 2.7
Testado na Versao: 2.7
Essa é uma pequena descrição sobre o plugin..
== Description ==
Essa é a descrição completa do plugin…
PLUGIN FUNCIONANDO !!!!!!
SUGESTÕES
-Desenvolver para interligar pessoas-Usem o wordpress(FBI, MINC, FORD,SONY)-Certifiquem-se de haver um modulo colaborativo para determinada solução.-Colaborem-Façam seus nomes na WEB
?
Contato
José Fernando Santos Carvalho “fish”Bacharel em Sistemas de InformaçãoAdministrador de Sistemas Neoline-------------------------------------------------------E-mail: [email protected]: http://fish.jpa.com.brFollow me on Twitter: http://twitter.com/fisholito
Referências
http://wordpress.comhttp://fish.jpa.com.brhttp://www.cultura.gov.brhttp://apple.comhttp://www.blogcorporativo.net
Top Related