SlideShare a Scribd company logo
1 of 22
Programming Background
for WordPress

                            Barnabas Kim
                            Mobile Augmented Reality
                            July 22, 2012

                            REV 3: WW22 | 2011


FOR ALL KINDS OF PURPOSES
TABLE OF CONTENTS

    WE WILL COVER THE BELOW TOPICS TODAY:
    • TOPICS
      1.       Preliminaries
      2.       PHP Tutorial for WordPress
      3.       Anatomy of a WordPress theme




    Mobile Augmented Reality
                                                Intel Corporation
2   FOR ALL KINDS OF PURPOSES   July 22, 2012
Topic #1:
    Preliminaries




3   FOR ALL KINDS OF PURPOSES   Intel Corporation
BASIC CONCEPTS:
    Web Server Stacks

                                    Web Applications
                                     (WordPress)



                                      PHP Parser
          SOFTWARE                (Server-side script)

                                Apache Web Server (80)         MySQL DB Server (3306)



                                       Operating System (Linux / MacOS / Windows)




          HARDWARE                                  SERVER (or PC)




    Mobile Augmented Reality
                                                                          Intel Corporation
4   FOR ALL KINDS OF PURPOSES    July 22, 2012
BASIC CONCEPTS:                              2. Web Server:
    Client↔Server Interaction                    Response to the requested URL
                                                 based on the setting
                                                     Port: 80
    1. USER: Request URL (via Web Browser)           Host: wordpress.org
    http://wordpress.org                             IP: 72.233.56.139
                                                     URL: /


                                                   Apache Web Server (80)


                                                 3.
    4.                                           Read and parse the corresponding file
    Print the parsed webpage to the browser         /home/wordpress/index.php

                                                  <html>
                                                  <body>
                                                  <div><?php echo “Wordpress”; ?></div>
                                                  </body>
                                                  </html>

                                                             Parse

                                                  <html>
                                                  <body>
                                                  <div>Wordpress</div>
                                                  </body>
                                                  </html>



     Mobile Augmented Reality
                                                                     Intel Corporation
5    FOR ALL KINDS OF PURPOSES   July 22, 2012
Topic #2:
    PHP Tutorial
    for WordPress




6   FOR ALL KINDS OF PURPOSES   Intel Corporation
PHP Tutorial for WordPress

    • Contents
      1.       What is PHP? PHP vs. HTML
      2.       How do I insert PHP into a web page?
      3.       Variables
      4.       Conditional statements
      5.       Functions


    • Reference
      – http://adambrown.info/b/widgets/easy-php-tutorial-for-wordpress-
        users/




    Mobile Augmented Reality
                                                          Intel Corporation
7   FOR ALL KINDS OF PURPOSES   July 22, 2012
PHP Tutorial:
    1. What is PHP?
    • PHP is Server-side script that makes webpage dynamic.
      – Static Web page:
          – <p>Today is July 22, 2012</p>
      – Dynamic Web page:
          – <p>Today is <?php echo date(“F j, Y”); ?>


    • PHP code does not get sent to the browser, only the
      HTML that the PHP parser produces.




    Mobile Augmented Reality
                                                        Intel Corporation
8   FOR ALL KINDS OF PURPOSES   July 22, 2012
PHP Tutorial:
    2. How do I insert PHP into web page?
    •    PHP codes should be wrapped by <?php … ?> or <? … ?>
        – <div>
        – <?php
        – $var1 = “Hi, WordPress!”; ⁄⁄ two slashes indicate that everything until
          the end of the line is a comment
        – $var2 = “Hi, Man!”;
        – /*
        – if your comment spans more than one line,
        – like this one, use the slash-asterisk format.
        – */
        – echo $var1; echo “<br/>”;
        – echo $var2; echo “<br/>”;
        – ?>
        – </div>



    Mobile Augmented Reality
                                                                   Intel Corporation
