Skip to content

Instantly share code, notes, and snippets.

View kanetei's full-sized avatar

Takayuki Kaneko kanetei

  • Osaka
  • 21:55 (UTC +09:00)
View GitHub Profile
@hissy
hissy / update_page_permissions.php
Created February 29, 2016 07:09
#concrete5 A job for bulk update permission inheritance of pages
<?php
// application/jobs/update_page_permissions.php
namespace Application\Job;
use Concrete\Core\Cache\Cache;
use Job as AbstractJob;
use Page;
use PageList;
class UpdatePagePermissions extends AbstractJob
@katzueno
katzueno / 0_readme.md
Last active October 26, 2018 12:08
concrete5.7.x Form Block send confirmation message to form sender

concrete5.7 Form Customization to send a confirmation email / フォームの送信者に確認メールを送る

Tested with concrete5.7.3.

Instruction

  1. Modify [SITE NAME] to your site name on the line 572 and 585 of controller.php
  2. Upload the controller.php to /application/blocks/form/ (create folder if not existed)
  3. Change or add anything you want in block_form_submission_user.php
  4. Upload the block_form_submission_user.php to /application/mail/
@kohki-shikata
kohki-shikata / index.jade
Created August 15, 2015 04:15
Jade version of Initial index.html for Foundation 5
doctype html
html.no-js(lang='en')
head
meta(charset='utf-8')
meta(name='viewport', content='width=device-width, initial-scale=1.0')
title Foundation
link(rel='stylesheet', href='stylesheets/app.css')
script(src='bower_components/modernizr/modernizr.js')
body
.row
@hissy
hissy / view.php
Last active August 25, 2016 06:30
#concrete5 #PageList How to display an icon with the page published date while specific time
<?php foreach ($pages as $page):
// Prepare data for each page being listed...
$pubTime = strtotime($page->getCollectionDatePublic());
// 60 seconds, 60 minutes, 24 hours, 3 days
$new = ((time() - $pubTime) < (60 * 60 * 24 * 3)) ? '<p class="new">New</p>' : '';
/* The HTML from here through "endforeach" is repeated for every item in the list... */ ?>
@hissy
hissy / view.php
Created January 16, 2014 04:57
[concrete5] Detect mobile browser and switch mobile block template from default custom template.
<?php defined('C5_EXECUTE') or die("Access Denied.");
Loader::library('3rdparty/mobile_detect');
$md = new Mobile_Detect();
if ($md->isMobile()) {
include('mobile.php');
} else {
include('default.php');
}
@yuka2py
yuka2py / modernizer.environ.js
Last active December 29, 2015 18:59
デバイスやブラウザを判定する Modernizr 用の追加テストです。 えっと…。いや、実務では要りますよ。やっぱり。今回まとめました。
(function() {
if (!window.Modernizr) {
return;
}
var ua = new String(window.navigator.userAgent.toLowerCase());
ua.has = function (cond) {
return this.indexOf(cond) != -1;
};
@hissy
hissy / multilingual_text.php
Last active December 27, 2015 22:09
[concrete5] How to switch area name based on the current language. Install: upload multilingual_text.php to /helpers directory. Requires Internationalization add-on
<?php defined('C5_EXECUTE') or die("Access Denied.");
Loader::model('section', 'multilingual');
class MultilingualTextHelper {
/**
* Takes area name string (like Header) and add language string (like Header Ja JP)
* @param string $text
* @return string
@miya0001
miya0001 / gist:6668263
Last active October 9, 2017 05:19
WordPressコアに対するパッチの作り方
========
パッチの作り方
========
$ mkdir wordpress
$ cd wordpress # ここがドキュメントルート
$ svn co http://develop.svn.wordpress.org/trunk/ .
$ svn update # 作業を行う直前に毎回実行!
ファイルを追加した場合は `svn add` でそのファイルを追加する。
@hissy
hissy / gist:5440756
Created April 23, 2013 03:57
コンクリートファイブジャパン株式会社 アルバイト採用フォーム

コンクリートファイブジャパン株式会社 アルバイト採用フォーム

version: 0.1

※ 現在妄想による下書き状態なので法的根拠なし

従事する業務内容

  • 当社がサポート契約を結んでいる企業のconcrete5ウェブサイトに関する、concrete5の操作や仕様に対する質問への、調査及びメールによる回答
  • 当社が業務委託契約を結んでいる企業のウェブサイトによるconcrete5を使った制作業務のサポート(コンテンツの登録、可能であればPHP/HTML/CSSいずれかのコーディング)
@Gab-km
Gab-km / github-flow.ja.md
Last active April 25, 2024 04:01 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)