SlideShare uma empresa Scribd logo
1 de 40
Baixar para ler offline
WordPress
           (sotarok)
http://nequal.jp/
twitter.com/sotarok
•                    (              `)

•   (   `)

•




        Copyright © nequal, Creative Commons Attribution-Noncommercial
                                         2.1 @ WordPress mini seminar.
sotarok



          •
          •
          •
          •
          • Ethna
          • nequal

             Copyright © nequal, Creative Commons Attribution-Noncommercial
                                              2.1 @ WordPress mini seminar.
•   CMS


•




          Copyright © nequal, Creative Commons Attribution-Noncommercial
                                           2.1 @ WordPress mini seminar.
•                                    Website
                                     on
    –                                some framework
•
    –


    –

• WordPress


              Copyright © nequal, Creative Commons Attribution-Noncommercial
                                               2.1 @ WordPress mini seminar.
• PHP              2009
  – http://phpcon.php.gr.jp/2009/
  –         WordPress
  –        Program            WordPress




                      Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                       2.1 @ WordPress mini seminar.
x WordPress                                      1


•
  WordPress
• WordPress




                Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                 2.1 @ WordPress mini seminar.
x WordPress                                        2


•
•   WordPress




        Copyright © nequal, Creative Commons Attribution-Noncommercial
                                         2.1 @ WordPress mini seminar.
WordPress
•
•

•                                                     WP

•




    Copyright © nequal, Creative Commons Attribution-Noncommercial
                                     2.1 @ WordPress mini seminar.
WP
      • wp-content/themes/default
