Skip to content

Instantly share code, notes, and snippets.

😀
Creating NeXT Generation eZ Platform Software

Brookins Consulting brookinsconsulting

😀
Creating NeXT Generation eZ Platform Software
Block or report user

Report or block brookinsconsulting

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
@brookinsconsulting
brookinsconsulting / ezmatrix.xml
Created Sep 23, 2017
Example eZMatrix XML Storage Document
View ezmatrix.xml
<?xml version="1.0" encoding="utf-8"?>
<ezmatrix>
<name />
<columns number="3">
<column num="0" id="identifier1">
Name1
</column>
<column num="1" id="identifier2">
Name2
</column>
@brookinsconsulting
brookinsconsulting / BcLowerCaseUnderscoreUrlAliasSlugConverter.php
Last active Mar 10, 2017 — forked from skrosoft/SlugConverterLC.php
ezpublishplatform and ezplatform SlugConverter class to transform all urlalias(es) into lowecase (ezp v3 style)
View BcLowerCaseUnderscoreUrlAliasSlugConverter.php
<?php
/**
* File containing the BcLowerCaseUnderscoreUrlAliasSlugConverter class part of the BcLowerCaseUrlAliasBundle package.
*
* @copyright Copyright (C) Brookins Consulting. All rights reserved.
* @license For full copyright and license information view LICENSE and COPYRIGHT.md file distributed with this source code.
* @version //autogentag//
* @package BcLowerCaseUrlAliasBundle
*/
@brookinsconsulting
brookinsconsulting / extension-ezpnormalizelatlng-bin-php-ezpnormalizelatlng.php
Created Jun 13, 2015
ezpnormalizelatlng.php - Simple script example of using eZ Publish Legacy Extension PHP Shell Script to Modify content object content programatically
View extension-ezpnormalizelatlng-bin-php-ezpnormalizelatlng.php
#!/usr/bin/env php
<?php
/**
* File containing the ezpnormalizelatlng.php bin script
*
* @copyright Copyright (C) 1999 - 2015 Brookins Consulting. All rights reserved.
* @copyright Copyright (C) 2013 - 2015 Think Creative. All rights reserved.
* @license http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2 (or later)
* @version 0.0.3
* @package site
View AliasCleaner.php
<?php
namespace Ayaline\Bundle\EzToolsBundle\Image;
use eZ\Publish\Core\FieldType\Image\AliasCleanerInterface;
use eZ\Publish\Core\IO\UrlRedecoratorInterface;
use Liip\ImagineBundle\Imagine\Filter\FilterConfiguration;
class AliasCleaner implements AliasCleanerInterface
{
@brookinsconsulting
brookinsconsulting / services.xml
Last active Aug 29, 2015
Blog post: 'Change user authentication to login with email' Service Definitions (Modified to use validated xml; which was missing from blog post examples). Also added a auto converted services.yml example (Converted using website: http://converter.rosstuck.com). From: http://blog.silversolutions.de/2014/07/ezpublish/extend-ez-5-3-login-email/ Do…
View services.xml
<?xml version="1.0" encoding="utf-8" ?>
<container xmlns="http://symfony.com/schema/dic/services"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<parameters>
<parameter key="security.authentication.provider.dao.class">SilversolutionsBundleEshopBundleServiceSecurityAuthenticationProvider</parameter>
</parameters>
<services>
<service id="security.authentication.provider.dao" class="%security.authentication.provider.dao.class%" abstract="true" public="false">
<argument /> <!-- User Provider -->
View ContentPackageHandler.php
<?php
/**
* @author Henning Kvinnesland <henning@keyteq.no>
* @since 02.06.15
*/
namespace Kavli\GenericBundle\Override;
class ContentPackageHandler extends \eZContentObjectPackageHandler
{
@brookinsconsulting
brookinsconsulting / bc.ezpublish2014.11.1_ezpublish_legacy_kernel_classes_datatypes_ezxmltext_ezxmloutputhandler.php.diff
Last active Aug 29, 2015
BC Developed a kernel class override patch to provide additional ezxmltext template override.ini template override Match conditions. These are nearly all possible (minus state and some other more obscure conditions) conditions. This patch has been lightly tested as functional and it seems to work well. This may cause as of yet unknown problems (…
View bc.ezpublish2014.11.1_ezpublish_legacy_kernel_classes_datatypes_ezxmltext_ezxmloutputhandler.php.diff
--- /Users/graham/web/ez/dual-static-based-off-2014.11.1/ezpublish_legacy/kernel/classes/datatypes/ezxmltext/ezxmloutputhandler.php 2015-05-31 07:02:38.000000000 -0500
+++ /Users/graham/web/ez/dual-static-based-off-2014.11.1/ezpublish_legacy/kernel/classes/datatypes/ezxmltext/ezxmloutputhandler.php.solution.003.works 2015-05-31 06:59:53.000000000 -0500
@@ -162,7 +162,22 @@
$this->Res = eZTemplateDesignResource::instance();
if ( $this->ContentObjectAttribute )
{
- $this->Res->setKeys( array( array( 'attribute_identifier', $this->ContentObjectAttribute->attribute( 'contentclass_attribute_identifier' ) ) ) );
+ $this->Res->setKeys( array(
+ array( 'attribute_identifier', $this->ContentObjectAttribute->attribute( 'contentclass_attribute_identifier' ) ),
+ array( 'object', $this->ContentObjectAttribute->attribute( 'contentobject_id' ) ),
@brookinsconsulting
brookinsconsulting / gist:bf49d467256fdb5f073e
Last active Aug 29, 2015 — forked from arnebratt/gist:571269541df60de1b683
In #ezpublish irc (freenode.net) Bratt shared his solution to use a copy of an ezpublish website from production on a local dev without the var directory images (this is a kernel hack atm but could be transformed into a kernel override)
View gist:bf49d467256fdb5f073e
--- kernel/classes/datatypes/ezimage/ezimagealiashandler.php 2014-07-17 11:18:00.000000000 +0200
+++ kernel/classes/datatypes/ezimage/ezimagealiashandler.php 2014-07-17 11:51:57.000000000 +0200
@@ -551,6 +551,10 @@
}
$this->setOriginalAttributeData( $originalData );
+ $ini = eZINI::instance( 'image.ini' );
+ $imagesRemoteUrl = $ini->variable( 'ImageConverterSettings', 'ImagesRemoteURL' );
+ $imagesRemoteUrl = rtrim( $imagesRemoteUrl, '/' ) . '/';
+
@brookinsconsulting
brookinsconsulting / request_for_support_to_maxime_email_001.txt
Created Oct 16, 2014
Request for support: Please help me get a copy of Wascou - URL Shortener
View request_for_support_to_maxime_email_001.txt
Hello Maxime,
I am sorry to bother you. I have been trying to connect with you via
Twitter and LinkedIn for the past month.
I use eZ Publish ... a lot. I'm trying to find a copy of "Wascou Software
Edition - URL Shortener (wse_us)" Re: http://projects.ez.no/wse_us
I used to have a copy of the package but I have lost it and can't find it
any longer.
@brookinsconsulting
brookinsconsulting / symfony-legacy-kernel-callback-user-login-example-snippet.php
Last active Sep 24, 2015
This snippet of php eZ Publish 5 (Symfony Stack) code uses the legacy kernel api to login to the user you wish to use to perform actions within eZ Publish Legacy as! Default admin user used in this example. Reference: http://share.ez.no/forums/ez-publish-5-platform/interracting-with-legacy-from-symfony-command#comment84674
View symfony-legacy-kernel-callback-user-login-example-snippet.php
<?php
protected function execute(InputInterface $input, OutputInterface $output) {
$repository = $this->getContainer()->get('ezpublish.api.repository');
$legacyKernel = $this->getContainer()->get('ezpublish_legacy.kernel');
$userID = 14; // UserID of the Default Admin User
$user = $repository->getUserService()->loadUser( $userID );
$repository->setCurrentUser( $user );
$result = $legacyKernel()->runCallback(
function () use( $userID )
You can’t perform that action at this time.