9   FOR ALL KINDS OF PURPOSES   July 22, 2012
PHP Tutorial:
     3. Variables (1/2)
     •    A variable is always written with $ at the beginning, and the
          alphabetical words from the second letter.
     •    For string values, it should be enclosed with „ (apostrophe) or “
          (quotes). Every line should be ends with ; (semicolon)
         – <?php
         – $nDate = 22;
         – $myFirstName = “Barnabas”;
         – $myFamilyName = „Kim‟;
         – ?>


     •    Note that,
         1. Case sensitive:
           – e.g. $myname, $myName are totally different variables.
         2. Does not allow to starts with „number‟ or „special character‟:
           – e.g. $_myname (X), $1234 (X) are not correct.




     Mobile Augmented Reality
                                                                             Intel Corporation
10   FOR ALL KINDS OF PURPOSES      July 22, 2012
PHP Tutorial:
     3. Variables (2/2)
     •       To display the contents of a variable on the web page, just use
             echo. You should allocate variables before using echo.
         –   <?php
         –   $nDate = 22;
         –   echo $nDate;
         –   ?>


     •       To append something to an existing variable, use . (dot)
         –   <?php
         –   $date = 22;
         –   $month = “July”;
         –   $year = 2012;
         –   $strToday = $month.” ”.$date.”, ”.$year;
         –   ?>


     Mobile Augmented Reality
                                                                Intel Corporation
11   FOR ALL KINDS OF PURPOSES   July 22, 2012
PHP Tutorial:
     4. Conditional Statements
     •    Conditional statements checks condition before proceeding or to repeat
          a block of code multiple times.
         – Control statements:
           – if .. elseif .. else
           – <?php
           – $var = 10;
           – if($var == 5){
             – echo “5 in the variable”;
           – }else if($var > 5){
             – echo “The variable has the value bigger than 5”;
           – }else{
             – echo “The variable has the value smaller than 5”;
           –}
           – ?>
         – Loop: while, for, foreach (These are not covered in this tutorial.)



     Mobile Augmented Reality
                                                                             Intel Corporation
12   FOR ALL KINDS OF PURPOSES      July 22, 2012
PHP Tutorial:
     5. Functions (1/2)
     •       If a function is called (sometimes with input parameters), the
             function returns values (sometimes not).
         –   <?php
         –   echo date(“Y-m-d”);
         –   echo time();
         –   include(“header.php”);
         –   ?>


     •       A function can be regarded as a variable.
         – <?php
         – if(date(“Y-m-d”) == “2012-07-22”){
           – echo “Today is 2012-07-22”;
         – }
         – ?>


     Mobile Augmented Reality
                                                                Intel Corporation
13   FOR ALL KINDS OF PURPOSES   July 22, 2012
PHP Tutorial:
     5. Functions (2/2)
     There are two types of functions
     1.    Internal (built-in) functions:
       – String, Variable, Image Functions, …
       – Function Reference: http://www.php.net/manual/en/funcref.php
       – e.g.
       – <?php
       – $var1 = “Hello!”;
       – echo str_replace(“He”, “”, $var1); // llo!
       – ?>
     2.    User-defined functions
       – <?php
       – function add($a, $b){
           – return $a+$b;
       – }
       – echo add(100, 200); // 300
       – ?>


     Mobile Augmented Reality
                                                                        Intel Corporation
14   FOR ALL KINDS OF PURPOSES      July 22, 2012
Topic #3:
     Anatomy Of A
     WordPress Theme




15   FOR ALL KINDS OF PURPOSES   Intel Corporation
Anatomy of a WordPress theme

     • Contents
       1.       Main Parts
       2.       Sections for “The Loop”
       3.       The Loop
       4.       Additional Files
       5.       The Extras


     • Reference
       – http://yoast.com/wordpress-theme-anatomy/




     Mobile Augmented Reality
                                                     Intel Corporation
16   FOR ALL KINDS OF PURPOSES   July 22, 2012
Anatomy of a WordPress theme:
     Main Parts




     Mobile Augmented Reality
                                                 Intel Corporation
17   FOR ALL KINDS OF PURPOSES   July 22, 2012
Anatomy of a WordPress theme:
     Sections for “The Loop”




     Mobile Augmented Reality
                                                 Intel Corporation
18   FOR ALL KINDS OF PURPOSES   July 22, 2012
Anatomy of a WordPress theme:
     The Loop




     Mobile Augmented Reality
                                                 Intel Corporation
19   FOR ALL KINDS OF PURPOSES   July 22, 2012
Anatomy of a WordPress theme:
     Additional Files




     Mobile Augmented Reality
                                                 Intel Corporation
20   FOR ALL KINDS OF PURPOSES   July 22, 2012
Anatomy of a WordPress theme:
     The Extras




     Mobile Augmented Reality
                                                 Intel Corporation
21   FOR ALL KINDS OF PURPOSES   July 22, 2012
Thank you for your attention!
       any Question?

More Related Content

What's hot

Building an HTML5 Video Player
Building an HTML5 Video PlayerBuilding an HTML5 Video Player
Building an HTML5 Video PlayerJim Jeffers
 
How browser engines work?
How browser engines work?How browser engines work?
How browser engines work?haricot
 
HTML5 Real-Time and Connectivity
HTML5 Real-Time and ConnectivityHTML5 Real-Time and Connectivity
HTML5 Real-Time and ConnectivityPeter Lubbers
 
ZF2 Modular Architecture - Taking advantage of it
ZF2 Modular Architecture - Taking advantage of itZF2 Modular Architecture - Taking advantage of it
ZF2 Modular Architecture - Taking advantage of itSteve Maraspin
 
TangoWithDjango - ch8
TangoWithDjango - ch8TangoWithDjango - ch8
TangoWithDjango - ch8Asika Kuo
 
Introduction To Dojo
Introduction To DojoIntroduction To Dojo
Introduction To Dojoyoavrubin
 
Render Caching for Drupal 8
Render Caching for Drupal 8Render Caching for Drupal 8
Render Caching for Drupal 8John Doyle
 
A JCR View of the World - adaptTo() 2012 Berlin
A JCR View of the World - adaptTo() 2012 BerlinA JCR View of the World - adaptTo() 2012 Berlin
A JCR View of the World - adaptTo() 2012 BerlinAlexander Klimetschek
 
Moving to Dojo 1.7 and the path to 2.0
Moving to Dojo 1.7 and the path to 2.0Moving to Dojo 1.7 and the path to 2.0
Moving to Dojo 1.7 and the path to 2.0James Thomas
 
[DSBW Spring 2009] Unit 02: Web Technologies (2/2)
[DSBW Spring 2009] Unit 02: Web Technologies (2/2)[DSBW Spring 2009] Unit 02: Web Technologies (2/2)
[DSBW Spring 2009] Unit 02: Web Technologies (2/2)Carles Farré
 
Drupal8 migrate
Drupal8 migrateDrupal8 migrate
Drupal8 migrateJohn Doyle
 
Making the HTML5 Video element interactive
Making the HTML5 Video element interactiveMaking the HTML5 Video element interactive
Making the HTML5 Video element interactiveCharles Hudson
 
Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Doug Hawkins
 
jQuery Mobile: For Fun and Profit
jQuery Mobile: For Fun and ProfitjQuery Mobile: For Fun and Profit
jQuery Mobile: For Fun and ProfitDaniel Cousineau
 
Optaros Surf Code Camp Api
Optaros Surf Code Camp ApiOptaros Surf Code Camp Api
Optaros Surf Code Camp ApiJeff Potts
 

What's hot (20)

Building an HTML5 Video Player
Building an HTML5 Video PlayerBuilding an HTML5 Video Player
Building an HTML5 Video Player
 
How browser engines work?
How browser engines work?How browser engines work?
How browser engines work?
 
HTML5 Real-Time and Connectivity
HTML5 Real-Time and ConnectivityHTML5 Real-Time and Connectivity
HTML5 Real-Time and Connectivity
 
Zero To Dojo
Zero To DojoZero To Dojo
Zero To Dojo
 
ZF2 Modular Architecture - Taking advantage of it
ZF2 Modular Architecture - Taking advantage of itZF2 Modular Architecture - Taking advantage of it
ZF2 Modular Architecture - Taking advantage of it
 
TangoWithDjango - ch8
TangoWithDjango - ch8TangoWithDjango - ch8
TangoWithDjango - ch8
 
Introduction To Dojo
Introduction To DojoIntroduction To Dojo
Introduction To Dojo
 
