Skip to content

Instantly share code, notes, and snippets.

@atsu666
atsu666 / Body.php
Created October 9, 2018 22:19
Entry_Bodyモジュールの第2ソート順に entry_id を指定
<?php
class ACMS_GET_Entry_Body extends ACMS_GET_Entry
{
var $_axis = array(
'bid' => 'descendant-or-self',
'cid' => 'descendant-or-self',
);
var $_scope = array(
@atsu666
atsu666 / Log.php
Created July 17, 2018 00:29
php/ACMS/GET/Admin/Form/Log.php
<?php
class ACMS_GET_Admin_Form_Log extends ACMS_GET_Admin_Module
{
function get()
{
if ( 'form_log' <> ADMIN ) return '';
if ( !($fmid = intval($this->Get->get('fmid'))) ) return false;
if ( 0
|| ( !roleAvailableUser() && !sessionWithAdministration() )
@atsu666
atsu666 / index.html
Created June 20, 2018 01:16
themes/sysutem/admin/entry/index.html
<!-- BEGIN_MODULE Admin_Entry_Index -->
<header>
<div>
@include("/admin/topicpath.html")
</div>
<div>
<h1 class="acms-admin-admin-title js-dialog-title"><!--T-->エントリー管理<!--/T--></h1>
</div>
</header>
@atsu666
atsu666 / img-fallback.js
Last active October 2, 2017 10:42
画像のフォールバック
module.exports = (selector, fallbackImageUrl) => {
[].forEach.call(document.querySelectorAll(selector), image => {
const imageObj = new Image();
imageObj.onerror = (() => {
imageObj.onerror = null;
image.src = fallbackImageUrl;
});
imageObj.src = image.src;
});
}
@atsu666
atsu666 / Index.php
Last active September 26, 2017 05:32
php/ACMS/GET/Admin/Form/Index.php
<?php
class ACMS_GET_Admin_Form_Index extends ACMS_GET_Admin_Module
{
function get()
{
if ( 'form_index' <> ADMIN && 'form2-edit' <> ADMIN ) return '';
if ( 0
|| ( !roleAvailableUser() && !sessionWithAdministration() )
|| ( roleAvailableUser() && !roleAuthorization('form_view', BID) && !roleAuthorization('form_edit', BID) )
) {
@atsu666
atsu666 / Hook.php
Last active September 5, 2017 04:56
/**
* POSTモジュール処理前
* $thisModuleのプロパティを参照・操作するなど
*
* @param ACMS_POST $thisModule
*/
public function beforePostFire($thisModule)
{
/**
* フォームの管理者宛メールのアドレス変更
<?php
class ACMS_User_POST_Api_GetEntries extends ACMS_POST
{
function post()
{
$eids = $this->Post->get('entry_ids');
$eids = explode(',', $eids);
if ( !is_array($eids) ) {
@atsu666
atsu666 / Ranking.php
Created June 26, 2017 07:03
php/ACMS/GET/Api/GoogleAnalytics/Ranking.php (Ver. 2.6.1.4)
<?php
class ACMS_GET_Api_GoogleAnalytics_Ranking extends ACMS_GET_Api_GoogleAnalytics
{
function get()
{
$Tpl = new Template($this->tpl, new ACMS_Corrector());
$email = config('google_api_app_service_email');
$key = config('google_api_client_id_key_location');
@atsu666
atsu666 / Ranking.php
Created June 26, 2017 07:03
php/ACMS/GET/Api/GoogleAnalytics/Ranking.php (Ver. 2.6.1.4)
<?php
class ACMS_GET_Api_GoogleAnalytics_Ranking extends ACMS_GET_Api_GoogleAnalytics
{
function get()
{
$Tpl = new Template($this->tpl, new ACMS_Corrector());
$email = config('google_api_app_service_email');
$key = config('google_api_client_id_key_location');
!function(t){function e(i){for(var t,e,a,s=i.split("&"),n={},r=0,c=s.length;r<c;r++)void 0!==(t=s[r].split("="))[0]&&(e=t[0],a=void 0!==t[1]?t.slice(1).join("="):e,n[e]=decodeURIComponent(a));return n}function a(i){var t=i||{};return this.charset=t.charset,this.type=t.type||"text/javascript",this.error=t.error||function(){},this.queue={srcAry:[],asyncAry:[],loaded:[],add:function(i){this.srcAry.push(i)}},this}var s=t.document,n=t.navigator,r=t.location;if(t.ACMS)return!1;a.prototype={next:function(i,t,e){return t?this._load(i,!0,e):this.queue.add(i),this},load:function(i){this.complete=i||function(){},this.assign()},assign:function(){var i=this.queue.srcAry.shift();if(void 0===i)return this.complete(),!1;"function"==typeof i?this._exe(i):this._load(i)},_exe:function(i){(i||function(){})(this),this.assign()},_exists:function(t){var e=!1;for(i=0;i<this.queue.loaded.length;i++)if(this.queue.loaded[i]===t){e=!0;break}return e},_load:function(i,t,e){var a=this,s=document.createElement("script"),n=document.getEleme