mysql-ctl start
mysql-ctl cli
CREATE USER 'mautic'@'127.0.0.1' IDENTIFIED BY 'mautic';
GRANT ALL PRIVILEGES ON *.* TO 'mautic'@'127.0.0.1' WITH GRANT OPTION;
FLUSH PRIVILEGES;
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Logging setting based on Concrete CMS 8.5.12 | |
return [ | |
/* | |
* ------------------------------------------------------------------------ | |
* Logging settings | |
* ------------------------------------------------------------------------ | |
*/ | |
'log' => [ | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 | |
*/ |
ConcreteCMS TIPS のサンプルコードです。
動画はこちらからご覧いただけます。 https://youtu.be/bIPE_50tjpE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// appliction/config/concrete.php | |
return [ | |
'sitemap_xml' => [ | |
'file' => 'sitemap2.xml', | |
], | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Controller extends BlockController | |
{ | |
// 省略 | |
public function on_start() | |
{ | |
// https://documentation.concrete5.org/developers/assets/registering-an-asset | |
$al = AssetList::getInstance(); | |
$al->register('javascript', 'jquery', 'js/jquery.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Application\Controller\SinglePage; | |
use Concrete\Controller\SinglePage\Login as CoreLogin; | |
class Login extends CoreLogin | |
{ | |
public function view($type = null, $element = 'form') | |
{ | |
$key=$this->request->query->get('key'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Usage: | |
* concrete/bin/concrete5 c5:exec bulk_change_page_template.php old_page_template_handle /parent-page-path new_page_template_handle | |
*/ | |
$filterPageTemplateHandle = $args[0]; | |
$filterPagePath = $args[1]; | |
$changePageTemplateHandle = $args[2]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set the bucket name and date limit that you want to scan for... | |
# | |
# For example, if you deleted everything at 9'ish, set the DATE_LIMIT for a | |
# few minutes before to ensure you find only the stuff you deleted by error | |
# | |
BUCKET_NAME="..." | |
DATE_LIMIT="0000-00-00T00:00:00.000Z" | |
aws s3api list-object-versions --bucket "${BUCKET_NAME}" > objects.json | |
cat objects.json | jq --arg DATE_LIMIT "${DATE_LIMIT}" '[ .DeleteMarkers[] | select(.LastModified > $DATE_LIMIT and .IsLatest) | { file: .Key, version: .VersionId } ]' > markers-to-delete.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
NewerOlder