Render Caching for Drupal 8
Render Caching for Drupal 8Render Caching for Drupal 8
Render Caching for Drupal 8
 
A JCR View of the World - adaptTo() 2012 Berlin
A JCR View of the World - adaptTo() 2012 BerlinA JCR View of the World - adaptTo() 2012 Berlin
A JCR View of the World - adaptTo() 2012 Berlin
 
Moving to Dojo 1.7 and the path to 2.0
Moving to Dojo 1.7 and the path to 2.0Moving to Dojo 1.7 and the path to 2.0
Moving to Dojo 1.7 and the path to 2.0
 
Introduction to Zend Framework
Introduction to Zend FrameworkIntroduction to Zend Framework
Introduction to Zend Framework
 
[DSBW Spring 2009] Unit 02: Web Technologies (2/2)
[DSBW Spring 2009] Unit 02: Web Technologies (2/2)[DSBW Spring 2009] Unit 02: Web Technologies (2/2)
[DSBW Spring 2009] Unit 02: Web Technologies (2/2)
 
Drupal8 migrate
Drupal8 migrateDrupal8 migrate
Drupal8 migrate
 
Making the HTML5 Video element interactive
Making the HTML5 Video element interactiveMaking the HTML5 Video element interactive
Making the HTML5 Video element interactive
 
Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011Inside Android's Dalvik VM - NEJUG Nov 2011
Inside Android's Dalvik VM - NEJUG Nov 2011
 
Complete Dojo
Complete DojoComplete Dojo
Complete Dojo
 
jQuery Mobile: For Fun and Profit
jQuery Mobile: For Fun and ProfitjQuery Mobile: For Fun and Profit
jQuery Mobile: For Fun and Profit
 
Optaros Surf Code Camp Api
Optaros Surf Code Camp ApiOptaros Surf Code Camp Api
Optaros Surf Code Camp Api
 
Dojo toolkit
Dojo toolkitDojo toolkit
Dojo toolkit
 
Web Apps
Web AppsWeb Apps
Web Apps
 

Viewers also liked

Exploratory Analysis
Exploratory AnalysisExploratory Analysis
Exploratory AnalysisAn Wang
 
Without Singing The World Would Be Barren
Without Singing The World Would Be BarrenWithout Singing The World Would Be Barren
Without Singing The World Would Be BarrenRenny
 
Engaging Teens: taking health class out of the classroom
Engaging Teens: taking health class out of the classroomEngaging Teens: taking health class out of the classroom
Engaging Teens: taking health class out of the classroomJessica Ken
 
Hiring trends 2012
Hiring trends 2012Hiring trends 2012
Hiring trends 2012Lynn Hazan
 
Node workShop Basic
Node workShop BasicNode workShop Basic
Node workShop BasicCaesar Chi
 
Dr Chris Stout Outcomes Management
Dr Chris Stout Outcomes ManagementDr Chris Stout Outcomes Management
Dr Chris Stout Outcomes ManagementDr. Chris Stout
 
Creating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPressCreating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPressHristo Chakarov
 
6. Identyfikowanie i charakteryzowanie jednostki centralnej komputera
6. Identyfikowanie i charakteryzowanie jednostki centralnej komputera6. Identyfikowanie i charakteryzowanie jednostki centralnej komputera
6. Identyfikowanie i charakteryzowanie jednostki centralnej komputerakalaxq
 
09NTC: Your Website as an Experience of Your Brand (PETA)
09NTC: Your Website as an Experience of Your Brand (PETA)09NTC: Your Website as an Experience of Your Brand (PETA)
09NTC: Your Website as an Experience of Your Brand (PETA)Farra Trompeter, Big Duck
 
包小強的真心告白
包小強的真心告白包小強的真心告白
包小強的真心告白lu13589
 
Recruitment 2016: Playing the Long Game with Your Lead Pool
Recruitment 2016: Playing the Long Game with Your Lead PoolRecruitment 2016: Playing the Long Game with Your Lead Pool
Recruitment 2016: Playing the Long Game with Your Lead PoolConverge Consulting
 
