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 / PluginSomeForm.php
Created February 18, 2011 04:59
sfFormで簡単に確認画面を作るためのwidget試作品。
<?php
class PluginSomeForm extends BaseSomeForm
{
public function configure()
{
unset($this['id']);
$this->useFields(array('title', 'body'));
//usual configure here
}
@77web
77web / openpneFastInstallTask.class.php
Created April 1, 2011 02:30
1行コマンドでインストールができるopenpne:fast-installタスクの提案。
<?php
/**
* This file is part of the OpenPNE package.
* (c) OpenPNE Project (http://www.openpne.jp/)
*
* For the full copyright and license information, please view the LICENSE
* file and the NOTICE file that were distributed with this source code.
*/
@77web
77web / PluginAshiatoTable.class.php
Created April 27, 2011 01:56
opAshiatoPluginのPluginAshiatoTableの修正提案
<?php
/**
* This file is part of the OpenPNE package.
* (c) OpenPNE Project (http://www.openpne.jp/)
*
* For the full copyright and license information, please view the LICENSE
* file and the NOTICE file that were distributed with this source code.
*/
@77web
77web / _memberImageBox.php
Created April 28, 2011 23:36
skype meボタン設置@OpenPNE3 apps/pc_frontend/modules/default/templates/_memberImageBox.php
<?php
$moreInfo = array();
if ($member->getId() === $id)
{
$moreInfo[] = link_to(__('Edit Photo'), '@member_config_image');
$moreInfo[] = link_to(__('Show Profile'), '@member_profile_mine');
}
elseif ($member->getImageFileName())
{
$moreInfo[] = link_to(__('Show more Photos'), '@friend_show_image?id='.$member->getId());
@77web
77web / gist.github.com.js
Created May 2, 2011 14:09
OpenPNE3用gist小窓
function url2cmd(url)
{
var gist = url.match(/^https:\/\/gist.github.com\/([0-9]+)/);
if(gist)
{
var gistId = RegExp.$1;
var jsUrl = 'https://gist.github.com/' + gistId + '.js';
document.write('<style type="text/css">.gist .line { text-align: left; }</style>');
document.write('<script type="text/javascript" src="' + jsUrl + '"></script>');
@77web
77web / sfValidatorIntegerRange.class.php
Created May 26, 2011 04:02
integer filter widget and integer range validator for symfony1.4
<?php
/**
* sfValidatorIntegerRange
* @package symfony
* @subpackage validator
* @auther Hiromi Hishida<info@77-web.com>
*/
class sfValidatorIntegerRange extends sfValidatorBase
{
protected function configure($options = array(), $messages = array())
@77web
77web / tableDefineTask.class.php
Created May 28, 2011 06:35
symfony1.xとdoctrineでテーブル定義書の雛型を自動生成させるタスク
<?php
/**
* @auther Hiromi Hishida<info@77-web.com>
*/
class tableDefineTask extends sfDoctrineBaseTask
{
protected function configure()
{
$this->namespace = 'table';
@77web
77web / jsLoginAction.class.php
Created June 6, 2011 00:38
OpenPNE3.xで外部ログインページ(静的HTML,他システム…)にjavascriptでログインフォームを埋め込む
<?php
class jsLoginAction extends sfAction
{
public function execute($request)
{
if(!$this->getUser()->hasCredential('SNSMember'))
{
$this->forms = $this->getUser()->getAuthForms();
foreach($this->forms as $form)
@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;
@77web
77web / plugins.yml
Created October 13, 2011 03:28
OpenPNE3.x最小インストール時のplugins.yml設定★認証機能のみでインストール
opAlbumPlugin:
install: false
opAshiatoPlugin:
install: false
opBlogPlugin:
install: false
opCalendarPlugin: