Skip to content

Instantly share code, notes, and snippets.

Katz Ueno katzueno

Block or report user

Report or block katzueno

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@katzueno
katzueno / app.php
Last active Oct 16, 2018
concrete5 Environment switch according to host name
View app.php
<?php
// /application/bootstrap/app.php
Route::register('/ccm/request_test', function() {
header("Pragma: no-cache");
echo '<dl>';
?><dt>Application environment:</dt><dd><?php echo ($this->app->environment()) ? $this->app->environment() : 'default'; ?></dd><?php
$request = \Concrete\Core\Http\Request::getInstance();
?><dt>Client IP:</dt><dd><?php echo $request->getClientIp(); ?></dd><?php
?><dt>Host:</dt><dd><?php echo $request->getHost(); ?></dd><?php
?><dt>Port:</dt><dd><?php echo $request->getPort(); ?></dd><?php
@katzueno
katzueno / BasicThumbnailer.php
Last active Oct 12, 2018
src/Entity/File/Version.php & src/File/Image/BasicThumbnailer.php
View BasicThumbnailer.php
<?php
namespace Concrete\Core\File\Image;
use Concrete\Core\Application\ApplicationAwareInterface;
use Concrete\Core\Application\ApplicationAwareTrait;
use Concrete\Core\Entity\File\File;
use Concrete\Core\Entity\File\StorageLocation\StorageLocation;
use Concrete\Core\File\Image\Thumbnail\ThumbnailerInterface;
use Concrete\Core\File\Image\Thumbnail\Type\CustomThumbnail;
use Concrete\Core\File\StorageLocation\Configuration\LocalConfiguration;
View legacy_block_controller.php
<?php
namespace Application\Block\Form;
use Concrete\Core\Block\BlockController;
use Core;
use Database;
use User;
use Page;
use UserInfo;
@katzueno
katzueno / GravatarHelper.php
Last active Oct 3, 2018
Disable Gravatar for Mautic
View GravatarHelper.php
<?php
/*
* @copyright 2014 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
View request_debug_app.php
<?php
// /application/bootstrap/app.php
/*
* ----------------------------------------------------------------------------
* ## Request Debug
* ----------------------------------------------------------------------------
*/
Route::register('/ccm/c5-request_test_wKKv8AEYlB7F27WE', function() {
header("Pragma: no-cache");
@katzueno
katzueno / README.md
Last active Aug 6, 2018
Batch Modify Users
View README.md

Batch Modify Users job for concrete5

(c) 2018. concrete5 Japan, Inc. (Katz Ueno) MIT License.

About

This is concrete5 Job to batch edit all existing users to make anonymouse or edit.

@katzueno
katzueno / StatusCodeCheck.php
Created Jun 26, 2018 — forked from hissy/StatusCodeCheck.php
#concrete5 Status Code Check Command
View StatusCodeCheck.php
<?php
// application/src/Console/Command/StatusCodeCheck.php
namespace Application\Console\Command;
use Concrete\Core\Console\Command;
use Concrete\Core\Database\Connection\Connection;
use Concrete\Core\Http\Client\Client;
use Concrete\Core\Page\Page;
use Concrete\Core\Support\Facade\Application;
use Concrete\Core\Url\Url;
@katzueno
katzueno / StatusCodeCheck.php
Created Jun 26, 2018 — forked from hissy/StatusCodeCheck.php
#concrete5 Status Code Check Command
View StatusCodeCheck.php
<?php
// application/src/Console/Command/StatusCodeCheck.php
namespace Application\Console\Command;
use Concrete\Core\Console\Command;
use Concrete\Core\Database\Connection\Connection;
use Concrete\Core\Http\Client\Client;
use Concrete\Core\Page\Page;
use Concrete\Core\Support\Facade\Application;
use Concrete\Core\Url\Url;
@katzueno
katzueno / ManualNavPublisher.php
Created Dec 25, 2017 — forked from hissy/ManualNavPublisher.php
[concrete5][V8][MigrationTool] Example of creating custom publisher
View ManualNavPublisher.php
<?php
// application/src/Concrete/MigrationTool/Publisher/Block/ManualNavPublisher.php
namespace Application\Concrete\MigrationTool\Publisher\Block;
use Concrete\Core\Block\Block;
use Concrete\Core\Page\Page;
use PortlandLabs\Concrete5\MigrationTool\Entity\Import\Batch;
use PortlandLabs\Concrete5\MigrationTool\Entity\Import\BlockValue\BlockValue;
use PortlandLabs\Concrete5\MigrationTool\Publisher\Block\PublisherInterface;
@katzueno
katzueno / concrete.php
Created Dec 19, 2017
hreflang setting for concrete5 config
View concrete.php
<?php
return [
/*
* ------------------------------------------------------------------------
* Multilingual Settings
* ------------------------------------------------------------------------
*/
'multilingual' => [
'set_alternate_hreflang' => true,
You can’t perform that action at this time.