Content Marketing Strategic Workshop Presentation
Content Marketing Strategic Workshop PresentationContent Marketing Strategic Workshop Presentation
Content Marketing Strategic Workshop PresentationLinkedIn Canada
 
鄧宗業 菸商行銷策略
鄧宗業 菸商行銷策略鄧宗業 菸商行銷策略
鄧宗業 菸商行銷策略None
 
Linkedin groups: An Implementation Aid
Linkedin groups: An Implementation AidLinkedin groups: An Implementation Aid
Linkedin groups: An Implementation AidRaghunath Ramaswamy
 
Analisis foda
Analisis fodaAnalisis foda
Analisis fodaleodeg
 

Viewers also liked (18)

Exploratory Analysis
Exploratory AnalysisExploratory Analysis
Exploratory Analysis
 
Without Singing The World Would Be Barren
Without Singing The World Would Be BarrenWithout Singing The World Would Be Barren
Without Singing The World Would Be Barren
 
Engaging Teens: taking health class out of the classroom
Engaging Teens: taking health class out of the classroomEngaging Teens: taking health class out of the classroom
Engaging Teens: taking health class out of the classroom
 
Problemas ambientales
Problemas ambientalesProblemas ambientales
Problemas ambientales
 
Hiring trends 2012
Hiring trends 2012Hiring trends 2012
Hiring trends 2012
 
Node workShop Basic
Node workShop BasicNode workShop Basic
Node workShop Basic
 
Dr Chris Stout Outcomes Management
Dr Chris Stout Outcomes ManagementDr Chris Stout Outcomes Management
Dr Chris Stout Outcomes Management
 
Channel strip (mixer)
Channel strip (mixer)Channel strip (mixer)
Channel strip (mixer)
 
Creating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPressCreating Extensible Plugins for WordPress
Creating Extensible Plugins for WordPress
 
Banned Books
Banned BooksBanned Books
Banned Books
 
6. Identyfikowanie i charakteryzowanie jednostki centralnej komputera
6. Identyfikowanie i charakteryzowanie jednostki centralnej komputera6. Identyfikowanie i charakteryzowanie jednostki centralnej komputera
6. Identyfikowanie i charakteryzowanie jednostki centralnej komputera
 
09NTC: Your Website as an Experience of Your Brand (PETA)
09NTC: Your Website as an Experience of Your Brand (PETA)09NTC: Your Website as an Experience of Your Brand (PETA)
09NTC: Your Website as an Experience of Your Brand (PETA)
 
包小強的真心告白
包小強的真心告白包小強的真心告白
包小強的真心告白
 
Recruitment 2016: Playing the Long Game with Your Lead Pool
Recruitment 2016: Playing the Long Game with Your Lead PoolRecruitment 2016: Playing the Long Game with Your Lead Pool
Recruitment 2016: Playing the Long Game with Your Lead Pool
 
Content Marketing Strategic Workshop Presentation
Content Marketing Strategic Workshop PresentationContent Marketing Strategic Workshop Presentation
Content Marketing Strategic Workshop Presentation
 
鄧宗業 菸商行銷策略
鄧宗業 菸商行銷策略鄧宗業 菸商行銷策略
鄧宗業 菸商行銷策略
 
Linkedin groups: An Implementation Aid
Linkedin groups: An Implementation AidLinkedin groups: An Implementation Aid
Linkedin groups: An Implementation Aid
 
Analisis foda
Analisis fodaAnalisis foda
Analisis foda
 

Similar to 20120722 word press

Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM iZend by Rogue Wave Software
 
PHP and Zend Framework on Windows
PHP and Zend Framework on WindowsPHP and Zend Framework on Windows
PHP and Zend Framework on WindowsShahar Evron
 
NLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerNLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerEric D. Schabell
 
Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuAppUniverz Org
 
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
 
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Bastian Feder
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Bastian Feder
 
Debugging with Zend Studio for Eclipse
Debugging with Zend Studio for EclipseDebugging with Zend Studio for Eclipse
Debugging with Zend Studio for EclipseOSSCube
 
MVC with Zend Framework
MVC with Zend FrameworkMVC with Zend Framework
MVC with Zend Frameworkwebholics
 