.                              |--      index.php
|--   404.php                  |--      ja.mo
|--   archive.php              |--      ja.po
|--   archives.php             |--      kubrick.pot
|--   comments-popup.php       |--      links.php
|--   comments.php             |--      page.php
|--   footer.php               |--      rtl.css
|--   functions.php            |--      screenshot.png
|--   header.php               |--      search.php
|--   image.php                |--      sidebar.php
|--   images                   |--      single.php
|     |-- audio.jpg            `--      style.css
|     |-- ...              Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                            2.1 @ WordPress mini seminar.
index.php
                               archive.php
                                single.php
                                 page.php
                                    ...




Copyright © nequal, Creative Commons Attribution-Noncommercial
                                 2.1 @ WordPress mini seminar.
header.php
                                footer.php
                               sidebar.php
                                    ...




Copyright © nequal, Creative Commons Attribution-Noncommercial
                                 2.1 @ WordPress mini seminar.
header, footer
•
    get_header(), get_footer(),                          header.php,
    footer.php

        get_header();              header.php


            index.php


         get_footer();              footer.php

                         Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                          2.1 @ WordPress mini seminar.
WP
•               WP                                             CSS



              header.php


         [[      WP               ]]


              footer.php

                 Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                  2.1 @ WordPress mini seminar.
header.php
•
•




             Copyright © nequal, Creative Commons Attribution-Noncommercial
                                              2.1 @ WordPress mini seminar.
header.php
<?php
// ethna
    •
require_once dirname(__FILE__) .
'/../../../../../app/Pcj_Controller.php';
$ethna = new Pcj_Controller();

//
$renderer =& $ethna->getRenderer();
$smarty =& $renderer->engine;
$smarty->left_delimiter = '{{';
$smarty->right_delimiter = '}}';

$GLOBALS['ethna'] = array(
    'ethna' => $ethna,
    'renderer' => $renderer,
    'smarty' => $smarty, Copyright © nequal, Creative Commons Attribution-Noncommercial
);                                                        2.1 @ WordPress mini seminar.
header.php
<?php
// ethna
    •
require_once dirname(__FILE__) .
'/../../../../../app/Pcj_Controller.php';
$ethna = new Pcj_Controller();

//
$renderer = $ethna->getRenderer();
$smarty = $renderer->engine;
$smarty->left_delimiter = '{{';
$smarty->right_delimiter = '}}';

$GLOBALS['ethna'] = array(
    'ethna' => $ethna,
    'renderer' => $renderer,
    'smarty' => $smarty, Copyright © nequal, Creative Commons Attribution-Noncommercial
);                                                        2.1 @ WordPress mini seminar.
header.php
<?php
// ethna
    •                       Ethna
require_once dirname(__FILE__) .        Smarty
'/../../../../../app/Pcj_Controller.php';
$ethna = new Pcj_Controller();

//
$renderer = $ethna->getRenderer();
$smarty = $renderer->engine;
$smarty->left_delimiter = '{{';
$smarty->right_delimiter = '}}';

$GLOBALS['ethna'] = array(
    'ethna' => $ethna,
    'renderer' => $renderer,
    'smarty' => $smarty, Copyright © nequal, Creative Commons Attribution-Noncommercial
);                                                        2.1 @ WordPress mini seminar.
header.php
<?php
// ethna
    •
require_once dirname(__FILE__) .
'/../../../../../app/Pcj_Controller.php';
$ethna = new Pcj_Controller();   footer.php

//
$renderer = $ethna->getRenderer();
$smarty = $renderer->engine;
$smarty->left_delimiter = '{{';
$smarty->right_delimiter = '}}';

$GLOBALS['ethna'] = array(
    'ethna' => $ethna,
    'renderer' => $renderer,
    'smarty' => $smarty, Copyright © nequal, Creative Commons Attribution-Noncommercial
);                                                        2.1 @ WordPress mini seminar.
header.php
<?php if ( is_singular() )
wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>

<?php
echo $renderer->perform('layout/header.tpl', true);
echo $renderer->perform('layout/globalnavi.tpl',
true);
?>
<div id="main">




                         Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                          2.1 @ WordPress mini seminar.
header.php
...
<?php if ( is_singular() )
wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>

<?php
echo $renderer->perform('layout/header.tpl', true);
                          WP
echo $renderer->perform('layout/globalnavi.tpl',
true);
?>
<div id="main">                           OK
                                                     HTML

                         Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                          2.1 @ WordPress mini seminar.
header.php
...
<?php if ( is_singular() )
wp_enqueue_script( 'comment-reply' ); ?>
<?php wp_head(); ?>

<?php
echo $renderer->perform('layout/header.tpl', true);
echo $renderer->perform('layout/globalnavi.tpl',
true);
?>
<div id="main">



                         Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                          2.1 @ WordPress mini seminar.
• WP
    – header, footer                                             OK
•



•
    – WordPress

       •   Ethna



                       Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                        2.1 @ WordPress mini seminar.
WordPress
WP

•
    –                   wp-config.php
• DB




        Copyright © nequal, Creative Commons Attribution-Noncommercial
                                         2.1 @ WordPress mini seminar.
• Ethna   PHP
  – Symfony yaml


• ETHNA/etc/appid-ini.php
• ETHNA/www/blog/wp-config.php




                   Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                    2.1 @ WordPress mini seminar.
• ETHNA/www/blog/wp-config.php

<?php
/**
 * WordPress
 *
...

 */

/**
 * Ethna                          ethna ini.php
 */
require_once dirname(__FILE__) nequal,'/../../etc/pcj-
                         Copyright ©
                                     . Creative Commons Attribution-Noncommercial
ini.php';                                           2.1 @ WordPress mini seminar.
• ETHNA/etc/pcj-ini.php

<?php
/*
 * pcj-ini.php
 *
 * WP              define
 * WP    wp-config                         require
 *
 */

define('DB_NAME', 'dbname');
define('DB_USER', 'dbusername');
define('DB_PASSWORD', 'dbpassword'); Commons Attribution-Noncommercial
                         Copyright © nequal, Creative
define('DB_HOST', 'localhost');                       2.1 @ WordPress mini seminar.
• ETHNA/etc/pcj-ini.php (                )

$config = array(
    // site
    'url' => 'http://phpcon.php.gr.jp/',

     // debug
     //                              false
     'debug' => false,

    // db
    // sample-1: single db
    'dsn' => 'mysql://' . DB_USER . ':' .
DB_PASSWORD . '@' . DB_HOST . © '/' Creative Commons Attribution-Noncommercial
                         Copyright nequal,
                                           . DB_NAME,
...                                              2.1 @ WordPress mini seminar.
WP
•              DB
    –   wp_comments
    –   wp_links
    –   wp_options
    –   wp_postmeta
    –   wp_posts
    –   wp_terms
    –   wp_term_relationships
    –   wp_term_taxonomy
    –   wp_usermeta
    –   wp_users

                          Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                           2.1 @ WordPress mini seminar.
• Ethna
      ORM
<?php

class Pcj_DB_WpPosts extends Pcj_DB
{
    public $table_name = 'wp_posts';
}
    •

        –     ORM

                         Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                          2.1 @ WordPress mini seminar.
$entry = $this->db->Wp_Posts->find(
           D::D_FIRST,
           array(
               'post_status' => 'publish',
               'post_type' => 'post',
               'order' => 'post_date DESC',
           )
       );
$this->af->setApp('blog_post_data', $entry);




                        Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                         2.1 @ WordPress mini seminar.
•   /
•
•                HTML
•
•
•
•




        Copyright © nequal, Creative Commons Attribution-Noncommercial
                                         2.1 @ WordPress mini seminar.
•
        SQL

•
    –         WP

    –




              Copyright © nequal, Creative Commons Attribution-Noncommercial
                                               2.1 @ WordPress mini seminar.
->
•
•
•
•




         Copyright © nequal, Creative Commons Attribution-Noncommercial
                                          2.1 @ WordPress mini seminar.
• WP

•                                         WP
             (^^;
•      PHP
         (

•



                Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                 2.1 @ WordPress mini seminar.
• WordPress
    –
•
    – 1.
        • WP
        •
    – 2. DB
        • DB
        •



               Copyright © nequal, Creative Commons Attribution-Noncommercial
                                                2.1 @ WordPress mini seminar.
Question?

Mais conteúdo relacionado

Semelhante a フレームワークxWordPress

symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)Fabien Potencier
 
WordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressWordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressandrewnacin
 
Charla - SharePoint en la Nube (17Jul2013)
Charla - SharePoint en la Nube (17Jul2013)Charla - SharePoint en la Nube (17Jul2013)
Charla - SharePoint en la Nube (17Jul2013)Juan Andrés Valenzuela
 
Lumberjack 2 - Supercharging WordPress in 2018
Lumberjack 2 - Supercharging WordPress in 2018Lumberjack 2 - Supercharging WordPress in 2018
Lumberjack 2 - Supercharging WordPress in 2018Joe Lambert
 
PECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life betterPECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life betterZendCon
 
<Head> Presentation: Plugging Into Wordpress
<Head> Presentation: Plugging Into Wordpress<Head> Presentation: Plugging Into Wordpress
<Head> Presentation: Plugging Into WordpressMatt Harris
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetAchieve Internet
 
Developers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIDevelopers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIWP Engine
 
Vagrant WordCamp Hamilton
Vagrant  WordCamp HamiltonVagrant  WordCamp Hamilton
Vagrant WordCamp HamiltonPaul Bearne
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php PresentationAlan Pinstein
 
Intro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentIntro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentBrad Williams
 
Wordpress y Docker, de desarrollo a produccion
Wordpress y Docker, de desarrollo a produccionWordpress y Docker, de desarrollo a produccion
Wordpress y Docker, de desarrollo a produccionSysdig
 
Wordpress Plugin Development Short Tutorial
Wordpress Plugin Development Short TutorialWordpress Plugin Development Short Tutorial
Wordpress Plugin Development Short TutorialChristos Zigkolis
 
Building a JavaScript Library
Building a JavaScript LibraryBuilding a JavaScript Library
Building a JavaScript Libraryjeresig
 
Wp3 refresh pgh
Wp3 refresh pghWp3 refresh pgh
Wp3 refresh pghMrDirby
 
WordPress Performance & Scalability
WordPress Performance & ScalabilityWordPress Performance & Scalability
WordPress Performance & ScalabilityJoseph Scott
 
The symfony platform: Create your very own framework (PHP Quebec 2008)
The symfony platform: Create your very own framework (PHP Quebec 2008)The symfony platform: Create your very own framework (PHP Quebec 2008)
The symfony platform: Create your very own framework (PHP Quebec 2008)Fabien Potencier
 

Semelhante a フレームワークxWordPress (20)

symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
symfony: An Open-Source Framework for Professionals (Dutch Php Conference 2008)
 
WordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPressWordCamp SF 2011: Debugging in WordPress
WordCamp SF 2011: Debugging in WordPress
 
Charla - SharePoint en la Nube (17Jul2013)
Charla - SharePoint en la Nube (17Jul2013)Charla - SharePoint en la Nube (17Jul2013)
Charla - SharePoint en la Nube (17Jul2013)
 
Lumberjack 2 - Supercharging WordPress in 2018
Lumberjack 2 - Supercharging WordPress in 2018Lumberjack 2 - Supercharging WordPress in 2018
Lumberjack 2 - Supercharging WordPress in 2018
 
PECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life betterPECL Picks - Extensions to make your life better
PECL Picks - Extensions to make your life better
 
<Head> Presentation: Plugging Into Wordpress
<Head> Presentation: Plugging Into Wordpress<Head> Presentation: Plugging Into Wordpress
<Head> Presentation: Plugging Into Wordpress
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and Puppet
 
Developers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLIDevelopers, Be a Bada$$ with WP-CLI
Developers, Be a Bada$$ with WP-CLI
 
Vagrant WordCamp Hamilton
Vagrant  WordCamp HamiltonVagrant  WordCamp Hamilton
Vagrant WordCamp Hamilton
 
Pecl Picks
Pecl PicksPecl Picks
Pecl Picks
 
Api Design
Api DesignApi Design
Api Design
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
Intro to WordPress Plugin Development
Intro to WordPress Plugin DevelopmentIntro to WordPress Plugin Development
Intro to WordPress Plugin Development
 
Wordpress y Docker, de desarrollo a produccion
Wordpress y Docker, de desarrollo a produccionWordpress y Docker, de desarrollo a produccion
Wordpress y Docker, de desarrollo a produccion
 
Wordpress Plugin Development Short Tutorial
Wordpress Plugin Development Short TutorialWordpress Plugin Development Short Tutorial
Wordpress Plugin Development Short Tutorial
 
WCLA12 JavaScript
WCLA12 JavaScriptWCLA12 JavaScript
WCLA12 JavaScript
 
Building a JavaScript Library
Building a JavaScript LibraryBuilding a JavaScript Library
Building a JavaScript Library
 
Wp3 refresh pgh
Wp3 refresh pghWp3 refresh pgh
Wp3 refresh pgh
 
WordPress Performance & Scalability
WordPress Performance & ScalabilityWordPress Performance & Scalability
WordPress Performance & Scalability
 
The symfony platform: Create your very own framework (PHP Quebec 2008)
The symfony platform: Create your very own framework (PHP Quebec 2008)The symfony platform: Create your very own framework (PHP Quebec 2008)
The symfony platform: Create your very own framework (PHP Quebec 2008)
 

Mais de Sotaro Karasawa

Openpear Project の紹介
Openpear Project の紹介Openpear Project の紹介
Openpear Project の紹介Sotaro Karasawa
 
Modern PHP Programming @ PFI Seminar
Modern PHP Programming @ PFI SeminarModern PHP Programming @ PFI Seminar
Modern PHP Programming @ PFI SeminarSotaro Karasawa
 
PHP Source Code Search with PHP
PHP Source Code Search with PHPPHP Source Code Search with PHP
PHP Source Code Search with PHPSotaro Karasawa
 
新しくなったOpenpear by nequal
新しくなったOpenpear by nequal新しくなったOpenpear by nequal
新しくなったOpenpear by nequalSotaro Karasawa
 
第42PHP勉強会Ethna 発表資料
第42PHP勉強会Ethna 発表資料第42PHP勉強会Ethna 発表資料
第42PHP勉強会Ethna 発表資料Sotaro Karasawa
 
Introduction of openpear
Introduction of openpearIntroduction of openpear
Introduction of openpearSotaro Karasawa
 
超個人的宣伝と2008年PHPのまとめ
超個人的宣伝と2008年PHPのまとめ超個人的宣伝と2008年PHPのまとめ
超個人的宣伝と2008年PHPのまとめSotaro Karasawa
 
openpearについて@楽天テクノロジーカンファレンス
openpearについて@楽天テクノロジーカンファレンスopenpearについて@楽天テクノロジーカンファレンス
openpearについて@楽天テクノロジーカンファレンスSotaro Karasawa
 
Mockingbirdの紹介LT@PHP勉強会
Mockingbirdの紹介LT@PHP勉強会Mockingbirdの紹介LT@PHP勉強会
Mockingbirdの紹介LT@PHP勉強会Sotaro Karasawa
 
Ethna的ActionとView@設計勉強会
Ethna的ActionとView@設計勉強会Ethna的ActionとView@設計勉強会
Ethna的ActionとView@設計勉強会Sotaro Karasawa
 
Mockingbirdイベントハンドリング@拡張機能勉強会
Mockingbirdイベントハンドリング@拡張機能勉強会Mockingbirdイベントハンドリング@拡張機能勉強会
Mockingbirdイベントハンドリング@拡張機能勉強会Sotaro Karasawa
 
Mockingbirdサーバサイド@拡張機能勉強会
Mockingbirdサーバサイド@拡張機能勉強会Mockingbirdサーバサイド@拡張機能勉強会
Mockingbirdサーバサイド@拡張機能勉強会Sotaro Karasawa
 
Mockingbird@拡張機能勉強会
Mockingbird@拡張機能勉強会Mockingbird@拡張機能勉強会
Mockingbird@拡張機能勉強会Sotaro Karasawa
 
Mockingbirdの実装@拡張機能勉強会
Mockingbirdの実装@拡張機能勉強会Mockingbirdの実装@拡張機能勉強会
Mockingbirdの実装@拡張機能勉強会Sotaro Karasawa
 
Mockingbirdのタブバーの実装@拡張機能勉強会
Mockingbirdのタブバーの実装@拡張機能勉強会Mockingbirdのタブバーの実装@拡張機能勉強会
Mockingbirdのタブバーの実装@拡張機能勉強会Sotaro Karasawa
 
第34回PHP勉強会発表資料 SimpleXML
第34回PHP勉強会発表資料 SimpleXML第34回PHP勉強会発表資料 SimpleXML
第34回PHP勉強会発表資料 SimpleXMLSotaro Karasawa
 

Mais de Sotaro Karasawa (20)

Ethna Updates
Ethna UpdatesEthna Updates
Ethna Updates
 
Openpear Project の紹介
Openpear Project の紹介Openpear Project の紹介
Openpear Project の紹介
 
Modern PHP Programming @ PFI Seminar
Modern PHP Programming @ PFI SeminarModern PHP Programming @ PFI Seminar
Modern PHP Programming @ PFI Seminar
 
Internship at PFI
Internship at PFIInternship at PFI
Internship at PFI
 
PHP Source Code Search with PHP
PHP Source Code Search with PHPPHP Source Code Search with PHP
PHP Source Code Search with PHP
 
新しくなったOpenpear by nequal
新しくなったOpenpear by nequal新しくなったOpenpear by nequal
新しくなったOpenpear by nequal
 
第42PHP勉強会Ethna 発表資料
第42PHP勉強会Ethna 発表資料第42PHP勉強会Ethna 発表資料
第42PHP勉強会Ethna 発表資料
 
Introduction of openpear
Introduction of openpearIntroduction of openpear
Introduction of openpear
 
超個人的宣伝と2008年PHPのまとめ
超個人的宣伝と2008年PHPのまとめ超個人的宣伝と2008年PHPのまとめ
超個人的宣伝と2008年PHPのまとめ
 
openpearについて@楽天テクノロジーカンファレンス
openpearについて@楽天テクノロジーカンファレンスopenpearについて@楽天テクノロジーカンファレンス
openpearについて@楽天テクノロジーカンファレンス
 
LT openpear@LL温泉
LT openpear@LL温泉LT openpear@LL温泉
LT openpear@LL温泉
 
PHP超入門@LL温泉
PHP超入門@LL温泉PHP超入門@LL温泉
PHP超入門@LL温泉
 
Mockingbirdの紹介LT@PHP勉強会
Mockingbirdの紹介LT@PHP勉強会Mockingbirdの紹介LT@PHP勉強会
Mockingbirdの紹介LT@PHP勉強会
 
Ethna的ActionとView@設計勉強会
Ethna的ActionとView@設計勉強会Ethna的ActionとView@設計勉強会
Ethna的ActionとView@設計勉強会
 
Mockingbirdイベントハンドリング@拡張機能勉強会
Mockingbirdイベントハンドリング@拡張機能勉強会Mockingbirdイベントハンドリング@拡張機能勉強会
Mockingbirdイベントハンドリング@拡張機能勉強会
 
Mockingbirdサーバサイド@拡張機能勉強会
Mockingbirdサーバサイド@拡張機能勉強会Mockingbirdサーバサイド@拡張機能勉強会
Mockingbirdサーバサイド@拡張機能勉強会
 
Mockingbird@拡張機能勉強会
Mockingbird@拡張機能勉強会Mockingbird@拡張機能勉強会
Mockingbird@拡張機能勉強会
 
Mockingbirdの実装@拡張機能勉強会
Mockingbirdの実装@拡張機能勉強会Mockingbirdの実装@拡張機能勉強会
Mockingbirdの実装@拡張機能勉強会
 
Mockingbirdのタブバーの実装@拡張機能勉強会
Mockingbirdのタブバーの実装@拡張機能勉強会Mockingbirdのタブバーの実装@拡張機能勉強会
Mockingbirdのタブバーの実装@拡張機能勉強会
 
第34回PHP勉強会発表資料 SimpleXML
第34回PHP勉強会発表資料 SimpleXML第34回PHP勉強会発表資料 SimpleXML
第34回PHP勉強会発表資料 SimpleXML
 

Último

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Último (20)

CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

フレームワークxWordPress

  • 1. WordPress (sotarok) http://nequal.jp/ twitter.com/sotarok
  • 2. ( `) • ( `) • Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 3.
  • 4. sotarok • • • • • Ethna • nequal Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 5. CMS • Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 6. Website on – some framework • – – • WordPress Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 7. • PHP 2009 – http://phpcon.php.gr.jp/2009/ – WordPress – Program WordPress Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 8. x WordPress 1 • WordPress • WordPress Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 9. x WordPress 2 • • WordPress Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 11. • • • WP • Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 12. WP • wp-content/themes/default . |-- index.php |-- 404.php |-- ja.mo |-- archive.php |-- ja.po |-- archives.php |-- kubrick.pot |-- comments-popup.php |-- links.php |-- comments.php |-- page.php |-- footer.php |-- rtl.css |-- functions.php |-- screenshot.png |-- header.php |-- search.php |-- image.php |-- sidebar.php |-- images |-- single.php | |-- audio.jpg `-- style.css | |-- ... Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 13. index.php archive.php single.php page.php ... Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 14. header.php footer.php sidebar.php ... Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 15. header, footer • get_header(), get_footer(), header.php, footer.php get_header(); header.php index.php get_footer(); footer.php Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 16. WP • WP CSS header.php [[ WP ]] footer.php Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 17. header.php • • Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 18. header.php <?php // ethna • require_once dirname(__FILE__) . '/../../../../../app/Pcj_Controller.php'; $ethna = new Pcj_Controller(); // $renderer =& $ethna->getRenderer(); $smarty =& $renderer->engine; $smarty->left_delimiter = '{{'; $smarty->right_delimiter = '}}'; $GLOBALS['ethna'] = array( 'ethna' => $ethna, 'renderer' => $renderer, 'smarty' => $smarty, Copyright © nequal, Creative Commons Attribution-Noncommercial ); 2.1 @ WordPress mini seminar.
  • 19. header.php <?php // ethna • require_once dirname(__FILE__) . '/../../../../../app/Pcj_Controller.php'; $ethna = new Pcj_Controller(); // $renderer = $ethna->getRenderer(); $smarty = $renderer->engine; $smarty->left_delimiter = '{{'; $smarty->right_delimiter = '}}'; $GLOBALS['ethna'] = array( 'ethna' => $ethna, 'renderer' => $renderer, 'smarty' => $smarty, Copyright © nequal, Creative Commons Attribution-Noncommercial ); 2.1 @ WordPress mini seminar.
  • 20. header.php <?php // ethna • Ethna require_once dirname(__FILE__) . Smarty '/../../../../../app/Pcj_Controller.php'; $ethna = new Pcj_Controller(); // $renderer = $ethna->getRenderer(); $smarty = $renderer->engine; $smarty->left_delimiter = '{{'; $smarty->right_delimiter = '}}'; $GLOBALS['ethna'] = array( 'ethna' => $ethna, 'renderer' => $renderer, 'smarty' => $smarty, Copyright © nequal, Creative Commons Attribution-Noncommercial ); 2.1 @ WordPress mini seminar.
  • 21. header.php <?php // ethna • require_once dirname(__FILE__) . '/../../../../../app/Pcj_Controller.php'; $ethna = new Pcj_Controller(); footer.php // $renderer = $ethna->getRenderer(); $smarty = $renderer->engine; $smarty->left_delimiter = '{{'; $smarty->right_delimiter = '}}'; $GLOBALS['ethna'] = array( 'ethna' => $ethna, 'renderer' => $renderer, 'smarty' => $smarty, Copyright © nequal, Creative Commons Attribution-Noncommercial ); 2.1 @ WordPress mini seminar.
  • 22. header.php <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?> <?php wp_head(); ?> <?php echo $renderer->perform('layout/header.tpl', true); echo $renderer->perform('layout/globalnavi.tpl', true); ?> <div id="main"> Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 23. header.php ... <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?> <?php wp_head(); ?> <?php echo $renderer->perform('layout/header.tpl', true); WP echo $renderer->perform('layout/globalnavi.tpl', true); ?> <div id="main"> OK HTML Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 24. header.php ... <?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?> <?php wp_head(); ?> <?php echo $renderer->perform('layout/header.tpl', true); echo $renderer->perform('layout/globalnavi.tpl', true); ?> <div id="main"> Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 25. • WP – header, footer OK • • – WordPress • Ethna Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 27. WP • – wp-config.php • DB Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 28. • Ethna PHP – Symfony yaml • ETHNA/etc/appid-ini.php • ETHNA/www/blog/wp-config.php Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 29. • ETHNA/www/blog/wp-config.php <?php /** * WordPress * ... */ /** * Ethna ethna ini.php */ require_once dirname(__FILE__) nequal,'/../../etc/pcj- Copyright © . Creative Commons Attribution-Noncommercial ini.php'; 2.1 @ WordPress mini seminar.
  • 30. • ETHNA/etc/pcj-ini.php <?php /* * pcj-ini.php * * WP define * WP wp-config require * */ define('DB_NAME', 'dbname'); define('DB_USER', 'dbusername'); define('DB_PASSWORD', 'dbpassword'); Commons Attribution-Noncommercial Copyright © nequal, Creative define('DB_HOST', 'localhost'); 2.1 @ WordPress mini seminar.
  • 31. • ETHNA/etc/pcj-ini.php ( ) $config = array( // site 'url' => 'http://phpcon.php.gr.jp/', // debug // false 'debug' => false, // db // sample-1: single db 'dsn' => 'mysql://' . DB_USER . ':' . DB_PASSWORD . '@' . DB_HOST . © '/' Creative Commons Attribution-Noncommercial Copyright nequal, . DB_NAME, ... 2.1 @ WordPress mini seminar.
  • 32. WP • DB – wp_comments – wp_links – wp_options – wp_postmeta – wp_posts – wp_terms – wp_term_relationships – wp_term_taxonomy – wp_usermeta – wp_users Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 33. • Ethna ORM <?php class Pcj_DB_WpPosts extends Pcj_DB { public $table_name = 'wp_posts'; } • – ORM Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 34. $entry = $this->db->Wp_Posts->find( D::D_FIRST, array( 'post_status' => 'publish', 'post_type' => 'post', 'order' => 'post_date DESC', ) ); $this->af->setApp('blog_post_data', $entry); Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 35. / • • HTML • • • • Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 36. SQL • – WP – Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 37. -> • • • • Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 38. • WP • WP (^^; • PHP ( • Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.
  • 39. • WordPress – • – 1. • WP • – 2. DB • DB • Copyright © nequal, Creative Commons Attribution-Noncommercial 2.1 @ WordPress mini seminar.