• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Phpで作るmovable typeプラグイン
 

Phpで作るmovable typeプラグイン

on

  • 2,156 views

PHP

PHP

Statistics

Views

Total Views
2,156
Views on SlideShare
1,704
Embed Views
452

Actions

Likes
0
Downloads
3
Comments
0

3 Embeds 452

http://www.koikikukan.com 432
http://koikikukan.com 18
http://112.78.121.21 2

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Phpで作るmovable typeプラグイン Phpで作るmovable typeプラグイン Presentation Transcript

  • Dynamic Publishing ...
  • Block ...
  • $repeat true2 $repeat false Block MTIf smarty_block_TAGNAMEstash Stash 2 Stash Stash Stash
  • $repeat true2 $repeat false Block MTIf smarty_block_TAGNAMEstash Stash 2 Stash Stash Stash
  • $repeat true2 $repeat false Block MTIf smarty_block_TAGNAMEstash Stash 2 Stash Stash Stash
  • $repeat true2 $repeat false Block MTIf smarty_block_TAGNAMEstash Stash 2 Stash Stash Stash
  • $repeat true2 $repeat false Block MTIf smarty_block_TAGNAMEstash Stash 2 Stash Stash Stash
  • $repeat true2 $repeat false Block MTIf smarty_block_TAGNAMEstash Stash 2 Stash Stash Stash
  • $repeat true2 $repeat false Block MTIf smarty_block_TAGNAMEstash Stash 2 Stash Stash Stash
  • $repeat true2 $repeat false Block MTIf smarty_block_TAGNAMEstash Stash 2 Stash Stash Stash
  • $repeat true2 $repeat false Block MTIf smarty_block_TAGNAMEstash Stash 2 Stash Stash Stash
  • $repeat true2 $repeat false Block MTIf smarty_block_TAGNAMEstash Stash 2 Stash Stash Stash
  • $repeat true2 $repeat false Block MTIf smarty_block_TAGNAMEstash Stash 2 Stash Stash Stash
  • Function ...
  • smarty_function_TAGNAMEStash
  • smarty_function_TAGNAMEStash
  • smarty_function_TAGNAMEStash
  • Modifier ...
  • smarty_modifier_MODIFIERNAME $text Modifier
  • smarty_modifier_MODIFIERNAME $text Modifier
  • smarty_modifier_MODIFIERNAME $text Modifier
  • $mt = MT::get_instance();$db = $mt->db();$args[‘limit’] = 10;$args[‘offset’] = 10;$entries = $db->fetch_entries( $args );if ( !empty( $entries ) ) { foreach ( $entries as $e ) { // do something... }}
  • $mt = MT::get_instance();$db = $mt->db();$where = “entry_id = 1 and placement_blog_id = 1”;$extra[‘join’] = array( ‘mt_placement’ => array( ‘condition’ => ‘placement_entry_id = entry_id’ ),);$extra[‘distinct’] = ‘distinct’;$extra[‘limit’] = 1;require_once( ‘class_mt_entry.php’ );$class = New Entry;$entries = $class->Find( $where, false, false, $extra );if ( empty( $entries ) ) return null;$entry = $entries[0];
  • $mt = MT::get_instance();$db = $mt->db();$sql = “delete from mt_session”;$db->Execute( $sql );
  • $mt = MT::get_instance();$db = $mt->db();require_once(‘class.mt_entry.php’);$entry = New Entry;$entry->title = ‘Hello, world.”;$entry->blog_id = 1;$entry->author_id = 1;$entry->save();
  • $mt = MT::get_instance();$db = $mt->db();require_once(‘class.mt_blog.php’);$blog = New Blog;$blog->Load( ‘blog_id = 1’ );echo $blog->id;echo $blog->blog_page_layout;
  • require_once(‘class.baseobject.php’);class NewObject extends BaseObject{ public $_table = ‘mt_newobject’; protected $_prefix = ‘newobject_’; protected $_has_meta = true;}ADODB_Active_Record::ClassHasMany( NewObject, mt_newobject_meta, newobject_meta_newobject_id);BaseObject::install_meta( ‘newobject’, new_meta_column’, ‘vchar’);
  • • BaseObject•• Meta• blog / author / entry BaseObject • entry_id / author_id / blog_id
  • mtdb.base.php // Construction public function __construct($user, $password = ’, $dbname = , $host = , $port = , $sock = ) { $this->id = md5(uniqid(MTDatabase,true)); $this->connect($user, $password, $dbname, $host, $port, $sock); ADOdb_Active_Record::SetDatabaseAdapter( $this->conn); # $this->conn->debug = true; }