Integrating PHP With System-i using Web Services
Integrating PHP With System-i using Web ServicesIntegrating PHP With System-i using Web Services
Integrating PHP With System-i using Web ServicesIvo Jansch
 
Starting with PHP and Web devepolment
Starting with PHP and Web devepolmentStarting with PHP and Web devepolment
Starting with PHP and Web devepolmentRajib Ahmed
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code IgniterAmzad Hossain
 
Benefit of CodeIgniter php framework
Benefit of CodeIgniter php frameworkBenefit of CodeIgniter php framework
Benefit of CodeIgniter php frameworkBo-Yi Wu
 
How Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web DevelopmentHow Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web DevelopmentBruno Borges
 
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTYWilliam Chong
 
Codemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift PrimerCodemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift PrimerEric D. Schabell
 
Howtobuildyourownframework
HowtobuildyourownframeworkHowtobuildyourownframework
Howtobuildyourownframeworkhazzaz
 
ColdFusion 11 Overview - CFSummit 2013
ColdFusion 11 Overview - CFSummit 2013ColdFusion 11 Overview - CFSummit 2013
ColdFusion 11 Overview - CFSummit 2013Rupesh Kumar
 
Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDTBastian Feder
 
Introduction into PHP5 (Jeroen van Sluijs)
Introduction into PHP5 (Jeroen van Sluijs)Introduction into PHP5 (Jeroen van Sluijs)
Introduction into PHP5 (Jeroen van Sluijs)Stefan Koopmanschap
 

Similar to 20120722 word press (20)

Building and managing applications fast for IBM i
Building and managing applications fast for IBM iBuilding and managing applications fast for IBM i
Building and managing applications fast for IBM i
 
PHP and Zend Framework on Windows
PHP and Zend Framework on WindowsPHP and Zend Framework on Windows
PHP and Zend Framework on Windows
 
NLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift PrimerNLUUG Spring 2012 - OpenShift Primer
NLUUG Spring 2012 - OpenShift Primer
 
Week 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. WuWeek 05 Web, App and Javascript_Brandon, S.H. Wu
Week 05 Web, App and Javascript_Brandon, S.H. Wu
 
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)
 
Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1Debugging PHP with xDebug inside of Eclipse PDT 2.1
Debugging PHP with xDebug inside of Eclipse PDT 2.1
 
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
Advanced Eclipse Workshop (held at IPC2010 -spring edition-)
 
Debugging with Zend Studio for Eclipse
Debugging with Zend Studio for EclipseDebugging with Zend Studio for Eclipse
Debugging with Zend Studio for Eclipse
 
MVC with Zend Framework
MVC with Zend FrameworkMVC with Zend Framework
MVC with Zend Framework
 
Integrating PHP With System-i using Web Services
Integrating PHP With System-i using Web ServicesIntegrating PHP With System-i using Web Services
Integrating PHP With System-i using Web Services
 
Starting with PHP and Web devepolment
Starting with PHP and Web devepolmentStarting with PHP and Web devepolment
Starting with PHP and Web devepolment
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code Igniter
 
Benefit of CodeIgniter php framework
Benefit of CodeIgniter php frameworkBenefit of CodeIgniter php framework
Benefit of CodeIgniter php framework
 
How Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web DevelopmentHow Scala, Wicket, and Java EE Can Improve Web Development
How Scala, Wicket, and Java EE Can Improve Web Development
 
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
5 年後還是新手 - WordPress Plugin 開發大冒險 - GOTY
 
Codemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift PrimerCodemotion 2012 Rome - An OpenShift Primer
Codemotion 2012 Rome - An OpenShift Primer
 
Howtobuildyourownframework
HowtobuildyourownframeworkHowtobuildyourownframework
Howtobuildyourownframework
 
ColdFusion 11 Overview - CFSummit 2013
ColdFusion 11 Overview - CFSummit 2013ColdFusion 11 Overview - CFSummit 2013
ColdFusion 11 Overview - CFSummit 2013
 
Php Development With Eclipde PDT
Php Development With Eclipde PDTPhp Development With Eclipde PDT
Php Development With Eclipde PDT
 
