Skip to content

Instantly share code, notes, and snippets.

View 77web's full-sized avatar

Hiromi Hishida 77web

  • linkage-inc
  • Nagoya, Aichi, Japan
  • X @77web
View GitHub Profile
@77web
77web / sfWidgetFormInputTel.class.php
Created April 11, 2012 03:23
Japanese phone number input widget for symfony1.4
<?php
/**
* sfWidgetFormInputTel
*
* @auther 77web<[email protected]>
*/
class sfWidgetFormInputTel extends sfWidgetForm
{
protected $widgets = array();
@77web
77web / 004_import_navi_menu.yml
Created December 26, 2011 23:59
PNE3.xのglobal,localナビを現在のmixiに合わせるfixture(data/fixtures/004_import_navi_menu.ymlに上書きしてからinstall)
Navigation:
secure_global_navigation_home:
type: "secure_global"
uri: "@homepage"
sort_order: 0
Translation:
ja_JP:
caption: "ホーム"
en:
caption: "Home"
@77web
77web / 1324255002_version2.php
Created December 19, 2011 00:45
SymfonyAdventCalendarJP2011用migrationクラスのサンプル(sf1.4+doctrine1.x)-2
<?php
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
class Version2 extends Doctrine_Migration_Base
{
public function up()
{
$this->addColumn('product', 'memo', 'string', '', array(
));
@77web
77web / schema.yml
Created December 19, 2011 00:37
SymfonyAdventCalendarJP2011用schema.ymlのサンプル(sf1.4+doctrine1.x)-3
Product:
columns:
id:
type: serial
primary: true
name:
type: string(255)
notnull: true
price:
type: integer
@77web
77web / 1324252920_version1.php
Created December 19, 2011 00:05
SymfonyAdventCalendarJP2011用migrationクラスのサンプル(sf1.4+doctrine1.x)
<?php
/**
* This class has been auto-generated by the Doctrine ORM Framework
*/
class Version1 extends Doctrine_Migration_Base
{
public function up()
{
$this->addColumn('product', 'description', 'string', '', array(
));
@77web
77web / schema.yml
Created December 19, 2011 00:03
SymfonyAdventCalendarJP2011用schema.ymlのサンプル(sf1.4+doctrine1.x)-2
Product:
columns:
id:
type: serial
primary: true
name:
type: string(255)
notnull: true
price:
type: integer
@77web
77web / schema.yml
Created December 18, 2011 23:59
SymfonyAdventCalendarJP2011用schema.ymlのサンプル(sf1.4+doctrine1.x)
Product:
columns:
id:
type: serial
primary: true
name:
type: string(255)
notnull: true
price:
type: integer
@77web
77web / sfWidgetFormDoctrineHierSelect.class.php
Created December 16, 2011 05:34
sfWidgetFormDoctrineHierSelect(jquery)
<?php
/**
* sfWidgetFormDoctrineHierSelect represents a hierarchical selects with jquery help.
*
* @auther Hiromi Hishida<[email protected]>
*/
class sfWidgetFormDoctrineHierSelect extends sfWidgetForm
{
/**
@77web
77web / plugins.yml
Created October 13, 2011 03:28
OpenPNE3.x最小インストール時のplugins.yml設定★認証機能のみでインストール
opAlbumPlugin:
install: false
opAshiatoPlugin:
install: false
opBlogPlugin:
install: false
opCalendarPlugin:
@77web
77web / opAuthWithTwitterPluginTweet.class.php
Created July 14, 2011 10:29
opAuthWithTwitterPluginでtwitter同時投稿するライブラリの案
<?php
require_once(dirname(__FILE__).'/TwitterOAuth.class.php');
class opAuthWithTwitterPluginTweet
{
protected static $consumer_secret;
protected static $consumer_key;
protected static $oauth_token;