Introduction into PHP5 (Jeroen van Sluijs)
Introduction into PHP5 (Jeroen van Sluijs)Introduction into PHP5 (Jeroen van Sluijs)
Introduction into PHP5 (Jeroen van Sluijs)
 

Recently uploaded

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 

Recently uploaded (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 

20120722 word press

  • 1. Programming Background for WordPress Barnabas Kim Mobile Augmented Reality July 22, 2012 REV 3: WW22 | 2011 FOR ALL KINDS OF PURPOSES
  • 2. TABLE OF CONTENTS WE WILL COVER THE BELOW TOPICS TODAY: • TOPICS 1. Preliminaries 2. PHP Tutorial for WordPress 3. Anatomy of a WordPress theme Mobile Augmented Reality Intel Corporation 2 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 3. Topic #1: Preliminaries 3 FOR ALL KINDS OF PURPOSES Intel Corporation
  • 4. BASIC CONCEPTS: Web Server Stacks Web Applications (WordPress) PHP Parser SOFTWARE (Server-side script) Apache Web Server (80) MySQL DB Server (3306) Operating System (Linux / MacOS / Windows) HARDWARE SERVER (or PC) Mobile Augmented Reality Intel Corporation 4 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 5. BASIC CONCEPTS: 2. Web Server: Client↔Server Interaction Response to the requested URL based on the setting Port: 80 1. USER: Request URL (via Web Browser) Host: wordpress.org http://wordpress.org IP: 72.233.56.139 URL: / Apache Web Server (80) 3. 4. Read and parse the corresponding file Print the parsed webpage to the browser /home/wordpress/index.php <html> <body> <div><?php echo “Wordpress”; ?></div> </body> </html> Parse <html> <body> <div>Wordpress</div> </body> </html> Mobile Augmented Reality Intel Corporation 5 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 6. Topic #2: PHP Tutorial for WordPress 6 FOR ALL KINDS OF PURPOSES Intel Corporation
  • 7. PHP Tutorial for WordPress • Contents 1. What is PHP? PHP vs. HTML 2. How do I insert PHP into a web page? 3. Variables 4. Conditional statements 5. Functions • Reference – http://adambrown.info/b/widgets/easy-php-tutorial-for-wordpress- users/ Mobile Augmented Reality Intel Corporation 7 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 8. PHP Tutorial: 1. What is PHP? • PHP is Server-side script that makes webpage dynamic. – Static Web page: – <p>Today is July 22, 2012</p> – Dynamic Web page: – <p>Today is <?php echo date(“F j, Y”); ?> • PHP code does not get sent to the browser, only the HTML that the PHP parser produces. Mobile Augmented Reality Intel Corporation 8 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 9. PHP Tutorial: 2. How do I insert PHP into web page? • PHP codes should be wrapped by <?php … ?> or <? … ?> – <div> – <?php – $var1 = “Hi, WordPress!”; ⁄⁄ two slashes indicate that everything until the end of the line is a comment – $var2 = “Hi, Man!”; – /* – if your comment spans more than one line, – like this one, use the slash-asterisk format. – */ – echo $var1; echo “<br/>”; – echo $var2; echo “<br/>”; – ?> – </div> Mobile Augmented Reality Intel Corporation 9 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 10. PHP Tutorial: 3. Variables (1/2) • A variable is always written with $ at the beginning, and the alphabetical words from the second letter. • For string values, it should be enclosed with „ (apostrophe) or “ (quotes). Every line should be ends with ; (semicolon) – <?php – $nDate = 22; – $myFirstName = “Barnabas”; – $myFamilyName = „Kim‟; – ?> • Note that, 1. Case sensitive: – e.g. $myname, $myName are totally different variables. 2. Does not allow to starts with „number‟ or „special character‟: – e.g. $_myname (X), $1234 (X) are not correct. Mobile Augmented Reality Intel Corporation 10 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 11. PHP Tutorial: 3. Variables (2/2) • To display the contents of a variable on the web page, just use echo. You should allocate variables before using echo. – <?php – $nDate = 22; – echo $nDate; – ?> • To append something to an existing variable, use . (dot) – <?php – $date = 22; – $month = “July”; – $year = 2012; – $strToday = $month.” ”.$date.”, ”.$year; – ?> Mobile Augmented Reality Intel Corporation 11 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 12. PHP Tutorial: 4. Conditional Statements • Conditional statements checks condition before proceeding or to repeat a block of code multiple times. – Control statements: – if .. elseif .. else – <?php – $var = 10; – if($var == 5){ – echo “5 in the variable”; – }else if($var > 5){ – echo “The variable has the value bigger than 5”; – }else{ – echo “The variable has the value smaller than 5”; –} – ?> – Loop: while, for, foreach (These are not covered in this tutorial.) Mobile Augmented Reality Intel Corporation 12 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 13. PHP Tutorial: 5. Functions (1/2) • If a function is called (sometimes with input parameters), the function returns values (sometimes not). – <?php – echo date(“Y-m-d”); – echo time(); – include(“header.php”); – ?> • A function can be regarded as a variable. – <?php – if(date(“Y-m-d”) == “2012-07-22”){ – echo “Today is 2012-07-22”; – } – ?> Mobile Augmented Reality Intel Corporation 13 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 14. PHP Tutorial: 5. Functions (2/2) There are two types of functions 1. Internal (built-in) functions: – String, Variable, Image Functions, … – Function Reference: http://www.php.net/manual/en/funcref.php – e.g. – <?php – $var1 = “Hello!”; – echo str_replace(“He”, “”, $var1); // llo! – ?> 2. User-defined functions – <?php – function add($a, $b){ – return $a+$b; – } – echo add(100, 200); // 300 – ?> Mobile Augmented Reality Intel Corporation 14 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 15. Topic #3: Anatomy Of A WordPress Theme 15 FOR ALL KINDS OF PURPOSES Intel Corporation
  • 16. Anatomy of a WordPress theme • Contents 1. Main Parts 2. Sections for “The Loop” 3. The Loop 4. Additional Files 5. The Extras • Reference – http://yoast.com/wordpress-theme-anatomy/ Mobile Augmented Reality Intel Corporation 16 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 17. Anatomy of a WordPress theme: Main Parts Mobile Augmented Reality Intel Corporation 17 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 18. Anatomy of a WordPress theme: Sections for “The Loop” Mobile Augmented Reality Intel Corporation 18 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 19. Anatomy of a WordPress theme: The Loop Mobile Augmented Reality Intel Corporation 19 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 20. Anatomy of a WordPress theme: Additional Files Mobile Augmented Reality Intel Corporation 20 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 21. Anatomy of a WordPress theme: The Extras Mobile Augmented Reality Intel Corporation 21 FOR ALL KINDS OF PURPOSES July 22, 2012
  • 22. Thank you for your attention! any Question?

Editor's Notes

  1. 하드웨어가 제일 아래에 있고,그 위에 소프트웨어가 설치되어있는데,소프트웨어의 제일 아랫단에는 운영체제가 있습니다.여러종류의 운영체제가 있을 수 있지만, PHP는 Linux 운영체제에서 가장 좋은 성능을 보입니다.웹사이트를 운영하기 위해서는 Web Server 가 설치되어야 합니다. Web Server 는 Opensource인 Apache Web Server를 사용합니다.흔히 우리가 서버라고 말하면, 소프트웨어로 구현된 웹서버를 지칭하는 경우가 많습니다. 웹사이트의 데이터를 저장하기 위해 DB Server 도 설치되어 있어야 하는데,보통 MySQL 을 사용합니다.여기 보면 숫자가 써있는데, 이건 서버가 사용하는 포트번호입니다.하나의 물리적인 서버에서 수십 수백개의 서버를 운영할 수 있는 것은, 바로 이처럼 서로 다른 포트를 사용하기 때문에 가능한 것입니다.웹서버는 보통 80포트를 통해서 운영됩니다. PHP는 Apache Web Server 에 모듈 형태로 설치가 되는데, Apache Web Server는 원래 HTML만 처리할 수 있지만, PHP Parser가 설치 되면, PHP코드를 서버가 읽어서 HTML로 변환해줄수가 있게 됩니다. 따라서 Parser라는건 일종의 번역기라고 할 수 있겠습니다.